public int getInt(SynthContext context, Object key, int defaultValue) { return style.getInt(context, key, defaultValue); }
setCellLength(style.getInt(context, "ProgressBar.cellLength", 1)); setCellSpacing(style.getInt(context, "ProgressBar.cellSpacing", 0)); progressPadding = style.getInt(context, "ProgressBar.progressPadding", 0); paintOutsideClip = style.getBoolean(context, "ProgressBar.paintOutsideClip", false); rotateText = style.getBoolean(context, "ProgressBar.rotateText", false); tileWhenIndeterminate = style.getBoolean(context, "ProgressBar.tileWhenIndeterminate", false); trackThickness = style.getInt(context, "ProgressBar.trackThickness", 19); tileWidth = style.getInt(context, "ProgressBar.tileWidth", 15); bgFillColor = (Color) style.get(context, "ProgressBar.backgroundFillColor"); if (bgFillColor == null) {
/** * @see javax.swing.plaf.ComponentUI#getPreferredSize(javax.swing.JComponent) */ public Dimension getPreferredSize(JComponent c) { SeaGlassContext context = getContext(c); int thickness = style.getInt(context, "Separator.thickness", 5); Insets insets = c.getInsets(); Dimension size; if (((JSeparator) c).getOrientation() == JSeparator.VERTICAL) { size = new Dimension(insets.left + insets.right + thickness, insets.top + insets.bottom); } else { size = new Dimension(insets.left + insets.right, insets.top + insets.bottom + thickness); } context.dispose(); return size; }
/** * Update the Synth Style. * * @param c the component. */ private void updateStyle(JComponent c) { SeaGlassContext context = getContext(this, ENABLED); SynthStyle oldStyle = style; style = SeaGlassLookAndFeel.updateStyle(context, this); if (style != oldStyle) { titleSpacing = style.getInt(context, "InternalFrameTitlePane.titleSpacing", 2); } context.dispose(); }
/** * Update the Synth Style. * * @param c the title pane. */ private void updateStyle(JComponent c) { SeaGlassContext context = getContext(this, ENABLED); SynthStyle oldStyle = style; style = SeaGlassLookAndFeel.updateSeaglassStyle(context, this); if (style != oldStyle) { titleSpacing = style.getInt(context, "InternalFrameTitlePane.titleSpacing", 2); } context.dispose(); }
cons.anchor = context.getStyle().getInt(context, "OptionPane.messageAnchor", GridBagConstraints.CENTER); context.dispose();
int size = context.getStyle().getInt(context, "ArrowButton.size", 16);
style = SeaGlassLookAndFeel.updateStyle(context, this); if (style != oldStyle) { scrollBarWidth = style.getInt(context, "ScrollBar.thumbHeight", 14); incrGap = style.getInt(context, "ScrollBar.incrementButtonGap", 0); decrGap = style.getInt(context, "ScrollBar.decrementButtonGap", 0); capSize = style.getInt(context, "ScrollBar.capSize", 0);
/** * Returns the amount to shift the text/icon when painting. * * @param state DOCUMENT ME! * * @return DOCUMENT ME! */ protected int getTextShiftOffset(SeaGlassContext state) { AbstractButton button = (AbstractButton) state.getComponent(); ButtonModel model = button.getModel(); if (model.isArmed() && model.isPressed() && button.getPressedIcon() == null) { return state.getStyle().getInt(state, getPropertyPrefix() + "textShiftOffset", 0); } return 0; }
"List.rendererUseUIBorder", true); int height = style.getInt(context, "List.cellHeight", -1); if (height != -1) { list.setFixedCellHeight(height);
return style.getInt(context, key, defaultValue);
setCollapsedIcon(style.getIcon(context, "Tree.collapsedIcon")); setLeftChildIndent(style.getInt(context, "Tree.leftChildIndent", 0)); setRightChildIndent(style.getInt(context, "Tree.rightChildIndent", 0)); LookAndFeel.installProperty(tree, "scrollsOnExpand", value != null ? value : Boolean.TRUE); padding = style.getInt(context, "Tree.padding", 0);
closeButtonSize = style.getInt(context, "closeButtonSize", 6); closeButtonInsets = (Insets) style.get(context, "closeButtonInsets"); if (closeButtonInsets == null) { textIconGap = style.getInt(context, "TabbedPane.textIconGap", 0); selectedTabPadInsets = (Insets) style.get(context, "TabbedPane.selectedTabPadInsets");
if (oldStyle != style) { String prefix = getPropertyPrefix(); defaultTextIconGap = style.getInt(context, prefix + ".textIconGap", 4); if (menuItem.getMargin() == null || (menuItem.getMargin() instanceof UIResource)) { Insets insets = (Insets) style.get(context, prefix + ".margin"); ((JMenu) menuItem).setDelay(style.getInt(context, prefix + ".delay", 200)); if (oldStyle != null) { uninstallKeyboardActions();
/** * @inheritDoc */ @Override protected void installComponents() { optionPane.add(createMessageArea()); Container separator = createSeparator(); if (separator != null) { optionPane.add(separator); SeaGlassContext context = getContext(optionPane, ENABLED); optionPane.add(Box.createVerticalStrut(context.getStyle().getInt(context, "OptionPane.separatorPadding", 6))); context.dispose(); } optionPane.add(createButtonArea()); optionPane.applyComponentOrientation(optionPane.getComponentOrientation()); }
int height = style.getInt(selectedContext, "List.cellHeight", -1); if (height != -1) { list.setFixedCellHeight(height);
int height = style.getInt(selectedContext, "List.cellHeight", -1); if (height != -1) { list.setFixedCellHeight(height);
int height = style.getInt(selectedContext, "List.cellHeight", -1); if (height != -1) { list.setFixedCellHeight(height);
int height = style.getInt(selectedContext, "List.cellHeight", -1); if (height != -1) { list.setFixedCellHeight(height);