Пример #1
0
 private SectionLabel(final String txt0) {
   super(txt0);
   this.setBorder(
       new FSkin.MatteSkinBorder(0, 0, 1, 0, FSkin.getColor(FSkin.Colors.CLR_BORDERS)));
   setHorizontalAlignment(SwingConstants.CENTER);
   this.setFont(FSkin.getBoldFont(16));
   this.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
 }
Пример #2
0
    /**
     * A JTextField plus a "codeString" property, that stores keycodes for the shortcut. Also, an
     * action listener that handles translation of keycodes into characters and (dis)assembly of
     * keycode stack.
     *
     * @param shortcut0   Shortcut object
     */
    public KeyboardShortcutField(final Shortcut shortcut0) {
      super();
      this.setEditable(false);
      this.setFont(FSkin.getFont(14));
      final FPref prefKey = shortcut0.getPrefKey();
      reload(prefKey);

      this.addKeyListener(
          new KeyAdapter() {
            @Override
            public void keyPressed(final KeyEvent evt) {
              KeyboardShortcuts.addKeyCode(evt);
            }
          });

      this.addFocusListener(
          new FocusAdapter() {
            @Override
            public void focusGained(final FocusEvent evt) {
              KeyboardShortcutField.this.setBackground(FSkin.getColor(FSkin.Colors.CLR_ACTIVE));
            }

            @Override
            public void focusLost(final FocusEvent evt) {
              FModel.getPreferences().setPref(prefKey, getCodeString());
              FModel.getPreferences().save();
              shortcut0.attach();
              KeyboardShortcutField.this.setBackground(Color.white);
            }
          });
    }
Пример #3
0
 private NoteLabel(final String txt0) {
   super(txt0);
   this.setFont(FSkin.getItalicFont(12));
   this.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
 }
Пример #4
0
 private OptionsCheckBox(final String txt0) {
   super(txt0);
   this.setFont(FSkin.getBoldFont(12));
 }