sub_arctic.style
Class style

java.lang.Object
  |
  +--sub_arctic.style.style

public class style
extends java.lang.Object

This class provides the implementation for a style. Styles provide sets of resources such as images, colors, fonts, etc. that can be used in implementing the appearance (and in some cases behavior) of interactors. The resources of a style are normally designed to work together to create a uniform appearance for interactors that provides some particular "look" to the interface.

Style objects provide four categories of functionallity:

Style Creation and Manipulation
Styles support a series of named resources. Several different constructors are provided for creating styles and initializing them with resources, and routines are provided for adding and removing resources from a style. In addition, styles are placed in an inheritance structure which allows them to be constructed on the basis of other styles. Each style may designate one or more super-styles from which it is constructed. If a resource is not provided directly by a style, the system will automatically look for it in the super-styles. This makes it easy to make small extensions or modifications to existing styles, and provides a convenient mechanism for support style independent system defaults for some resources.

Resource Lookup Once a style has been populated with a set of resources, interactor objects will access those resources in order to build thier appearances. Interactors access style resources by name. Names are style independent and represent a functional category of resource (such as the font for displaying labels, the set of images needed for the "up" button on a slider, or a method for constructing labelled button images).

All resource names are registered in advance with the style system manager (for efficiency, registered names are represented internally by "resource designators"; see style_resource_desig). Since a name represents a functional category of resource, names can also provide "fallbacks". A fallback represents a more general category of resource that may be substituted if a particular style doesn't have the particular resource needed. So for example, if an interactor needs a "lefthanded_knoby" image and a particular style doesn't provide those, it may provide a "knoby" image instead (assuming "knoby" has been designated as the fallback for "lefthanded_knoby"). In general, fallbacks form chains of less and less specific resources. The system provides a range of standard resource names that most or all styles provide resoruces for. A well designed interactor will either use standard resources, or when non-standard resources are required, will provide fallback chain that includes a standard resource. In this way interactors can be assured of working regardless of the style currently in effect.

During resource lookup, a style will first attempt to fill a request with a resource that exactly matches the name requested. If no such resource can be found (locally or within super-styles), then fallback resources are considered. In general the style will supply a resource with the most closely matching name to the one requested (where "closely" is defined by the declared fallbacks). Only if no resource along the fallback chain can be found will a resource lookup fail.

Image and Image Set Construction In addition to static resources such as images, fonts, colors, or spacing values, styles also support a mechanism for constructing an image or a set of images (and related sets of images) from a set of parameters. This is used for example to create button labels which need to be parameterized by a label string. This capability is provided by the build_image() and build_image_set() methods and is implemented using composer objects. These objects provide a fairly general mechanism for describing style independent layouts, and for using those descriptions to create images based on parameters and style provided resources (see the composer class for more details).

Restyling Support Finally, styles provide a mechanism for allowing interactor appearance to be "restyled" -- that is to allow resources created with one style to be (semi-)automatically exchanged with equivalent resources from a new style. This allows dynamic style "switching". For static resources such as simple fonts or colors, restyling can be done simply by looking up the same resource name in a new style. For images that are constructed dynamicly, a special styled_image class is provided. This class saves the information used to create the image under one style in a way that allows an equivalent image to be recreated under a new style.

See Also:
style_manager, style_resource_desig, composer, styled_image

Field Summary
protected  int _last_hunt_id
          Identifier for last search through this style's table.
protected  java.lang.String _name
          Name of this style.
protected static int _next_uniq_id
          Counter for generating unique positive integers
protected static int _num_buckets
          Number of hash buckets in lookup table.
protected  style[] _super_styles
          Array of styles that we inherit from (our super-styles).
protected  style_resource_cell[] bucket
          Hash buckets for our lookup table.
 
Constructor Summary
style(java.lang.String name)
          Constructor for empty style with no super-styles.
style(java.lang.String nam, java.lang.Object[] init_list)
          Constructor for style initialized from name value pair list and no super-style.
