/** * Returns the default background color for the components of the specified * class. * * @param toTreatAsTextComponent * if the component is to be colored as a text component. * @param skin * Skin. * @param isDisabled * Indication whether the result should be for disabled * components. * @return The default background color for the components of the specified * class. */ public static ColorUIResource getDefaultBackgroundColor( boolean toTreatAsTextComponent, SubstanceSkin skin, boolean isDisabled) { if (toTreatAsTextComponent || isDisabled) return new ColorUIResource(skin.getEnabledColorScheme( DecorationAreaType.NONE).getTextBackgroundFillColor()); return new ColorUIResource(skin.getEnabledColorScheme( DecorationAreaType.NONE).getBackgroundFillColor()); }
/** * Returns the default background color for the components of the specified * class. * * @param componentClass * Component class. * @param skin * Skin. * @param isDisabled * Indication whether the result should be for disabled * components. * @return The default background color for the components of the specified * class. */ public static ColorUIResource getDefaultBackgroundColor( boolean toTreatAsTextComponent, SubstanceSkin skin, boolean isDisabled) { if (toTreatAsTextComponent || isDisabled) return new ColorUIResource(skin.getEnabledColorScheme( DecorationAreaType.NONE).getTextBackgroundFillColor()); return new ColorUIResource(skin.getEnabledColorScheme( DecorationAreaType.NONE).getBackgroundFillColor()); }
/** * Returns the default background color for the specified component. * * @param comp * Component. * @param compState * Component state. * @return The default background color for the components of the specified * class. */ public static ColorUIResource getDefaultBackgroundColor(Component comp, ComponentState compState) { if (comp instanceof JTextComponent) { // special case for text-based components return new ColorUIResource(SubstanceColorSchemeUtilities .getColorScheme(comp, compState) .getTextBackgroundFillColor()); } return new ColorUIResource(SubstanceLookAndFeel.getCurrentSkin(comp) .getBackgroundColorScheme( SubstanceLookAndFeel.getDecorationType(comp)) .getBackgroundFillColor()); }
/** * Returns the default background color for the specified component. * * @param comp * Component. * @param compState * Component state. * @return The default background color for the components of the specified * class. */ public static ColorUIResource getDefaultBackgroundColor(Component comp, ComponentState compState) { if (comp instanceof JTextComponent) { // special case for text-based components return new ColorUIResource(SubstanceColorSchemeUtilities .getColorScheme(comp, compState) .getTextBackgroundFillColor()); } return new ColorUIResource(SubstanceLookAndFeel.getCurrentSkin(comp) .getBackgroundColorScheme( SubstanceLookAndFeel.getDecorationType(comp)) .getBackgroundFillColor()); }
.getBackgroundFillColor()); Color textBackgroundColor = new ColorUIResource(mainActiveScheme .getTextBackgroundFillColor());
mainEnabledScheme.getBackgroundFillColor()); Color textBackgroundColor = new ColorUIResource( mainActiveScheme.getTextBackgroundFillColor());