/** * Returns the shorter dimension of the track. * * @return Shorter dimension of the track. */ protected int getTrackWidth() { return SubstanceSizeUtils.getSliderTrackSize(SubstanceSizeUtils .getComponentFontSize(this.slider)); }
public Icon getColorSchemeIcon( SubstanceColorScheme scheme) { return SubstanceImageCreator .getDoubleArrowIconDelta(SubstanceSizeUtils .getComponentFontSize(group), 0, 3, 0, SwingConstants.NORTH, scheme); } }, colorSchemeAssociationDelegate,
public Insets getBorderInsets(Component c) { float borderStrokeWidth = SubstanceSizeUtils .getBorderStrokeWidth(SubstanceSizeUtils .getComponentFontSize(c)); int prefSize = (int) (Math.ceil(2.0 * borderStrokeWidth)); return new Insets(prefSize, prefSize, prefSize, prefSize); } }
@Override public Icon getColorSchemeIcon(SubstanceColorScheme scheme) { int fontSize = SubstanceSizeUtils .getComponentFontSize(component); return SubstanceImageCreator.getArrowIcon(fontSize, orientation, scheme); } };
public Icon getColorSchemeIcon(SubstanceColorScheme scheme) { // fix for defect 279 - tab pane might not yet have the // font installed. int fontSize = SubstanceSizeUtils .getComponentFontSize(tabPane); return SubstanceImageCreator.getArrowIcon(fontSize, direction, scheme); } }, "substance.tabbedpane.scroll." + direction);
@Override public Dimension getPreferredHorizontalSize() { return new Dimension(SubstanceSizeUtils.getAdjustedSize( SubstanceSizeUtils.getComponentFontSize(this.slider), 200, 1, 20, false), 21); }
@Override protected int getTickLength() { return SubstanceSizeUtils.getSliderTickSize(SubstanceSizeUtils .getComponentFontSize(this.slider)); }
@Override public Dimension getPreferredHorizontalSize() { return new Dimension(SubstanceSizeUtils.getAdjustedSize( SubstanceSizeUtils.getComponentFontSize(this.slider), 200, 1, 20, false), 21); }
@Override public Insets getBorderInsets(Component c) { float borderStrokeWidth = SubstanceSizeUtils .getBorderStrokeWidth(SubstanceSizeUtils .getComponentFontSize(c)); int ins = (int) borderStrokeWidth; return new Insets(ins, ins, ins, ins); }
@Override public void paintFocus(Graphics g) { SubstanceCoreUtilities.paintFocus(g, this.slider, this.slider, this, null, null, 1.0f, (int) Math.ceil(SubstanceSizeUtils .getFocusStrokeWidth(SubstanceSizeUtils .getComponentFontSize(this.slider))) / 2); }
@Override protected Dimension getPreferredInnerHorizontal() { int size = SubstanceSizeUtils.getComponentFontSize(this.progressBar); size += 2 * SubstanceSizeUtils.getAdjustedSize(size, 1, 4, 1, false); return new Dimension(146 + SubstanceSizeUtils.getAdjustedSize(size, 0, 1, 10, false), size); }
@Override protected int getTitleHeight(Component c) { return SubstanceSizeUtils.getAdjustedSize(SubstanceSizeUtils .getComponentFontSize(c), super.getTitleHeight(c), 2, 3, false); } }
@Override protected void installDefaults() { super.installDefaults(); if (this.checkIcon == null || this.checkIcon instanceof UIResource) { this.checkIcon = new RadioButtonMenuItemIcon(this.menuItem, SubstanceSizeUtils.getMenuCheckMarkSize(SubstanceSizeUtils .getComponentFontSize(this.menuItem))); } this.defaultTextIconGap = SubstanceSizeUtils .getTextIconGap(SubstanceSizeUtils .getComponentFontSize(this.menuItem)); }
@Override protected void installDefaults() { super.installDefaults(); if (this.checkIcon == null || this.checkIcon instanceof UIResource) { this.checkIcon = new RadioButtonMenuItemIcon(this.menuItem, SubstanceSizeUtils.getMenuCheckMarkSize(SubstanceSizeUtils .getComponentFontSize(this.menuItem))); } this.defaultTextIconGap = SubstanceSizeUtils .getTextIconGap(SubstanceSizeUtils .getComponentFontSize(this.menuItem)); }
@Override protected void installDefaults() { super.installDefaults(); this.defaultTextIconGap = SubstanceSizeUtils .getTextIconGap(SubstanceSizeUtils .getComponentFontSize(this.menuItem)); }
@Override protected void installDefaults() { super.installDefaults(); this.scrollBarWidth = SubstanceSizeUtils .getScrollBarWidth(SubstanceSizeUtils .getComponentFontSize(this.scrollbar)); }
@Override public boolean isInside(MouseEvent me) { if (!SubstanceLookAndFeel.isCurrentLookAndFeel()) { return false; } Shape contour = SubstanceOutlineUtilities.getBaseOutline( this.textField, 2.0f * SubstanceSizeUtils .getClassicButtonCornerRadius(SubstanceSizeUtils .getComponentFontSize(this.textField)), null); return contour.contains(me.getPoint()); }
@Override public boolean isInside(MouseEvent me) { if (!SubstanceLookAndFeel.isCurrentLookAndFeel()) { return false; } Shape contour = SubstanceOutlineUtilities.getBaseOutline( this.passwordField, 2.0f * SubstanceSizeUtils .getClassicButtonCornerRadius(SubstanceSizeUtils .getComponentFontSize(this.passwordField)), null); return contour.contains(me.getPoint()); }
public static Icon getTreeIcon(JTree tree, boolean isCollapsed) { int fontSize = SubstanceSizeUtils.getComponentFontSize(tree); int size = SubstanceSizeUtils.getTreeIconSize(fontSize); HashMapKey key = SubstanceCoreUtilities.getHashKey(size, isCollapsed); if (SubstanceIconFactory.treeIcons.get(key) == null) { Icon icon = new TreeIcon(size, isCollapsed); SubstanceIconFactory.treeIcons.put(key, icon); } return SubstanceIconFactory.treeIcons.get(key); }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); button.setRolloverEnabled(true); Border border = b.getBorder(); if (border == null || border instanceof UIResource) { b.setBorder(SubstanceSizeUtils.getCheckBoxBorder(SubstanceSizeUtils .getComponentFontSize(b), b.getComponentOrientation() .isLeftToRight())); } }