|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.template.TemplateUtilities
The TemplateUtilities class contains a collection helper functions when dealing with templates.
| Field Summary | |
static java.lang.String |
NAME
String constants for the template relevant attributes. |
static java.lang.String |
TEMPLATE
String constants for the template relevant attributes. |
static java.lang.String |
TEMPLATES
String constants for the template relevant attributes. |
static java.lang.String |
TEMPLATESTITLE
String constants for the template relevant attributes. |
| Method Summary | |
static java.lang.String |
createUniqueName(java.util.List itemNames,
java.lang.String itemName,
boolean exclude)
This creates a unique name by modifying the itemName
parameter until it doesn't appear in the itemNames list. |
static int[] |
getComponents(Coordinate[] coords,
int direction)
Method getComponents returns all the components of all the given Coordinates to a specific direction. |
static GeometryItemCoordinates |
getCoordinates(BaseComposite composite)
Returns the transformed Coordinates wrapped in an instance of GeomtryItemCoordinates. |
static GeometryItemCoordinates |
getCoordinates(BaseComposite composite,
Primitive primitive)
Method getCoordinates returns the GeometryCoordinates for a given primitive. |
static java.lang.String |
getFileLocation(java.lang.String directory,
java.lang.String filename)
Creates a proper path string from a given directory and filename. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Ellipse2D ellipse)
Method getGeometryItemCoordinates returns the translated Coordinates of a Ellipse. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Label2D label)
Method getGeometryItemCoordinates returns the translated Coordinates of a Label2D. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Line2D line)
Returns the GeometryItemCoordinates for a given instance
of Line2D. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Line2DModel line)
Method getGeometryItemCoordinates returns the translated Coordinates of a Line2DModel. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Polygon2D polygon)
Method getGeometryItemCoordinates returns the translated Coordinates of a Polygon2D. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Polyline2D polyline)
Method getGeometryItemCoordinates returns the translated Coordinates of a Line2DModel. |
static GeometryItemCoordinates |
getGeometryItemCoordinates(BaseComposite composite,
Rect2D rect)
Method getGeometryItemCoordinates returns the translated coordinates of a Rect2D. |
static CoordinateSystem |
toCoordinateSystem(GeometryItemCoordinates geometryCoordinates)
The method toCoordinateSystem converts a given GeometryItemCoordinate instance to a CoordinateSystem. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TEMPLATESTITLE
public static final java.lang.String TEMPLATES
public static final java.lang.String TEMPLATE
public static final java.lang.String NAME
| Method Detail |
public static java.lang.String createUniqueName(java.util.List itemNames,
java.lang.String itemName,
boolean exclude)
itemName
parameter until it doesn't appear in the itemNames list. A " ( number )" will
be appended appended to the initial string. Assuming a list of existing names
like "Document (1)", "Document (2)", "Document (4)" and an itemName
Parameter "Document" will result in a new name "Document (3)". Use the
exclude parameter to avoid, that the resulting name of the
String will be equal to the itemName parameter. This is useful
whenever you attempt to create similar "looking" names.
itemNames - the list of existing names.itemName - the name you like to give your item.exclude - flag to indicate whether to exclude the itemName parameter
or not.
public static CoordinateSystem toCoordinateSystem(GeometryItemCoordinates geometryCoordinates)
geometryCoordinates - the coordinates you want to convert.
public static GeometryItemCoordinates getCoordinates(BaseComposite composite)
BaseComposite.getBaseCompositeContainer() method
returns something non-null and not of instance
CompositeView.
composite - The composite to create the GeometryItemCoordinates for.
public static GeometryItemCoordinates getCoordinates(BaseComposite composite,
Primitive primitive)
composite - the enclosing composite of the primitive.primitive - the primitive to you want to receive the GeometryItemCoordinates from.
GeometryItemCoordinates
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Line2D line)
GeometryItemCoordinates for a given instance
of Line2D.
composite - the enclosing composite of the primitive.line - the source Line2D instance.
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Rect2D rect)
composite - the enclosing composite of the primitive.rect - the source Rect2D instance.
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Polyline2D polyline)
composite - the enclosing composite of the primitive.polyline - the source Polyline2D instance.
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Line2DModel line)
composite - the enclosing composite of the primitive.line - the source Line2DModel instance.
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Label2D label)
composite - the enclosing composite of the primitive.label - the source Label2D instance.
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Ellipse2D ellipse)
composite - the enclosing composite of the primitive.ellipse - the source Ellipse2D instance.
public static GeometryItemCoordinates getGeometryItemCoordinates(BaseComposite composite,
Polygon2D polygon)
composite - the enclosing composite of the primitive.polygon - source Polygon2D
public static int[] getComponents(Coordinate[] coords,
int direction)
coords - Coordinates to collate in an array.direction - the direction of the coordinates you wish to have in the array.
public static java.lang.String getFileLocation(java.lang.String directory,
java.lang.String filename)
directory - the directory as stringfilename - the filename as string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||