private int initRepaintInterval() { repaintInterval = UIDefaultsLookup.getInt("ProgressBar.repaintInterval"); return repaintInterval; }
private int initRepaintInterval() { repaintInterval = UIDefaultsLookup.getInt("ProgressBar.repaintInterval"); return repaintInterval; }
protected void installDefaults(Gripper s) { _size = UIDefaultsLookup.getInt("Gripper.size"); }
public int getDefaultTabStyle() { return UIDefaultsLookup.getInt("JideTabbedPane.defaultTabShape"); }
private int initRepaintInterval() { repaintInterval = UIDefaultsLookup.getInt("ProgressBar.repaintInterval"); return repaintInterval; }
public int getDefaultColorTheme() { return UIDefaultsLookup.getInt("JideTabbedPane.defaultTabColorTheme"); }
public int getDefaultTabResizeMode() { return UIDefaultsLookup.getInt("JideTabbedPane.defaultResizeMode"); }
@Override protected void installDefaults() { super.installDefaults(); // set the border of the TabbedPane LookAndFeel.installBorder(_tabPane, "JideTabbedPane.border"); _closeButtonMargin = UIDefaultsLookup.getInt("JideTabbedPane.closeButtonMargin"); _closeButtonMarginSize = UIDefaultsLookup.getInt("JideTabbedPane.closeButtonMarginSize"); _iconMarginHorizon = UIDefaultsLookup.getInt("JideTabbedPane.iconMarginHorizon"); _iconMarginVertical = UIDefaultsLookup.getInt("JideTabbedPane.iconMarginVertical"); }
@Override public void paintPopupMenuSeparator(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { int defaultShadowWidth = UIDefaultsLookup.getInt("MenuItem.shadowWidth"); super.paintPopupMenuSeparator(c, g, rect, orientation, state); g.setColor(new Color(0xC5C5C5)); g.drawLine(rect.x + defaultShadowWidth, rect.y, rect.x + defaultShadowWidth, rect.y + rect.height); }
/** * Constructor with tab height. * * @param tabHeight the tab height */ public Contour(int tabHeight) { _thickness = UIDefaultsLookup.getInt("Contour.thickness") == 0 ? 4 : UIDefaultsLookup.getInt("Contour.thickness"); _lineColor = UIDefaultsLookup.getColor("Contour.color") == null ? new Color(136, 136, 136) : UIDefaultsLookup.getColor("Contour.color"); setTabHeight(tabHeight); if (getOutlineMode() != PARTIAL_OUTLINE_MODE) { initOutline(); } }
@Override protected void installDefaults() { super.installDefaults(); LookAndFeel.installBorder(progressBar, "MeterProgressBar.border"); LookAndFeel.installColors(progressBar, "MeterProgressBar.background", "MeterProgressBar.foreground"); _cellForeground = UIDefaultsLookup.getColor("MeterProgressBar.cellForeground"); _cellBackground = UIDefaultsLookup.getColor("MeterProgressBar.cellBackground"); _cellLength = UIDefaultsLookup.getInt("MeterProgressBar.cellLength"); _cellSpacing = UIDefaultsLookup.getInt("MeterProgressBar.cellSpacing"); }
@Override public void paintPopupMenuSeparator(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { int defaultShadowWidth = UIDefaultsLookup.getInt("MenuItem.shadowWidth"); int defaultTextIconGap = UIDefaultsLookup.getInt("MenuItem.textIconGap"); if (c.getComponentOrientation().isLeftToRight()) { paintMenuShadow(c, g, new Rectangle(rect.x, rect.y, defaultShadowWidth, rect.height), SwingConstants.HORIZONTAL, ThemePainter.STATE_DEFAULT); g.setColor(getMenuItemBackground()); g.fillRect(rect.x + defaultShadowWidth, rect.y, rect.width - defaultShadowWidth, rect.height); g.setColor(getSeparatorForeground()); g.drawLine(rect.x + defaultShadowWidth + defaultTextIconGap, rect.y + 1, rect.x + rect.width, rect.y + 1); } else { paintMenuShadow(c, g, new Rectangle(rect.x + rect.width - defaultShadowWidth, rect.y, defaultShadowWidth, rect.height), SwingConstants.HORIZONTAL, ThemePainter.STATE_DEFAULT); g.setColor(getMenuItemBackground()); g.fillRect(rect.x, rect.y, rect.width - defaultShadowWidth, rect.height); g.setColor(getSeparatorForeground()); g.drawLine(rect.x, rect.y + 1, rect.x + rect.width - defaultShadowWidth - defaultTextIconGap, rect.y + 1); } }
String[] titles = fitInWidth((String) title, UIDefaultsLookup.getInt("OptionPane.bannerMaxCharsPerLine")); JPanel titlePanel = new NullPanel(); titlePanel.setLayout(new BoxLayout(titlePanel, BoxLayout.Y_AXIS)); for (String s : titles) { JLabel label = new JLabel(s); label.setFont(label.getFont().deriveFont(UIDefaultsLookup.getInt("OptionPane.bannerFontStyle"), UIDefaultsLookup.getInt("OptionPane.bannerFontSize"))); Color color = UIDefaultsLookup.getColor("OptionPane.bannerForeground"); label.setForeground(color != null ? color : getPainter().getOptionPaneBannerForeground());
public void paintPopupMenuSeparator(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { int defaultShadowWidth = UIDefaultsLookup.getInt("MenuItem.shadowWidth"); int defaultTextIconGap = UIDefaultsLookup.getInt("MenuItem.textIconGap"); Color shadowColor = UIDefaultsLookup.getColor("MenuItem.shadowColor"); Color foreground = UIDefaultsLookup.getColor("PopupMenuSeparator.foreground"); Color background = UIDefaultsLookup.getColor("PopupMenuSeparator.background"); g.setColor(shadowColor); if (c.getComponentOrientation().isLeftToRight()) { g.fillRect(0, 0, defaultShadowWidth, rect.height); if ("true".equals(SecurityUtils.getProperty("shadingtheme", "false"))) { JideSwingUtilities.fillSingleGradient(g, new Rectangle(rect.x, rect.y, defaultShadowWidth, rect.height), SwingConstants.EAST, 255); } g.setColor(background); g.fillRect(rect.x + defaultShadowWidth, rect.y, rect.width - defaultShadowWidth, rect.height); g.setColor(foreground); g.drawLine(rect.x + defaultShadowWidth + defaultTextIconGap, rect.y + 1, rect.x + rect.width, rect.y + 1); } else { g.fillRect(rect.x + rect.width, rect.y, defaultShadowWidth, rect.height); if ("true".equals(SecurityUtils.getProperty("shadingtheme", "false"))) { JideSwingUtilities.fillSingleGradient(g, new Rectangle(rect.x + rect.width - defaultTextIconGap, rect.y, defaultShadowWidth, 2), SwingConstants.WEST, 255); } g.setColor(background); g.fillRect(rect.x, rect.y, rect.width - defaultShadowWidth, rect.height); g.setColor(foreground); g.drawLine(rect.x, rect.y + 1, rect.x + rect.width - defaultShadowWidth - defaultTextIconGap, rect.y + 1); } }
cons.gridwidth = GridBagConstraints.REMAINDER; cons.gridheight = 1; int anchor = UIDefaultsLookup.getInt("OptionPane.messageAnchor"); cons.anchor = anchor == 0 ? GridBagConstraints.CENTER : anchor; cons.insets = new Insets(0, 0, 3, 0);
protected void reinstallDefaults() { if (_layout != null) { if (_defaultButtonGap == _layout.getButtonGap()) { _defaultButtonGap = UIDefaultsLookup.getInt("ButtonPanel.buttonGap"); _layout.setButtonGap(_defaultButtonGap); } if (_defaultGroupGap == _layout.getGroupGap()) { _defaultGroupGap = UIDefaultsLookup.getInt("ButtonPanel.groupGap"); _layout.setGroupGap(_defaultGroupGap); } if (_defaultOrder.equals(_layout.getButtonOrder())) { _defaultOrder = UIDefaultsLookup.getString("ButtonPanel.order"); _layout.setButtonOrder(_defaultOrder); } if (_defaultOppositeOrder.equals(_layout.getOppositeButtonOrder())) { _defaultOppositeOrder = UIDefaultsLookup.getString("ButtonPanel.oppositeOrder"); _layout.setOppositeButtonOrder(_defaultOppositeOrder); } if (_defaultButtonWidth == _layout.getMinButtonWidth()) { _defaultButtonWidth = UIDefaultsLookup.getInt("ButtonPanel.minButtonWidth"); _layout.setMinButtonWidth(_defaultButtonWidth); } } }
rect.x++; rect.y++; JideSwingUtilities.drawGrip(g, rect, 9, UIDefaultsLookup.getInt("JideSplitPane.dividerSize") / 3);
@Override protected Container createButtonArea() { int orientation = UIDefaultsLookup.getInt("OptionPane.buttonOrientation"); orientation = orientation == 0 ? SwingConstants.CENTER : orientation; ButtonPanel buttonPanel = new ButtonPanel(orientation); Border border = (Border) UIDefaultsLookup.get("OptionPane.buttonAreaBorder"); buttonPanel.setName("OptionPane.buttonArea"); if (border != null) { buttonPanel.setBorder(border); } boolean sameSize = UIDefaultsLookup.getBoolean("OptionPane.sameSizeButtons"); buttonPanel.setSizeConstraint(sameSize ? ButtonPanel.SAME_SIZE : ButtonPanel.NO_LESS_THAN); int padding = UIDefaultsLookup.getInt("OptionPane.buttonPadding"); padding = padding == 0 ? 6 : padding; buttonPanel.setButtonGap(padding); addButtonComponents(buttonPanel, getButtons(), getInitialValueIndex()); return buttonPanel; }
setDividerSize(UIDefaultsLookup.getInt("JideSplitPane.dividerSize"));