style(java.lang.String name, style super_styl)
          Constructor for empty style with exactly one super-style.
style(java.lang.String name, style[] super_list)
          Constructor for empty style.
style(java.lang.String nam, style[] super_list, java.lang.Object[] init_list)
          Constructor for style initialized from name value pair list and array of super-styles.
style(java.lang.String nam, style[] super_list, style_resource_desig[] desig_list, java.lang.Object[] res_list)
          Constructor for style initialized from parallel arrays of designators and resource values.
style(java.lang.String nam, style super_styl, java.lang.Object[] init_list)
          Constructor for style initialized from name value pair list and a single super-style.
 
Method Summary
 void add_resource(java.lang.String name, java.lang.Object res)
          Add a resource to the style.
 void add_resource(style_resource_desig desig, java.lang.Object res)
          Add a resource to the style.
 void add_resources(java.lang.Object[] init_list)
          Add a list of resources to the style.
 void add_resources(style_resource_desig[] desig_list, java.lang.Object[] res_list)
          Add a list of resources to the style.
 styled_image[] build_image_set(java.lang.String target_name, loaded_image parm1)
          Shortcut method for building an image set that has an image parameter.
 styled_image[] build_image_set(java.lang.String target_name, loaded_image parm1, int parm2)
          Shortcut method for building an image set that has an image and one integer as parameters.
 styled_image[] build_image_set(java.lang.String target_name, loaded_image parm1, int parm2, int parm3)
          Shortcut method for building an image set that has an image and two integers as parameters.
 styled_image[] build_image_set(java.lang.String target_name, java.lang.Object[] composition_parms)
          Search for the named composer set resource, apply the given parameters to each composer to build, and return an image set.
 styled_image[] build_image_set(java.lang.String target_name, java.lang.String parm)
          Shortcut method for building an image set that has a single String parameter.
 styled_image[] build_image_set(java.lang.String target_name, java.lang.String parm1, int parm2)
          Shortcut method for building an image set that has a String and one integer as parameters.
 styled_image[] build_image_set(java.lang.String target_name, java.lang.String parm1, int parm2, int parm3)
          Shortcut method for building an image set that has a String and two integers as parameters.
 styled_image[] build_image_set(style_resource_desig target_desig, java.lang.Object[] composition_parms)
          Search for the designated composer set resource, apply the given parameters to each composer to build and return an image set.
 styled_image build_image(java.lang.String target_name, loaded_image parm1)
          Shortcut method for building an image that has one image parameter.
 styled_image build_image(java.lang.String target_name, loaded_image parm1, int parm2)
          Shortcut method for building an image that has an image and one integer as parameters.
 styled_image build_image(java.lang.String target_name, loaded_image parm1, int parm2, int parm3)
          Shortcut method for building an image that has an image and two integers as parameters.
 styled_image build_image(java.lang.String target_name, java.lang.Object[] composition_parms)
          Search for the named composer resource, apply the given parameters to it to build an image, and return that image.
 styled_image build_image(java.lang.String target_name, java.lang.String parm)
          Shortcut method for building an image that has a single String parameter.
 styled_image build_image(java.lang.String target_name, java.lang.String parm1, int parm2)
          Shortcut method for building an image that has a String and one integer as parameters.
 styled_image build_image(java.lang.String target_name, java.lang.String parm1, int parm2, int parm3)
          Shortcut method for building an image that has a String and two integers as parameters.
 styled_image build_image(style_resource_desig target_desig, java.lang.Object[] composition_parms)
          Search for the designated composer resource, apply the given parameters to it to build an image, and return that image.
 java.lang.Object get_resource_exact(java.lang.String target_name)
          Search for the named resource within this style and its super-styles.
 java.lang.Object get_resource_exact(style_resource_desig target)
          Search for the designated resource within this style and its super-styles.
 java.lang.Object get_resource(java.lang.String target_name)
          Search for the designated resource within this style and its super-styles.
 java.lang.Object get_resource(style_resource_desig target)
          Search for the designated resource within this style and its super-styles.
