|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.style.style_resource_desig
This class provides a style resource designator. This provides a name for a resource along with a link to a chain of fallback resources that can be substituted if this one is missing. Resource designators are registerd with, and managed by, the style_manager. The system provides a series of standard designators (which the manager itself registers). In addition, each style that provides non-standard resources is responsible for registering a designator and a fallback chain (ending at a standard designator) for each such resource. In addition, each interactor which uses non-standard resources must register a designator and fallback chain for each such resource.
In order to help avoid name conflicts conventions following the Java package naming conventions are used for constructing resource names. In particular, all non-standard resource names should be of the form: package.class:resource_name:variant where package and class refer to the class "owning" the name, resource_name describes what the resource is or is used for, and finally variant indicates one of several related resources. Standard resource names provided by the system are constructed with the special package name "#std". As an example: some of the resources for a button are:
Field Summary | |
protected style_resource_desig |
_fallback_desig
Link to the first designator in the fallback chain for this designator. |
protected java.lang.String |
_name
Name for this designator. |
Constructor Summary | |
style_resource_desig(java.lang.String res_name)
Constructor for null fallback. |
|
style_resource_desig(java.lang.String[] name_and_fallbacks)
String based constructor. |
|
style_resource_desig(java.lang.String name,
java.lang.String fallback)
String based constructor for special case of only one fallback. |
|
style_resource_desig(java.lang.String res_name,
style_resource_desig fallbk)
Raw constructor. |
Method Summary | |
protected static style_resource_desig |
build_fallback_chain(int indx,
java.lang.String[] names)
Build and return a fallback chain from the names in the given array starting at the given index. |
style_resource_desig |
fallback_desig()
Link to the first designator in the fallback chain for this designator. |
int |
hashCode()
Provide a hash code for this object based on its name string. |
java.lang.String |
name()
Name for this designator. |
void |
set_fallback_desig(style_resource_desig fb_link)
Set the link to the first designator in the fallback chain for this designator. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.String _name
protected style_resource_desig _fallback_desig
Constructor Detail |
public style_resource_desig(java.lang.String res_name, style_resource_desig fallbk)
public style_resource_desig(java.lang.String res_name)
public style_resource_desig(java.lang.String[] name_and_fallbacks)
String[]
- name_and_fallbacks Array with the name of this designator
in position 0, and the names of
fallback designators in the remaining
positions.public style_resource_desig(java.lang.String name, java.lang.String fallback)
This constructor the named designator, and registers it with the style manager. If a designator by the same name has already been registered and it has a non-null fallback (indicating it was not a temporary registration by someone else) an error is thrown.
String
- name name of this designatorString
- fallback name of fallback designatorMethod Detail |
public java.lang.String name()
public int hashCode()
public style_resource_desig fallback_desig()
public void set_fallback_desig(style_resource_desig fb_link)
protected static style_resource_desig build_fallback_chain(int indx, java.lang.String[] names)
int
- indx index of the first name to build this chain with.String[]
- names array of designator names along the fallback path.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |