示例#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);
   }
 }