static int hash(style_resource_desig desig)
          Hash function over style resource designators
 java.lang.Object hunt_resource(style_resource_desig target, int bucket_num, int hunt_id)
          Search a particular hash bucket for a designated resource.
 void init_resources(java.lang.Object[] init_list)
          Add a list of resources to the style without checking for duplicates.
 void init_resources(style_resource_desig[] desig_list, java.lang.Object[] res_list)
          Add a list of resources to the style without checking for duplicates.
 java.lang.String name()
          Name of this style.
 void quick_add_resource(java.lang.String name, java.lang.Object res)
          Add a named resource to the style without checking if it is already in the table.
 void quick_add_resource(style_resource_desig desig, java.lang.Object res)
          Add a resource to the style without checking if it is already in the table.
 void remove_resource(java.lang.String res)
          Remove a resource from the style.
 void remove_resource(style_resource_desig res)
          Remove a resource from the style.
 loaded_image[] restyle_image_set(loaded_image[] the_set)
          Create a new image set which is a restyling of the given image set under this style.
 loaded_image restyle_image(loaded_image the_image)
          Create a new image which is a restyling of the given image under this style.
 style[] super_styles()
          Array of styles that we inherit from (our super-styles).
protected  void tag_image(styled_image img, style stl, style_resource_desig desig, java.lang.Object[] parms, int indx)
          Place bookkeeping in a styled image to remember how it was created so it can be reconstructed under a new style.
protected static int uniq_id()
          Create a unique integer id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected java.lang.String _name
Name of this style.

_next_uniq_id

protected static int _next_uniq_id
Counter for generating unique positive integers

_last_hunt_id

protected int _last_hunt_id
Identifier for last search through this style's table. We use this to avoid multiple searches of tables within super-styles that appear along two or more super-style chains due to multiple inheritance.

_num_buckets

protected static final int _num_buckets
Number of hash buckets in lookup table.

bucket

protected style_resource_cell[] bucket
Hash buckets for our lookup table. Note: we are implementing our own hash tables here so we can chain the searches through super-style tables efficiently and shortcut tables we have already searched.

_super_styles

protected style[] _super_styles
Array of styles that we inherit from (our super-styles). If this style does not have a resource it searches each of its super-styles (and recursively their super-styles) in order until the resource is found or the search fails. Note: this array may be null if the style has no super-styles.
Constructor Detail

style

public style(java.lang.String name,
             style[] super_list)
Constructor for empty style.

style

public style(java.lang.String name,
             style super_styl)
Constructor for empty style with exactly one super-style.

style

public style(java.lang.String name)
Constructor for empty style with no super-styles.

style

public style(java.lang.String nam,
             style[] super_list,
             java.lang.Object[] init_list)
Constructor for style initialized from name value pair list and array of super-styles.

The resources come as an array of objects which alternates between Strings for the name of the resource and an object for the resource itself. If the array has improperly typed elements (i.e., not in String, Object pairs), or a name which has not been registered with the style manager is encountered, an error will be thrown.

Parameters:
String - nam name of style
style[] - super_list list of super-styles we inherit from.
Object[] - init_list resource initialization list

style

public style(java.lang.String nam,
             style super_styl,
             java.lang.Object[] init_list)
Constructor for style initialized from name value pair list and a single super-style.

The resources come as an array of objects which alternates between Strings for the name of the resource and an object for the resource itself. If the array has improperly typed elements (i.e., not in String, Object pairs), or a name which has not been registered with the style manager is encountered, an error will be thrown.

Parameters:
String - nam name of style
style - super_styl super-style we inherit from.
Object[] - init_list resource initialization list

style

public style(java.lang.String nam,
             java.lang.Object[] init_list)
Constructor for style initialized from name value pair list and no super-style.

The resources come as an array of objects which alternates between Strings for the name of the resource and an object for the resource itself. If the array has improperly typed elements (i.e., not in String, Object pairs), or a name which has not been registered with the style manager is encountered, an error will be thrown.

Parameters:
String - nam name of style
Object[] - init_list resource initialization list

style

public style(java.lang.String nam,
             style[] super_list,
             style_resource_desig[] desig_list,
             java.lang.Object[] res_list)
Constructor for style initialized from parallel arrays of designators and resource values

.

Parameters:
String - nam name of style
style[] - super_list list of super-styles we inherit from
style_resource_desig[] - desig_list resource designators initialization list
Object[] - init_list resources corresponding to the designators.
Method Detail

name

public java.lang.String name()
Name of this style.

uniq_id

protected static int uniq_id()
Create a unique integer id.
Returns:
int a unique positive integer.

super_styles

public style[] super_styles()
Array of styles that we inherit from (our super-styles). If this style does not have a resource it searches each of its super-styles (and recursively their super-styles) in order until the resource is found or the search fails. Note: this array may be null if the style has no super-styles.
Returns:
style[] our super-style list.

hash

public static int hash(style_resource_desig desig)
Hash function over style resource designators
Parameters:
style_resource_desig - desig the designator being hashed
Returns:
int index of hash bucket we hash into (in range 0.._num_buckets-1)

add_resource

public void add_resource(style_resource_desig desig,
                         java.lang.Object res)
Add a resource to the style. If the designated resource already exists in the style, it is silently replaced.
Parameters:
style_resource_desig - desig the designator for the new resource
Object - res the resource being added
See Also:
quick_add_resource(sub_arctic.style.style_resource_desig, java.lang.Object)

add_resource

public void add_resource(java.lang.String name,
                         java.lang.Object res)
Add a resource to the style. If the named resource already exists in the style, it is silently replaced. If no designator has been registered for the given name, a temporary designator will be registered (that should be filled in later by the owner of the name).
Parameters:
String - name the designator for the new resource
Object - res the resource being added
See Also:
quick_add_resource(sub_arctic.style.style_resource_desig, java.lang.Object)

quick_add_resource

public void quick_add_resource(style_resource_desig desig,
                               java.lang.Object res)
Add a resource to the style without checking if it is already in the table. If the designated resource already exists in the style, it is shadowed by this entry. That means that the previous entry will not be accessible, but will stay in the table (and not be garbage collected). As a result, this should normally only be used when the style is being initialized (or at some other time when the contents of the style is fully understood).
Parameters:
style_resource_desig - desig the designator for the new resource
Object - res the resource being added
See Also:
add_resource(sub_arctic.style.style_resource_desig, java.lang.Object)

quick_add_resource

public void quick_add_resource(java.lang.String name,
                               java.lang.Object res)
Add a named resource to the style without checking if it is already in the table. If the named resource already exists in the style, it is shadowed by this entry. That means that the previous entry will not be accessible, but will stay in the table (and not be garbage collected). As a result, this should normally only be used when the style is being initialized (or at some other time when the contents of the style is fully understood). If no designator has been registered for the given name, one will be registered with a null fallback (which presumable will be filled in later by the owner of the name, who may not have been loaded yet).
Parameters:
String - name the name of the new resource
Object - res the resource being added
See Also:
add_resource(sub_arctic.style.style_resource_desig, java.lang.Object)

add_resources

public void add_resources(java.lang.Object[] init_list)
Add a list of resources to the style. The resources come as an array of objects which alternates between Strings for the name of the resource and an object for the resource itself. If the array has improperly typed elements (i.e., not in String, Object pairs), or a name which has not been registered with the style manager is encountered, an error will be thrown.

Note: this routine silently replaces any duplicate entries. This requires a search for duplicates which produces O(N^2) worst case behavior (although on average this is scaled by the reciprocal of the size of the hash table squared). If you can be certain there are no duplicates with existing entries, for example at style initialization, use init_resources() instead to avoid this.

