|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dacf.style.StyleManager
The
It performs the following tasks.
All attributes and methods of the StyleManager are static. This ensures that there is one and only one instance of the StyleManager running. This also means that you do not need to create a variable for the StyleManager in every class. You import the StyleManager class and use the StyleManager.Method() notation constitantly throughout your application. To instantiate the StyleManger attributes you need to run StyleManager.initialize().
Constructor Summary | |
StyleManager()
|
Method Summary | |
static void |
addDefaultValue(java.lang.Object object)
Adds a default value. |
static void |
addError(java.lang.String message)
convience routine that logs a StyleManager Error to the ErrorManager |
static void |
addStyle(Style style)
Adds a style to the collection of Styles |
static void |
addStylesUserListener(StylesUserListener stylesUserListener)
Adds a Listener that wants to be notified when a Style changes. |
static void |
addWarning(java.lang.String message)
convience routine that logs a StyleManager Warning to the ErrorManager |
static void |
dumpStyles()
|
static void |
editorStopped()
should be called by the editor when it finished editing. |
static java.lang.Object |
getDefaultValue(java.lang.Class cls)
returns a default value. |
static EditModeListener |
getEditModeListener()
Defines a new EditModeListener |
static Style |
getStyle(java.lang.Object component)
Returns the Style that is currently used by the given component |
static Style |
getStyle(java.lang.String key)
Finds a Style that matches a particular key |
static StyleEditor |
getStyleEditor()
|
static Style[] |
getStyles()
Retrieves the Style table as an array. |
static void |
initialize()
Initializes that has to be called, before the StyleManager can be used. |
static void |
initLayers(StyleLayer[] layerSources)
Initialize the Layers that define this style |
static boolean |
isInialized()
Returns 'true' if the StyleManager is initialized. |
static boolean |
isPrivileged()
Returns 'true' if the StyleManager is in privileged mode. |
static boolean |
removeStyle(Style style)
Removes a style from the collection of Styles |
static void |
removeStylesUserListener(StylesUserListener stylesUserListener)
Removes a Listener that wants to be notified when a Style changes. |
static void |
resetInitialized()
routine to set the Initialized status of the styleManager to false. |
static void |
saveStyles()
Saves the current Styles table and the Default Style definitions. |
static void |
setEditable(boolean mode)
Sets the editable mode. |
static void |
setPrivileged(boolean prv)
Sets the Stylemanager's privileged mode. |
static void |
setStyle(java.lang.String styleName,
java.lang.Object component)
Style is linked to a component |
static void |
setStyleEditor(StyleEditor styleEditor)
|
static void |
startStyleEditor(java.awt.Component component)
Starts the StyleEditor of that matches the Style of a particular component |
void |
StyleManager()
|
static void |
updateStyle(Style style,
StyleElement[] styleElements)
Updates a Style |
static void |
updateStyleOverwrite(Style style,
java.awt.Component component,
StyleElement[] styleElements)
Updates a Style Overwrites for a specific component |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StyleManager()
Method Detail |
public void StyleManager()
public static void initialize() throws StyleIOException
StyleIOException
- thrown when initialization failspublic static void saveStyles() throws StyleIOException
StyleIOException
- thrown when initialization failspublic static Style getStyle(java.lang.String key)
key
- the Style name you want to look for
public static Style getStyle(java.lang.Object component)
component
- the component you are querying
public static void addStyle(Style style)
style
- the style you want to addpublic static boolean removeStyle(Style style)
style
- the style you want to remove
public static void updateStyle(Style style, StyleElement[] styleElements)
style
- the style you want to updatepublic static void updateStyleOverwrite(Style style, java.awt.Component component, StyleElement[] styleElements)
style
- the style you want to updatecomponent
- the component which override values need updatingpublic static void addStylesUserListener(StylesUserListener stylesUserListener)
stylesUserListener
- the listenerpublic static void removeStylesUserListener(StylesUserListener stylesUserListener)
stylesUserListener
- the listenerpublic static boolean isInialized()
public static boolean isPrivileged()
public static void setPrivileged(boolean prv)
prv
- boolean that indicates the new privileged modepublic static void setStyle(java.lang.String styleName, java.lang.Object component)
component
- the component that want to register for this Stylepublic static void setEditable(boolean mode)
mode
- boolean that indicates editable mode or notpublic static EditModeListener getEditModeListener()
public static void startStyleEditor(java.awt.Component component)
component
- the component that the user wants to editpublic static void editorStopped()
public static void setStyleEditor(StyleEditor styleEditor)
public static StyleEditor getStyleEditor()
public static Style[] getStyles()
public static void addDefaultValue(java.lang.Object object)
object
- the object you want to use as a default value definition.public static java.lang.Object getDefaultValue(java.lang.Class cls)
cls
- the class you want a default value for.public static void resetInitialized()
public static void initLayers(StyleLayer[] layerSources)
layerSources
- the layer. The only type currently
supported is java.io.Filepublic static void addError(java.lang.String message)
message
- the error messagepublic static void addWarning(java.lang.String message)
message
- the warning messagepublic static void dumpStyles()
|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2003, Oracle. All rights reserved.