|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.style.StyleService
This class holds static methods that will be helpful when dealing with
StyleItems. Styles for Composites respectively
Primitives are set up in a XML-file
(usually: styles.xml). Within this file the "look" (Colors,
Paint- and StrokeFormat, etc.) of elements is defined.
| Method Summary | |
static void |
applyItemtoPrimitive(Primitive primitive,
StyleItem item)
Applies the StyleItem item to the given
Primitive. |
static void |
applyItemtoPrimitiveEx(Primitive primitive,
StyleItem item)
This method applies the given StyleItem to the parameter primitive. |
static AttributeSet |
getItemAttributes(int itemType)
Returns an AttributeSet containing all
Attributes of the given type. |
static void |
loadStylesFromResource(java.lang.String filename,
java.lang.Class resourceclass)
Loads the style-definition from file given by filename
relatively located to Class resourceclass.
|
static void |
loadStylesFromResource(java.lang.String filename,
java.lang.Class resourceclass,
boolean overwriteExisting)
Loads the style-definition from file given by filename
relatively located to Class resourceclass.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final void loadStylesFromResource(java.lang.String filename,
java.lang.Class resourceclass)
throws ReadException
filename
relatively located to Class resourceclass.
as resourcelocater. An InvalidArgumentException is thrown,
if the filename is null or an empty String.
filename - the non-null, non-empty filename.resourceclass - the rescource-class to use.
ReadException
public static final void loadStylesFromResource(java.lang.String filename,
java.lang.Class resourceclass,
boolean overwriteExisting)
throws ReadException
filename
relatively located to Class resourceclass.
as resourcelocater. An InvalidArgumentException is thrown,
if the filename is null or an empty String.
filename - the non-null, non-empty filename.resourceclass - the rescource-class to use.overwriteExisting - overwrites existing definitions while
loading new
ReadExceptionpublic static final AttributeSet getItemAttributes(int itemType)
AttributeSet containing all
Attributes of the given type.
itemType - the type to look up.
public static final void applyItemtoPrimitiveEx(Primitive primitive,
StyleItem item)
Note:
This one is Experimental and might be deleted in future version of the
framework.
primitive - the Primitive to apply the given style to.item - the StyleItem to apply.
public static final void applyItemtoPrimitive(Primitive primitive,
StyleItem item)
throws StyleItemApplyException
StyleItem item to the given
Primitive.
primitive - the Primitive to apply the
StyleItem to.item - the StyleItem to apply.
StyleItemApplyException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||