Пример #1
0
    @Override
    public Component getListCellRendererComponent(
        JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
      if (!useListColors && (isSelected || cellHasFocus)) {
        SynthLookAndFeel.setSelectedUI(
            (SynthLabelUI) SynthLookAndFeel.getUIOfType(getUI(), SynthLabelUI.class),
            isSelected,
            cellHasFocus,
            list.isEnabled(),
            false);
      } else {
        SynthLookAndFeel.resetSelectedUI();
      }

      super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      return this;
    }
Пример #2
0
 @Override
 public void paint(Graphics g) {
   super.paint(g);
   SynthLookAndFeel.resetSelectedUI();
 }
Пример #3
0
 @Override
 public void setBorder(Border b) {
   if (useUIBorder || b instanceof SynthBorder) {
     super.setBorder(b);
   }
 }