Parameters:
Object[] - init_list array of String, Object pairs to initialize from.
See Also:
add_resource(sub_arctic.style.style_resource_desig, java.lang.Object), init_resources(java.lang.Object[])

add_resources

public void add_resources(style_resource_desig[] desig_list,
                          java.lang.Object[] res_list)
Add a list of resources to the style. The resources come as parallel arrays of resource designators and resources values.

Note: this routine silently replaces any duplicate entries. This requires a search for duplicates which produces O(N^2) worst case behavior (although on average this is scaled by the reciprocal of the size of the hash table squared). If you can be certain there are no duplicates with existing entries, for example at style initialization, use init_resources() instead to avoid this.

Parameters:
style_resource_desig[] - desig_list array of resource designators
Object[] - res_list array or resource values
See Also:
add_resource(sub_arctic.style.style_resource_desig, java.lang.Object), init_resources(java.lang.Object[])

init_resources

public void init_resources(java.lang.Object[] init_list)
Add a list of resources to the style without checking for duplicates. The resources come as an array of objects which alternates between Strings for the name of the resource and an object for the resource itself. If the array has improperly typed elements (i.e., not in String, Object pairs), or a name which has not been registered with the style manager is encountered, an error will be thrown.

Note: If the named resource already exists in the style, it is shadowed by this entry. That means that the previous entry will not be accessible, but will stay in the table (and not be garbage collected). As a result, this should normally only be used when the style is being initialized (or at some other time when the contents of the style is fully understood).

Parameters:
Object[] - init_list array of String, Object pairs to initialize from.
See Also:
quick_add_resource(sub_arctic.style.style_resource_desig, java.lang.Object), add_resources(java.lang.Object[])

init_resources

public void init_resources(style_resource_desig[] desig_list,
                           java.lang.Object[] res_list)
Add a list of resources to the style without checking for duplicates. The resources come as parallel arrays of resource designators and resources values.

Note: If the named resource already exists in the style, it is shadowed by this entry. That means that the previous entry will not be accessible, but will stay in the table (and not be garbage collected). As a result, this should normally only be used when the style is being initialized (or at some other time when the contents of the style is fully understood).

Parameters:
style_resource_desig[] - desig_list array of resource designators
Object[] - res_list array or resource values
See Also:
quick_add_resource(sub_arctic.style.style_resource_desig, java.lang.Object), add_resources(java.lang.Object[])

remove_resource

public void remove_resource(style_resource_desig res)
Remove a resource from the style. If the resource is stored in the style, this is ignored. This only removes resources from the local style, not from any super-styles, and is primarily intended for resource substitution.
Parameters:
style_resource_desig - res the resource to remove

remove_resource

public void remove_resource(java.lang.String res)
Remove a resource from the style. If the resource is stored in the style, this is ignored. This only removes resources from the local style, not from any super-styles, and is primarily intended for resource substitution.
Parameters:
String - res name of the resource to remove

hunt_resource

public java.lang.Object hunt_resource(style_resource_desig target,
                                      int bucket_num,
                                      int hunt_id)
Search a particular hash bucket for a designated resource. The hunt_id passed here allows us to detect if we have already looked at this bucket via a different super-style chain during this search (in which case we bail out early). If the hunt here fails, we recursively search the same bucket in our super-styles.
Parameters:
style_resource_desig - target the designator of the resource we are looking for.
int - bucket_num the hash bucket we are looking in.
int - hunt_id unique id for this search.
Returns:
Object the resource we were looking for, or null if not found.

get_resource_exact

public java.lang.Object get_resource_exact(style_resource_desig target)
Search for the designated resource within this style and its super-styles. This search only looks for the designated resource, and does not attempt to find a fallback resource if the designated one is not found.

If the object returned is a loaded_image, we put a styled_image wrapper around it and tag it with the information needed to find the corresponding image in another style.

