示例#1
1
  /**
   * Overridden to message super and forward the method to the tree. Since the tree is not actually
   * in the component hierarchy it will never receive this unless we forward it in this manner.
   */
  public void updateUI() {
    super.updateUI();

    if (tree != null) tree.updateUI();

    // Use the tree's default foreground and background colors in the
    // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background", "Tree.foreground", "Tree.font");
  }
示例#2
0
  protected void installDefaults(AbstractButton b) {
    // load shared instance defaults
    String pp = getPropertyPrefix();

    defaultTextShiftOffset = UIManager.getInt(pp + "textShiftOffset");

    // set the following defaults on the button
    if (b.isContentAreaFilled()) {
      LookAndFeel.installProperty(b, "opaque", Boolean.TRUE);
    } else {
      LookAndFeel.installProperty(b, "opaque", Boolean.FALSE);
    }

    if (b.getMargin() == null || (b.getMargin() instanceof UIResource)) {
      b.setMargin(UIManager.getInsets(pp + "margin"));
    }

    LookAndFeel.installColorsAndFont(b, pp + "background", pp + "foreground", pp + "font");
    LookAndFeel.installBorder(b, pp + "border");

    Object rollover = UIManager.get(pp + "rollover");
    if (rollover != null) {
      LookAndFeel.installProperty(b, "rolloverEnabled", rollover);
    }

    LookAndFeel.installProperty(b, "iconTextGap", new Integer(4));
  }
 protected void installDefaults() {
   LookAndFeel.installColorsAndFont(
       optionPane, "OptionPane.background", "OptionPane.foreground", "OptionPane.font");
   LookAndFeel.installBorder(optionPane, "OptionPane.border");
   minimumSize = UIManager.getDimension("OptionPane.minimumSize");
   LookAndFeel.installProperty(optionPane, "opaque", Boolean.TRUE);
 }
示例#4
0
 public AnimatedToolTip(JLabel label) {
   super();
   this.iconlabel = label;
   LookAndFeel.installColorsAndFont(
       iconlabel, "ToolTip.background", "ToolTip.foreground", "ToolTip.font");
   iconlabel.setOpaque(true);
   setLayout(new BorderLayout());
   add(iconlabel);
 }
 protected void installDefaults() {
   LookAndFeel.installProperty(progressBar, "opaque", Boolean.TRUE);
   LookAndFeel.installBorder(progressBar, "ProgressBar.border");
   LookAndFeel.installColorsAndFont(
       progressBar, "ProgressBar.background", "ProgressBar.foreground", "ProgressBar.font");
   cellLength = UIManager.getInt("ProgressBar.cellLength");
   if (cellLength == 0) cellLength = 1;
   cellSpacing = UIManager.getInt("ProgressBar.cellSpacing");
   selectionForeground = UIManager.getColor("ProgressBar.selectionForeground");
   selectionBackground = UIManager.getColor("ProgressBar.selectionBackground");
 }
 public void installUI(JComponent jComponent) {
   grid = (JGrid) jComponent;
   rendererPane = new CellRendererPane();
   grid.add(rendererPane);
   gridHeader = (JGrid) jComponent;
   jComponent.setOpaque(false);
   LookAndFeel.installColorsAndFont(
       jComponent, "TableHeader.background", "TableHeader.foreground", "TableHeader.font");
   installDefaults();
   installListeners();
   installKeyboardActions();
 }
示例#7
0
 protected void installDefaults(JPanel p) {
   LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font");
   LookAndFeel.installBorder(p, "Panel.border");
   LookAndFeel.installProperty(p, "opaque", Boolean.TRUE);
 }