|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.plaf.metal.MetalTheme
net.beeger.squareness.theme.SquarenessTheme
net.beeger.squareness.theme.PropertiesSquarenessTheme
public class PropertiesSquarenessTheme
This SquarenessTheme implementation can be configured from some sort of property bundle - be it a resource bundle, a properties object or a properties file.
A file matching the original Squareness theme would look like this:
themeName = Original
desktopColor = 234, 216, 164
windowBackgroundColor = 247,242,225
inactiveWindowBorderColor = 184,175,119
normalBorderColor = 34, 57, 73
disabledBorderColor = 134, 144, 150
defaultButtonBorderColor = 170,59,34
normalControlBackgroundColor = 219,196,99
selectedControlBackgroundColor = 211, 211, 42
selectedControlBackgroundShadowColor = 163,159,28
progressBarBackgroundColor = 245,246,220
pressedScrollBarTrackBackgroundColor = 237,225,185
textInputBackgroundColor = 255,255,255
textColor = 0,0,0
Note: The colors are defined in RGB format r,g,b where r, g and b define the red, green and blue components of the color. Each of those must be in the range from 0 to 255.
| Nested Class Summary | |
|---|---|
static class |
PropertiesSquarenessTheme.LoadException
|
| Constructor Summary | |
|---|---|
PropertiesSquarenessTheme(java.io.File propertiesFile)
|
|
PropertiesSquarenessTheme(java.util.Properties properties)
|
|
PropertiesSquarenessTheme(java.util.ResourceBundle resourceBundle)
|
|
| Method Summary | |
|---|---|
javax.swing.plaf.ColorUIResource |
getDefaultButtonBorderColor()
Return the default button border color. |
javax.swing.plaf.ColorUIResource |
getDesktopColor()
Return the desktop color. |
javax.swing.plaf.ColorUIResource |
getDisabledBorderColor()
Return the disabled border color. |
javax.swing.plaf.ColorUIResource |
getInactiveWindowBorderColor()
Return the inactive window border color. |
java.lang.String |
getName()
Return the name of the theme. |
javax.swing.plaf.ColorUIResource |
getNormalBorderColor()
Return the normal border color. |
javax.swing.plaf.ColorUIResource |
getNormalControlBackgroundColor()
Return the normal control background color. |
javax.swing.plaf.ColorUIResource |
getPressedScrollBarTrackBackgroundColor()
Return the pressed scroll bar track background color. |
javax.swing.plaf.ColorUIResource |
getProgressBarBackgroundColor()
Return the progress bar background color. |
javax.swing.plaf.ColorUIResource |
getSelectedControlBackgroundColor()
Return the selected control background color. |
javax.swing.plaf.ColorUIResource |
getSelectedControlBackgroundShadowColor()
Return the selected control background shadow color. |
javax.swing.plaf.ColorUIResource |
getTextColor()
Return the text color. |
javax.swing.plaf.ColorUIResource |
getTextInputBackgroundColor()
Return the text input background color. |
javax.swing.plaf.ColorUIResource |
getWindowBackgroundColor()
Return the window background color. |
boolean |
isDark()
Is this theme a dark theme. The information whether a theme is dark can be useful for component plugin writers needing to come up with new colors that fit into the theme. |
| Methods inherited from class net.beeger.squareness.theme.SquarenessTheme |
|---|
getControlTextFont, getMenuTextFont, getSubTextFont, getSystemTextFont, getUserTextFont, getWindowTitleFont |
| Methods inherited from class javax.swing.plaf.metal.MetalTheme |
|---|
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesSquarenessTheme(java.io.File propertiesFile)
throws PropertiesSquarenessTheme.LoadException
PropertiesSquarenessTheme.LoadException
public PropertiesSquarenessTheme(java.util.Properties properties)
throws PropertiesSquarenessTheme.LoadException
PropertiesSquarenessTheme.LoadException
public PropertiesSquarenessTheme(java.util.ResourceBundle resourceBundle)
throws PropertiesSquarenessTheme.LoadException
PropertiesSquarenessTheme.LoadException| Method Detail |
|---|
public java.lang.String getName()
getName in class javax.swing.plaf.metal.MetalThemepublic javax.swing.plaf.ColorUIResource getDesktopColor()
SquarenessThemeReturn the desktop color.
This color is used as the background color of desktop panes.
getDesktopColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getWindowBackgroundColor()
SquarenessThemeReturn the window background color.
This color is used as the background color of windows of all sorts.
getWindowBackgroundColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getInactiveWindowBorderColor()
SquarenessThemeReturn the inactive window border color.
This color is used for the border of inactive frames.
getInactiveWindowBorderColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getNormalBorderColor()
SquarenessThemeReturn the normal border color.
This color is used for borders of all sorts: control borders, window, menu etc. borders.
getNormalBorderColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getDisabledBorderColor()
SquarenessThemeReturn the disabled border color.
This color is used for borders of all sorts where the component to which the border is applied is disabled.
getDisabledBorderColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getDefaultButtonBorderColor()
SquarenessThemeReturn the default button border color.
This color is used for the border of default buttons.
getDefaultButtonBorderColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getNormalControlBackgroundColor()
SquarenessThemeReturn the normal control background color.
This color is used for the background of normal unselected and not disabled controls such as buttons and scroll bar thumbs
getNormalControlBackgroundColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getSelectedControlBackgroundColor()
SquarenessThemeReturn the selected control background color.
This color is used for the background of selected controls and controls over which the mouse pointer hovers.
getSelectedControlBackgroundColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getSelectedControlBackgroundShadowColor()
SquarenessThemeReturn the selected control background shadow color.
This color is used for the shadow in the background of selected controls.
getSelectedControlBackgroundShadowColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getProgressBarBackgroundColor()
SquarenessThemeReturn the progress bar background color.
This color is used for the background of progress bars and for the tracks of scroll bars.
getProgressBarBackgroundColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getPressedScrollBarTrackBackgroundColor()
SquarenessThemeReturn the pressed scroll bar track background color.
This color is used for the background of scroll bar tracks when the track is pressed (i.e. you clicked the left mouse button while the mouse pointer was over the track have not released it yet.).
getPressedScrollBarTrackBackgroundColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getTextInputBackgroundColor()
SquarenessThemeReturn the text input background color.
This color is used for the background of controls where text can be typed in (text fields, text areas etc.)
getTextInputBackgroundColor in class SquarenessThemepublic javax.swing.plaf.ColorUIResource getTextColor()
SquarenessThemeReturn the text color.
All text - no matter where it is printed on - is printed in this color.)
getTextColor in class SquarenessThemepublic boolean isDark()
SquarenessTheme
isDark in class SquarenessTheme
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||