|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.style.style_manager
This class provides overall management for styles. Currently this only involves support for registering resource names and mapping registered names to resource designators. (Later we expect to add support for loading new styles, looking up styles by name, etc. This is a static class (has all static methods and instance variables) and is never instantiated.
Field Summary | |
protected static style |
_current_style
The currently active global style. |
protected static java.util.Hashtable |
_desig_table
Search table for resource designators (indexed by name string). |
protected static style |
_interactor_resources
The style used to store fallback resources for interactors not in the standard library. |
protected static style |
_root_style
The root style that all (regular) styles directly or indirectly inherit from. |
protected static style |
_standard_library_resources
The style used to store fallback resources for interactors in the standard library. |
protected static java.util.Hashtable |
_style_table
Search table for styles. |
static java.lang.String |
default_not_found_mess
Default error message for unregistered resource designator names |
Constructor Summary | |
style_manager()
|
Method Summary | |
static style |
current_style()
The currently active global style. |
static style_resource_desig |
desig_for(java.lang.String name)
Look up a previously registered resource designator by name. |
static style_resource_desig |
desig_for(java.lang.String name,
java.lang.String message)
Look up a previously registered resource designator by name. |
static style |
find_style(java.lang.String with_name)
Retreive a registered style by name. |
static style |
interactor_resources()
The style used to store fallback resources for interactors in the standard library. |
static style_resource_desig |
lookup_desig(java.lang.String name)
Look up a previously registered style resource designator by name. |
static void |
register_desig(style_resource_desig the_desig)
Register a new resource designator. |
static void |
register_style(style styl)
Register a style for later lookup by name. |
static void |
remove_style(java.lang.String with_name)
rEMOve a registered style form the style table. |
static style |
root_style()
The root style that all (regular) styles directly or indirectly inherit from. |
static void |
set_current_style(style new_style)
Set the currently active global style. |
protected static void |
setup_blank_names()
Register standard blank names. |
protected static void |
setup_standard_names()
Register standard resource names. |
protected static void |
setup_standard_styles()
Register standard styles. |
static style |
standard_library_resources()
The style used to store fallback resources for interactors in the standard library. |
static style_resource_desig |
temp_desig_for(java.lang.String name)
Lookup a resource designator by name, creating a "temporary" designator if none exists. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static java.util.Hashtable _desig_table
public static final java.lang.String default_not_found_mess
protected static java.util.Hashtable _style_table
protected static style _root_style
protected static style _standard_library_resources
protected static style _interactor_resources
protected static style _current_style
Constructor Detail |
public style_manager()
Method Detail |
public static void register_desig(style_resource_desig the_desig)
style_resource_desig
- the_desig the designator to be registered.public static style_resource_desig lookup_desig(java.lang.String name)
String
- name the name of the designator we are looking for.desig_for(java.lang.String, java.lang.String)
public static style_resource_desig desig_for(java.lang.String name, java.lang.String message)
String
- name the name of the designator we are looking for.String
- message error message for potential not-found error. The
sequence "(\"" + name + "\")" is appended to this
message before it is thrown.public static style_resource_desig desig_for(java.lang.String name)
String
- name the name of the designator we are looking for.public static style_resource_desig temp_desig_for(java.lang.String name)
String
- name the name of the designator we are looking for.public static style find_style(java.lang.String with_name)
String
- with_name the name of the style we are looking for.public static void register_style(style styl)
String
- name the name the style is to be registered understyle
- styl the style being registeredpublic static void remove_style(java.lang.String with_name)
String
- with_name name of style to be unregistered.public static style root_style()
public static style standard_library_resources()
public static style interactor_resources()
protected static void setup_standard_names()
setup_blank_names()
protected static void setup_blank_names()
#register_standard_names
protected static void setup_standard_styles()
Note: that #root_style actually inherits from both #standard_library_resources and #interactor_resources. While this is a bit unusual for a "root", this arrangement allows interactors to place resources in a fallback position, so that they will normally be overrriden in regular classes, but are always there just in case the current class has omitted something they need to operate properly. Basically, these represent "deep fallback" resources that will guarentee an interactor class can operate no matter what the current style does.
public static style current_style()
public static void set_current_style(style new_style)
style
- new_style the new current style
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |