@Override public FontSet getFontSet(String lafName, UIDefaults table) { FontPolicy customPolicy = getCustomPolicy(lafName); if (customPolicy != null) { return customPolicy.getFontSet(null, table); } FontSet customFontSet = getCustomFontSet(lafName); if (customFontSet != null) { return customFontSet; } return wrappedPolicy.getFontSet(lafName, table); } }
public FontSet getFontSet(String lafName, UIDefaults table) { FontPolicy customPolicy = getCustomPolicy(lafName); if (customPolicy != null) { return customPolicy.getFontSet(null, table); } FontSet customFontSet = getCustomFontSet(lafName); if (customFontSet != null) { return customFontSet; } return wrappedPolicy.getFontSet(lafName, table); } }
public FontSet getFontSet(String lafName, UIDefaults table) { FontSet baseResult = fontPolicy.getFontSet(lafName, table); FontSet substanceFontSet = new SubstanceFontSet(baseResult); return substanceFontSet; } };
@Override public FontSet getFontSet(String lafName, UIDefaults table) { FontSet baseResult = fontPolicy.getFontSet(lafName, table); FontSet substanceFontSet = new SubstanceFontSet(baseResult); return substanceFontSet; } };
/** * Returns scaled platform-specific font policy. * * @param scaleFactor * Scale factor. Should be positive. * @return Scaled platform-specific font policy. */ public static FontPolicy getScaledFontPolicy(final float scaleFactor) { final FontSet substanceCoreFontSet = SubstanceFontUtilities .getDefaultFontPolicy().getFontSet("Substance", null); // Create the scaled font set FontPolicy newFontPolicy = new FontPolicy() { public FontSet getFontSet(String lafName, UIDefaults table) { return new ScaledFontSet(substanceCoreFontSet, scaleFactor); } }; return newFontPolicy; } }
/** * Returns scaled platform-specific font policy. * * @param scaleFactor * Scale factor. Should be positive. * @return Scaled platform-specific font policy. */ public static FontPolicy getScaledFontPolicy(final float scaleFactor) { final FontSet substanceCoreFontSet = SubstanceFontUtilities .getDefaultFontPolicy().getFontSet("Substance", null); // Create the scaled font set FontPolicy newFontPolicy = new FontPolicy() { @Override public FontSet getFontSet(String lafName, UIDefaults table) { return new ScaledFontSet(substanceCoreFontSet, scaleFactor); } }; return newFontPolicy; } }
/** * Looks up the correct control font and sets it for all controls. * * @param table * The UI defaults table. */ private void initFontDefaults(UIDefaults table) { FontSet substanceFontSet = getFontPolicy() .getFontSet("Substance", null); initFontDefaults(table, substanceFontSet); }
/** * Looks up the correct control font and sets it for all controls. * * @param table * The UI defaults table. */ private void initFontDefaults(UIDefaults table) { FontSet substanceFontSet = getFontPolicy() .getFontSet("Substance", null); initFontDefaults(table, substanceFontSet); }
/** * Gets the current control font size. * * @return Control font size. */ public static int getControlFontSize() { if (controlFontSize > 0) return controlFontSize; FontPolicy fPolicy = SubstanceLookAndFeel.getFontPolicy(); FontSet fSet = fPolicy.getFontSet("Substance", null); controlFontSize = fSet.getControlFont().getSize(); return controlFontSize; }
/** * Gets the current control font size. * * @return Control font size. */ public static int getControlFontSize() { if (controlFontSize > 0) return controlFontSize; FontPolicy fPolicy = SubstanceLookAndFeel.getFontPolicy(); FontSet fSet = fPolicy.getFontSet("Substance", null); controlFontSize = fSet.getControlFont().getSize(); return controlFontSize; }
.getFontSet("Substance", null); Font controlFont = substanceFontSet.getControlFont();
.getFontPolicy().getFontSet("Substance", null)); newSkin.addCustomEntriesToTable(lafDefaults); SubstanceLookAndFeel.componentPlugins
.getFontSet("Substance", null); Font controlFont = substanceFontSet.getControlFont();
@Override protected void installDefaults(JSlider slider) { super.installDefaults(slider); Font f = slider.getFont(); if (f == null || f instanceof UIResource) { slider.setFont(new FontUIResource(SubstanceLookAndFeel .getFontPolicy().getFontSet("Substance", null) .getControlFont())); } int size = SubstanceSizeUtils.getSliderIconSize(SubstanceSizeUtils .getComponentFontSize(slider)); // System.out.println("Slider size : " + size); this.horizontalIcon = SubstanceIconFactory.getSliderHorizontalIcon( size, false); this.roundIcon = SubstanceIconFactory.getSliderRoundIcon(size); this.verticalIcon = SubstanceIconFactory.getSliderVerticalIcon(size, false); int focusIns = (int) Math.ceil(2.0 * SubstanceSizeUtils .getFocusStrokeWidth(SubstanceSizeUtils .getComponentFontSize(slider))); this.focusInsets = new Insets(focusIns, focusIns, focusIns, focusIns); }
@Override protected void installDefaults(JSlider slider) { super.installDefaults(slider); Font f = slider.getFont(); if (f == null || f instanceof UIResource) { slider.setFont(new FontUIResource(SubstanceLookAndFeel .getFontPolicy().getFontSet("Substance", null) .getControlFont())); } int size = SubstanceSizeUtils.getSliderIconSize(SubstanceSizeUtils .getComponentFontSize(slider)); // System.out.println("Slider size : " + size); this.horizontalIcon = SubstanceIconFactory.getSliderHorizontalIcon( size, false); this.roundIcon = SubstanceIconFactory.getSliderRoundIcon(size); this.verticalIcon = SubstanceIconFactory.getSliderVerticalIcon(size, false); int focusIns = (int) Math.ceil(2.0 * SubstanceSizeUtils .getFocusStrokeWidth(SubstanceSizeUtils .getComponentFontSize(slider))); this.focusInsets = new Insets(focusIns, focusIns, focusIns, focusIns); }
Font font = SubstanceLookAndFeel.getFontPolicy().getFontSet( "Substance", null).getWindowTitleFont(); graphics.setFont(font);
Font font = SubstanceLookAndFeel.getFontPolicy().getFontSet( "Substance", null).getWindowTitleFont(); graphics.setFont(font);
SubstanceLookAndFeel.getFontPolicy().getFontSet( "Substance", null)); newSkin.addCustomEntriesToTable(UIManager
highlightColorScheme.getSelectionForegroundColor()); FontSet fontSet = SubstanceLookAndFeel.getFontPolicy().getFontSet( "Substance", null);