|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.CompositeUtilities
This class provides static helper methods if you need to find a nested
Composite, a BaseComposite or
CompositeGroups in a CompositeGroup respectively a
CompositeView.
| Method Summary | |
static Composite |
createCompositeByDescriptorName(java.lang.String geometryName,
java.lang.String styleName)
Creates a Composite instance from the given geometry and
style descriptor names. |
static CompositeLine |
createCompositeLineByDescriptorName(java.lang.String geometryName,
java.lang.String styleName)
Creates a CompositeLine instance from the given geometry and
style descriptor names. |
static java.lang.String |
drawflags2String(int drawflags)
Returns a string representation of the specified mask that represents any combination of drawing-flags from a CompositeView instance. |
static BaseComposite |
findDeepestBaseCompositeAt(CompositeGroup compositegroup,
int x,
int y)
Returns the deepest nested BaseComposite in the given
CompositeGroup at location (x, y).
|
static BaseComposite |
findDeepestBaseCompositeAt(CompositeGroup compositegroup,
int x,
int y,
boolean includeExternalPrimitives)
Returns the deepest nested BaseComposite in the given
CompositeGroup at location (x, y).
|
static BaseComposite |
findDeepestBaseCompositeAt(CompositeGroup compositegroup,
int x,
int y,
boolean includeExternalPrimitives,
int minLabelWidth,
int minLabelHeight)
Returns the deepest nested BaseComposite in the given
CompositeGroup at location (x, y).
|
static BaseComposite |
findDeepestBaseCompositeAt(CompositeView compositeview,
int x,
int y)
Returns the deepest nested BaseComposite in the given
CompositeView at location (x, y).
|
static BaseComposite |
findDeepestBaseCompositeAt(CompositeView compositeview,
int x,
int y,
boolean includeExternalPrimitives)
Returns the deepest nested BaseComposite in the given
CompositeView at location (x, y).
|
static BaseComposite |
findDeepestBaseCompositeAt(CompositeView compositeview,
int x,
int y,
boolean includeExternalPrimitives,
int minLabelWidth,
int minLabelHeight)
Returns the deepest nested BaseComposite in the given
CompositeView at location (x, y).
|
static Composite |
findDeepestCompositeAt(CompositeGroup compositegroup,
int x,
int y)
Returns the deepest nested Composite in the given
CompositeGroup at location (x, y).
|
static Composite |
findDeepestCompositeAt(CompositeGroup compositegroup,
int x,
int y,
boolean traverseFoldedGroups)
Returns the deepest nested Composite in the given
CompositeGroup at location (x, y).
|
static Composite |
findDeepestCompositeAt(CompositeView compositeview,
int x,
int y)
Returns the deepest nested Composite in the given
CompositeView at location (x, y).
|
static Composite |
findDeepestCompositeAt(CompositeView compositeview,
int x,
int y,
boolean traverseFoldedGroups)
Returns the deepest nested Composite in the given
CompositeView at location (x, y).
|
static CompositeGroup |
findDeepestCompositeGroupAt(CompositeGroup compositegroup,
int x,
int y)
Returns the deepest nested CompositeGroup in the given
CompositeGroup at location (x, y).
|
static CompositeGroup |
findDeepestCompositeGroupAt(CompositeView compositeview,
int x,
int y)
Returns the deepest nested CompositeGroup in the given
CompositeView at location (x, y).
|
static boolean |
isHit(Transform2D xForm,
BaseComposite composite,
int x,
int y)
Checks if the given BaseComposite is hit at the given coordinates |
static boolean |
isHit(Transform2D xForm,
BaseComposite composite,
int x,
int y,
int minLabelWidth,
int minLabelHeight)
Checks if the given BaseComposite is hit at the given coordinates |
static boolean |
isPrimitiveHit(BaseComposite composite,
int x,
int y,
java.lang.Class primitiveType)
Checks if the given BaseComposite is hit at the given coordinates |
static boolean |
isPrimitiveHit(BaseComposite composite,
int x,
int y,
java.lang.Class primitiveType,
int minLabelWidth,
int minLabelHeight)
Checks if the given BaseComposite is hit at the given coordinates |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final BaseComposite findDeepestBaseCompositeAt(CompositeView compositeview,
int x,
int y)
BaseComposite in the given
CompositeView at location (x, y).
Null is returned, if no such BaseComposite
exists.
compositeview - the CompositeView to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.
BaseComposite; null if there
is none.
public static final BaseComposite findDeepestBaseCompositeAt(CompositeView compositeview,
int x,
int y,
boolean includeExternalPrimitives)
BaseComposite in the given
CompositeView at location (x, y).
Null is returned, if no such BaseComposite
exists.
compositeview - the CompositeView to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.includeExternalPrimitives - true, to include external primitive bounds
in the hit check
BaseComposite; null if there
is none.
public static final BaseComposite findDeepestBaseCompositeAt(CompositeView compositeview,
int x,
int y,
boolean includeExternalPrimitives,
int minLabelWidth,
int minLabelHeight)
BaseComposite in the given
CompositeView at location (x, y).
Null is returned, if no such BaseComposite
exists.
compositeview - the CompositeView to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.includeExternalPrimitives - true, to include external primitive bounds
in the hit checkminLabelWidth - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.minLabelHeight - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.
BaseComposite; null if there
is none.
public static final BaseComposite findDeepestBaseCompositeAt(CompositeGroup compositegroup,
int x,
int y)
BaseComposite in the given
CompositeGroup at location (x, y).
Null is returned, if no such BaseComposite
exists.
compositegroup - the CompositeGroup to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.
BaseComposite;null if
there is none.
public static final BaseComposite findDeepestBaseCompositeAt(CompositeGroup compositegroup,
int x,
int y,
boolean includeExternalPrimitives)
BaseComposite in the given
CompositeGroup at location (x, y).
Null is returned, if no such BaseComposite
exists.
compositegroup - the CompositeGroup to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.includeExternalPrimitives - true, to include external primitive bounds
in the hit check
BaseComposite;null if
there is none.
public static final BaseComposite findDeepestBaseCompositeAt(CompositeGroup compositegroup,
int x,
int y,
boolean includeExternalPrimitives,
int minLabelWidth,
int minLabelHeight)
BaseComposite in the given
CompositeGroup at location (x, y).
Null is returned, if no such BaseComposite
exists.
compositegroup - the CompositeGroup to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.includeExternalPrimitives - true, to include external primitive bounds
in the hit checkminLabelWidth - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.minLabelHeight - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.
BaseComposite;null if
there is none.
public static final Composite findDeepestCompositeAt(CompositeView compositeview,
int x,
int y)
Composite in the given
CompositeView at location (x, y).
Null is returned, if no such Composite exists.
compositeview - the CompositeView to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.
Composite; null if there is
none.
public static final Composite findDeepestCompositeAt(CompositeGroup compositegroup,
int x,
int y)
Composite in the given
CompositeGroup at location (x, y).
Null is returned, if no such Composite exists.
compositegroup - the CompositeGroup to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.
Composite; null if there is
none.
public static final CompositeGroup findDeepestCompositeGroupAt(CompositeView compositeview,
int x,
int y)
CompositeGroup in the given
CompositeView at location (x, y).
Null is returned, if no nested CompositeGroup
can be found in the given location.
compositeview - the CompositeView to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.
CompositGroup; null if there
is none.
public static final CompositeGroup findDeepestCompositeGroupAt(CompositeGroup compositegroup,
int x,
int y)
CompositeGroup in the given
CompositeGroup at location (x, y).
Null is returned, if no nested CompositeGroup
can be found in the given location.
compositegroup - the CompositeGroup to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.
CompositGroup; null if there
is none.
public static final Composite findDeepestCompositeAt(CompositeGroup compositegroup,
int x,
int y,
boolean traverseFoldedGroups)
Returns the deepest nested Composite in the given
CompositeGroup at location (x, y).
Null is returned, if no such Composite exists.
If the parameter traverseFoldedGroups is set to false, the
first folded CompositeGroup found at the given coordinate
is considered as the deepest Composite for this coordinate
and is therefore returned by this method.
compositegroup - the CompositeGroup to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.traverseFoldedGroups - set to false if Composites
inside a folded CompositeGroup should be ignored.
Composite; null if there is
none.
public static final Composite findDeepestCompositeAt(CompositeView compositeview,
int x,
int y,
boolean traverseFoldedGroups)
Returns the deepest nested Composite in the given
CompositeView at location (x, y).
Null is returned, if no such Composite exists.
If the parameter traverseFoldedGroups is set to false, the
first folded CompositeGroup found at the given coordinate
is considered as the deepest Composite for this coordinate
and is therefore returned by this method.
compositeview - the CompositeView to search.x - the x-coordinate of the search point.y - the y-coordinate of the search point.traverseFoldedGroups - set to false if Composites
inside a folded CompositeGroup should be ignored.
Composite; null if there is
none.public static final java.lang.String drawflags2String(int drawflags)
CompositeView instance.
drawflags - the mask to convert to a string.
public static final boolean isHit(Transform2D xForm,
BaseComposite composite,
int x,
int y)
xForm - The local transformcomposite - The Composite to checkx - The x coordinate to checky - The x coordinate to check
public static final boolean isHit(Transform2D xForm,
BaseComposite composite,
int x,
int y,
int minLabelWidth,
int minLabelHeight)
xForm - The local transformcomposite - The Composite to checkx - The x coordinate to checky - The x coordinate to checkminLabelWidth - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.minLabelHeight - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.
public static final boolean isPrimitiveHit(BaseComposite composite,
int x,
int y,
java.lang.Class primitiveType)
composite - The Composite to checkx - The x coordinate to checky - The x coordinate to checkprimitiveType - The type filter for the primitives
public static final boolean isPrimitiveHit(BaseComposite composite,
int x,
int y,
java.lang.Class primitiveType,
int minLabelWidth,
int minLabelHeight)
composite - The Composite to checkx - The x coordinate to checky - The x coordinate to checkprimitiveType - The type filter for the primitivesminLabelWidth - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.minLabelHeight - The minimum size for labels, the boundary of a
label will automatically be resized to this for
hit checking. Pass 0 to disable this.
public static final Composite createCompositeByDescriptorName(java.lang.String geometryName,
java.lang.String styleName)
Composite instance from the given geometry and
style descriptor names. In case the Composite instance could
not be created this method returns null.
geometryName - the name of the GeometryDescriptorstyleName - the name of the StyleDescriptor
null
public static final CompositeLine createCompositeLineByDescriptorName(java.lang.String geometryName,
java.lang.String styleName)
CompositeLine instance from the given geometry and
style descriptor names. In case the CompositeLine instance
could not be created this method returns null.
geometryName - the name of the GeometryDescriptorstyleName - the name of the StyleDescriptor
null
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||