Parameters:
style_resource_desig - target the designator for the resource we are are looking for.
Returns:
Object the resource object we were looking for, or null if no such resource was found (in this style, or its super-styles).

get_resource_exact

public java.lang.Object get_resource_exact(java.lang.String target_name)
Search for the named resource within this style and its super-styles. This search only looks for the designated resource, and does not attempt to find a fallback resource if the designated one is not found.
Parameters:
String - target_name the name of the resource we are are looking for. If this name has not been registered with the style manager, an error is thrown.
Returns:
Object the resource object we were looking for, or null if no such resource was found (in this style, or its super-styles).

get_resource

public java.lang.Object get_resource(style_resource_desig target)
Search for the designated resource within this style and its super-styles. If a direct search fails, we then look for resources which are fallbacks for this resource in the same fashion.
Parameters:
style_resource_desig - target the designator for the resource we are are looking for.
Returns:
Object the resource object we were looking for, or null in the unlikely event that no such resource or fallback resource could be found (in this style, or its super-styles).

get_resource

public java.lang.Object get_resource(java.lang.String target_name)
Search for the designated resource within this style and its super-styles. If a direct search fails, we then look for resources which are fallbacks for this resource in the same fashion.
Parameters:
String - target_name the name of the resource we are are looking for. If this name has not been registered with the style manager, an error is thrown.
Returns:
Object the resource object we were looking for, or null in the unlikely event that no such resource or fallback resource could be found (in this style, or its super-styles).

tag_image

protected void tag_image(styled_image img,
                         style stl,
                         style_resource_desig desig,
                         java.lang.Object[] parms,
                         int indx)
Place bookkeeping in a styled image to remember how it was created so it can be reconstructed under a new style.
Parameters:
styled_image - img the image being tagged
style - stl the style that created the image
style_resource_desig - desig the designator for the composer that created it or the image itself
Object[] - parms the parameters to the composer (or null if there was no composer)

build_image

public styled_image build_image(style_resource_desig target_desig,
                                java.lang.Object[] composition_parms)
Search for the designated composer resource, apply the given parameters to it to build an image, and return that image. If the resource is not a composer object then an error is thrown.
Parameters:
style_resource_desig - target_desig the designator for the resource we are looking for.
Object[] - composition_parms parameters to the composition object. If these parameters are not of the type and number expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object. This image is tagged with the style information necessary to recreate it.

build_image

public styled_image build_image(java.lang.String target_name,
                                java.lang.Object[] composition_parms)
Search for the named composer resource, apply the given parameters to it to build an image, and return that image. If the resource is not a composer object then an error is thrown.
Parameters:
String - target_name the name of the resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
Object[] - composition_parms parameters to the composition object. If these parameters are not of the type and number expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image

public styled_image build_image(java.lang.String target_name,
                                java.lang.String parm)
Shortcut method for building an image that has a single String parameter. This basically takes a string and puts it in an Object array and calls the general version of build_image().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm single string parameters to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameter to the requested composer object.

build_image

public styled_image build_image(java.lang.String target_name,
                                java.lang.String parm1,
                                int parm2)
Shortcut method for building an image that has a String and one integer as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm1 string parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image

public styled_image build_image(java.lang.String target_name,
                                java.lang.String parm1,
                                int parm2,
                                int parm3)
Shortcut method for building an image that has a String and two integers as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm1 string parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
int - parm3 second integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image

public styled_image build_image(java.lang.String target_name,
                                loaded_image parm1)
Shortcut method for building an image that has one image parameter. This basically takes parameter, puts it in an Object array and calls the general version of build_image().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm1 image parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image

public styled_image build_image(java.lang.String target_name,
                                loaded_image parm1,
                                int parm2)
Shortcut method for building an image that has an image and one integer as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
loaded_image - parm1 image parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image

public styled_image build_image(java.lang.String target_name,
                                loaded_image parm1,
                                int parm2,
                                int parm3)
