コード例 #1
0
 public void paintBackground(Graphics g, JComponent c) {
   if (c.isOpaque()) {
     if ((c.getBackground().equals(AbstractLookAndFeel.getBackgroundColor()))
         && (c.getBackground() instanceof ColorUIResource)) {
       HiFiUtils.fillComponent(g, c);
     } else {
       g.setColor(c.getBackground());
       g.fillRect(0, 0, c.getWidth(), c.getHeight());
     }
   }
 }
コード例 #2
0
ファイル: HiFiSliderUI.java プロジェクト: timburrow/ovj3
 public void paintBackground(Graphics g, JComponent c) {
   if (c.isOpaque()) {
     Component parent = c.getParent();
     if ((parent != null) && (parent.getBackground() instanceof ColorUIResource)) {
       HiFiUtils.fillComponent(g, c);
     } else {
       if (parent != null) {
         g.setColor(parent.getBackground());
       } else {
         g.setColor(c.getBackground());
       }
       g.fillRect(0, 0, c.getWidth(), c.getHeight());
     }
   }
 }