Package org.pushingpixels.substance.api
Class SubstanceSkin.ColorSchemes
java.lang.Object
org.pushingpixels.substance.api.SubstanceSkin.ColorSchemes
- Enclosing class:
SubstanceSkin
Contains information on color schemes loaded by the
SubstanceSkin.getColorSchemes(URL)
and
SubstanceSkin.getColorSchemes(String)
APIs. Note that the custom
skins should only use the get(String)
API. The rest of the API
is currently internal and is used in the Jitterbug
visual editor.-
Constructor Summary
ConstructorsConstructorDescriptionCreates an object with empty list of color schemes.ColorSchemes
(List<SubstanceColorScheme> schemes) Creates an object based on the specified list of color schemes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(SubstanceColorScheme scheme) Adds the specified color scheme to the end of the list.void
Deletes the color scheme that has the specified display name.get
(int index) Returns the color scheme at the specified index.Returns the color scheme based on its display name.void
replace
(String displayName, SubstanceColorScheme scheme) Finds the index of the color scheme that has the specified display name and replaces it with (possibly another) color scheme.int
size()
Returns the number of color schemes in this object.void
switchWithNext
(String displayName) Moves the color scheme with the specified display name one position towards the end of the list.void
switchWithPrevious
(String displayName) Moves the color scheme with the specified display name one position towards the beginning of the list.
-
Constructor Details
-
ColorSchemes
public ColorSchemes()Creates an object with empty list of color schemes. This method is for internal use only and should not be used in custom application skins. -
ColorSchemes
Creates an object based on the specified list of color schemes. This method is for internal use only and should not be used in custom application skins.- Parameters:
schemes
- List of color schemes.
-
-
Method Details
-
size
public int size()Returns the number of color schemes in this object. This method is for internal use only and should not be used in custom application skins.- Returns:
- The number of color schemes in this object.
-
get
Returns the color scheme at the specified index. This method is for internal use only and should not be used in custom application skins.- Parameters:
index
- Index.- Returns:
- Color scheme at the specified index.
-
get
Returns the color scheme based on its display name. This method is the only API that is published for use in custom application skins.- Parameters:
displayName
- Display name of a color scheme.- Returns:
- The color scheme with the matching display name.
-
replace
Finds the index of the color scheme that has the specified display name and replaces it with (possibly another) color scheme. This method is for internal use only and should not be used in custom application skins.- Parameters:
displayName
- Display name of a color scheme.scheme
- Color scheme that will replace the existing color scheme (based on the display name) at the same index in the list.
-
delete
Deletes the color scheme that has the specified display name. This method is for internal use only and should not be used in custom application skins.- Parameters:
displayName
- Display name of the color scheme to delete from the list.
-
add
Adds the specified color scheme to the end of the list. This method is for internal use only and should not be used in custom application skins.- Parameters:
scheme
- Color scheme to add to the end of the list.
-
switchWithPrevious
Moves the color scheme with the specified display name one position towards the beginning of the list. This method is for internal use only and should not be used in custom application skins.- Parameters:
displayName
- Display name of the color scheme to move one position towards the beginning of the list.
-
switchWithNext
Moves the color scheme with the specified display name one position towards the end of the list. This method is for internal use only and should not be used in custom application skins.- Parameters:
displayName
- Display name of the color scheme to move one position towards the end of the list.
-