Shortcut method for building an image that has an image and two integers as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
loaded_image - parm1 image parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
int - parm3 second integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image_set

public styled_image[] build_image_set(style_resource_desig target_desig,
                                      java.lang.Object[] composition_parms)
Search for the designated composer set resource, apply the given parameters to each composer to build and return an image set. If the resource is not a composer set then an error is thrown.
Parameters:
style_resource_desig - target_desig the designator for the resource we are looking for.
Object[] - composition_parms parameters to the composition objects. If these parameters are not of the type and number expected by the composers, an error is thrown.
Returns:
styled_image[] the images produced by the applying the given parameters to each of the requested composer objects.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      java.lang.Object[] composition_parms)
Search for the named composer set resource, apply the given parameters to each composer to build, and return an image set. If the resource is not a composer set then an error is thrown.
Parameters:
String - target_name the name of for the resource we are looking for.
Object[] - composition_parms parameters to the composition objects. If these parameters are not of the type and number expected by the composers, an error is thrown.
Returns:
styled_image[] the images produced by the applying the given parameters to each of the requested composer objects.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      java.lang.String parm)
Shortcut method for building an image set that has a single String parameter. This basically takes a string and puts it in an Object array then calls the general version of build_image_set().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm single string parameters to the composition objects. If this parameter is not what is expected by the composers, an error is thrown.
Returns:
styled_image[] the images produced by the applying the given parameter to each of the requested composer objects.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      java.lang.String parm1,
                                      int parm2)
Shortcut method for building an image set that has a String and one integer as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image_set().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm1 string parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      java.lang.String parm1,
                                      int parm2,
                                      int parm3)
Shortcut method for building an image set that has a String and two integers as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image_set().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
String - parm1 string parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
int - parm3 second integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      loaded_image parm1)
Shortcut method for building an image set that has an image parameter. This basically takes the parameter, puts it in an Object array and calls the general version of build_image_set().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
loaded_image - parm1 image parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      loaded_image parm1,
                                      int parm2)
Shortcut method for building an image set that has an image and one integer as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image_set().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
loaded_image - parm1 image parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

build_image_set

public styled_image[] build_image_set(java.lang.String target_name,
                                      loaded_image parm1,
                                      int parm2,
                                      int parm3)
Shortcut method for building an image set that has an image and two integers as parameters. This basically takes parameters, puts them in an Object array and calls the general version of build_image_set().
Parameters:
String - target_name the name of the composer resource we are looking for. If this name has not been registered with the style manager, an error is thrown.
loaded_image - parm1 image parameter to the composition object. If this parameter is not what is expected by the composer, an error is thrown.
int - parm2 first integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
int - parm3 second integer parameter to the composition object. If this parameter is now what is expected by the composer, an error is thrown.
Returns:
styled_image the image produced by the applying the given parameters to the requested composer object.

restyle_image

public loaded_image restyle_image(loaded_image the_image)
Create a new image which is a restyling of the given image under this style. This uses additional bookkeeping that the style system attaches to images when they are created to do an equivalent recreation of the image under this style. If the image was not created by the style system, is locked, or this style can't recreate it (which shouldn't happen for complete and properly constructed styles, but...), then the image itself is returned rather than a new image.
Parameters:
loaded_image - the_image the image to restyle
Returns:
loaded_image the restyled image
See Also:
styled_image.restyle(sub_arctic.style.style)

restyle_image_set

public loaded_image[] restyle_image_set(loaded_image[] the_set)
Create a new image set which is a restyling of the given image set under this style. This uses additional bookkeeping that the style system attaches to images when they are created to do an equivalent recreation of each image under this style. If any image was not created by the style system, is locked, or this style can't recreate it (which shouldn't happen for complete and properly constructed styles, but...), then the image itself is placed back in the result set rather than a new image.
Parameters:
loaded_image[] - the_set the image set to restyle
Returns:
loaded_image[] the restyled image set
See Also:
styled_image.restyle(sub_arctic.style.style)