Package snap.view
Class ViewTheme
java.lang.Object
snap.view.ViewTheme
A class to provide view area classes to define UI look.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ButtonPainter
Creates the button painter.static ViewTheme
get()
Returns the current theme.Returns the background fill.Returns the button border color.Returns the button border pressed color.Returns the button color.Returns the button over color.Returns the button painter.Returns the button pressed color.static ViewTheme
Returns the classic theme.Returns the color for alternate content, like list area alternate rows.Returns the border for distinct content areas like Scrollview, Splitview, TableView, TreeView.Returns the color for content like text fields, text areas, list areas.static ViewTheme
getDark()
Returns the dark theme.Returns the fill for gutter areas like scrollbar background or tabview button bar background.static ViewTheme
getLight()
Returns the light theme.Returns the selection color.Returns the targeted color.Returns the text color.Returns the text color when in selected item.Returns the text color when in targeted item.getViewStyleForClass
(Class<? extends View> viewClass) Returns the ViewStyle for given class.protected void
Initialize colors.protected void
Initialize ViewStyles.static void
Sets the theme.static void
setThemeForName
(String aName) Sets the theme to theme for given name.protected void
setThemeStyleDefaultsForViewAndOldTheme
(View aView, ViewTheme oldTheme) Sets the style property values for given view if they were previously set to default of given old theme.void
setViewStylePropValue
(Class<? extends View> viewClass, String propName, Object aValue) Sets a View property value for given class, property name and value.
-
Field Details
-
BACK_FILL
-
GUTTER_FILL
-
CONTENT_COLOR
-
CONTENT_ALT_COLOR
-
SEL_FILL
-
TARG_FILL
-
TEXT_COLOR
-
TEXT_SEL_COLOR
-
TEXT_TARG_COLOR
-
BUTTON_COLOR
-
BUTTON_OVER_COLOR
-
BUTTON_PRESSED_COLOR
-
BUTTON_BORDER_COLOR
-
BUTTON_BORDER_PRESSED_COLOR
-
CONTENT_BORDER
-
-
Constructor Details
-
ViewTheme
public ViewTheme()Constructor.
-
-
Method Details
-
initColors
protected void initColors()Initialize colors. -
getBackFill
Returns the background fill. -
getGutterFill
Returns the fill for gutter areas like scrollbar background or tabview button bar background. -
getContentColor
Returns the color for content like text fields, text areas, list areas. -
getContentAltColor
Returns the color for alternate content, like list area alternate rows. -
getSelectedFill
Returns the selection color. -
getTargetedFill
Returns the targeted color. -
getTextColor
Returns the text color. -
getTextSelectedColor
Returns the text color when in selected item. -
getTextTargetedColor
Returns the text color when in targeted item. -
getButtonColor
Returns the button color. -
getButtonOverColor
Returns the button over color. -
getButtonPressedColor
Returns the button pressed color. -
getButtonBorderColor
Returns the button border color. -
getButtonBorderPressedColor
Returns the button border pressed color. -
getContentBorder
Returns the border for distinct content areas like Scrollview, Splitview, TableView, TreeView. -
getButtonPainter
Returns the button painter. -
createButtonPainter
Creates the button painter. -
initViewStyles
protected void initViewStyles()Initialize ViewStyles. -
getViewStyleForClass
Returns the ViewStyle for given class. -
setViewStylePropValue
Sets a View property value for given class, property name and value. -
get
Returns the current theme. -
getLight
Returns the light theme. -
getDark
Returns the dark theme. -
getClassic
Returns the classic theme. -
setThemeStyleDefaultsForViewAndOldTheme
Sets the style property values for given view if they were previously set to default of given old theme. -
setThemeForName
Sets the theme to theme for given name. -
setTheme
Sets the theme.
-