public class TLcdMS2525bNode extends Object
getRoot(com.luciad.symbology.milstd2525b.model.ELcdMS2525Standard)
to access the root, and getChildren()
to list its children.
A hierarchy code can be retrieved
from and applied
to
any ILcdMS2525bCoded
instance, unless it does not have a visual representation
.getRoot(com.luciad.symbology.milstd2525b.model.ELcdMS2525Standard)
Modifier and Type | Method and Description |
---|---|
void |
applyOn(ILcdEditableMS2525bCoded aObject)
Adapts the given symbol so that it belongs to the given hierarchy node.
|
void |
applyTemplateShape(ILcdModelReference aReference,
double aX,
double aY,
double aSize,
ILcd2DEditablePointList aListSFCT)
Applies a suitable shape for this symbology node, at the given location and of the provided size.
|
boolean |
equals(Object o) |
static TLcdMS2525bNode |
get(String aSIDC,
ELcdMS2525Standard aStandard)
Returns the hierarchy node for the given object.
|
List<TLcdMS2525bNode> |
getChildren()
Returns a list of the node's children.
|
String |
getCodeMask()
Returns a code identifier that corresponds to this node.
Even if the node maps to a symbol with a visual representation, the identifier may or may not be directly usable as a MIL-STD 2525 symbol code (SIDC). |
String |
getName()
Returns a human readable name for this symbol or folder.
|
TLcdMS2525bNode |
getParent()
Returns the parent of this tree node.
|
static TLcdMS2525bNode |
getRoot(ELcdMS2525Standard aStandard)
Returns a node with a hierarchic structure of all symbols of the given standard.
|
ELcdMS2525Standard |
getStandard()
Returns the symbology standard of this tree.
|
int |
hashCode() |
boolean |
isFolderOnly()
Returns true if the node does not represent a symbol, but rather a folder of symbols.
|
String |
toString() |
public static TLcdMS2525bNode getRoot(ELcdMS2525Standard aStandard)
aStandard
- the symbology standardpublic ELcdMS2525Standard getStandard()
public String getCodeMask()
ILcdEditableMS2525bCoded
object,
but rather using the applyOn
method.isFolderOnly()
,
ILcdMS2525bCoded.getMS2525Code()
,
applyOn(ILcdEditableMS2525bCoded)
public boolean isFolderOnly()
public List<TLcdMS2525bNode> getChildren()
public TLcdMS2525bNode getParent()
null
if this tree node is
the root node.null
.public String getName()
public static TLcdMS2525bNode get(String aSIDC, ELcdMS2525Standard aStandard)
aSIDC
- the SIDCaStandard
- the standardpublic void applyOn(ILcdEditableMS2525bCoded aObject)
aObject
- the symbol to adaptpublic void applyTemplateShape(ILcdModelReference aReference, double aX, double aY, double aSize, ILcd2DEditablePointList aListSFCT)
Applies a suitable shape for this symbology node, at the given location and of the provided size. This method can be used to create a template object (for example used in association with the create controller) or as a convenience for programmatically creating shapes. The template geometry coordinates are derived from the symbol, not the geometry type of the given pointlist. For example: if the symbol represents a polygon, the template geometry will reflect this.
Example:
TLcdGeodeticReference reference = ...; String code = "GUTPR---------X"; TLcdMS2525bNode node = TLcdMS2525bNode.get(code, ELcdMS2525Standard.MIL_STD_2525b); TLcdEditableMS2525bObject symbol = new TLcdEditableMS2525bObject(); node.applyOn(symbol); // set up the geometry at (0,0) with an approximate size of 2 degrees node.applyTemplateShape(reference, 0, 0, 2, symbol);
aReference
- the coordinate reference of the shapeaX
- x coordinate where the template will be createdaY
- y coordinate where the template will be createdaSize
- the approximate size of the final template.
This is applied to the coordinates in the shape's reference system.
In other words, if the size is 1, the width and height of the geometry will be around 1 model unit
(e.g. degree, meter), depending on the shape.aListSFCT
- A shape that can represent a military symbol.IllegalArgumentException
- If this node does not have a code (i.e. the node sits high in the hierarchy, grouping several nodes).