Class TLcyKML22TreeModelObject
Represents a tree model object.
This class is used by the JTree created by the default TLcyKML22GUIFactory of the TLcyKML22AddOn
A tree model object acts a wrapper around an object that is part of the KML hierarchy. This object can be retrieved through the getTreeModelObject() method. An instance of this class also contains information on the model, layer and view that contain the object.
- Since:
- 10.0
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcyKML22TreeModelObject
(Object aTreeModelObject, ILcdModel aModel, ILcdLayer aLayer, ILcdView aView) Creates a new tree model objectTLcyKML22TreeModelObject
(Object aTreeModelObject, ILcdModel aModel, ILcdLayer aLayer, ILcdView aView, TLcyKML22TreeModelObject aParent) Creates a new tree model object with given parent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addModelNodeContainerListener
(ILcdModelContainerListener aModelContainerListener) Adds aILCdModelContainerListener
to thisTLcyKML22TreeModelObject
.void
destroy()
Destroys this tree model object by removing all internal state.boolean
Gets the children of thisTLcyKML22TreeModelObject
getLayer()
Returns a layer that has the following properties:getModel()
Returns a layer that has the following properties:Returns the parent of thisTLcyKML22TreeModelObject
Returns an object that represents an element in the model content tree of KML.getView()
Returns a layer that has the following properties:int
hashCode()
void
removeModelNodeContainerListener
(ILcdModelContainerListener aModelContainerListener) Removes aILcdModelContainerListener
from thisTLcyKML22TreeModelObject
.
-
Constructor Details
-
TLcyKML22TreeModelObject
public TLcyKML22TreeModelObject(Object aTreeModelObject, ILcdModel aModel, ILcdLayer aLayer, ILcdView aView) Creates a new tree model object
- Parameters:
aTreeModelObject
- A tree model object. See getTreeModelObject() for more information.aModel
- A model that is directly contained byaLayer
. This is always an instance of TLcdKML22RenderableModelaLayer
- A KML layeraView
- A view that directly containsaLayer
-
TLcyKML22TreeModelObject
public TLcyKML22TreeModelObject(Object aTreeModelObject, ILcdModel aModel, ILcdLayer aLayer, ILcdView aView, TLcyKML22TreeModelObject aParent) Creates a new tree model object with given parent.- Parameters:
aTreeModelObject
- A tree model object. See getTreeModelObject() for more information.aModel
- A model that is directly contained byaLayer
. This is always an instance of TLcdKML22RenderableModelaLayer
- A KML layeraView
- A view that directly containsaLayer
aParent
- The parent node of thisTLcyKML22TreeModelObject
-
-
Method Details
-
getTreeModelObject
Returns an object that represents an element in the model content tree of KML.
This is always one of the following:
- TLcdKML22DynamicModel for all non-leaf elements, such as KML containers.
- TLcdKML22PaintableGroundOverlay for all leaf-elements that represent
GroundOverlay
s. - TLcdKML22AbstractFeature for all other leaf elements.
- Returns:
- a tree model object
-
getLayer
Returns a layer that has the following properties:
- It is contained by the
ILcdView
returned by getView() - It contains the
ILcdModel
returned by getModel()
- Returns:
- a KML layer
- It is contained by the
-
getModel
Returns a layer that has the following properties:
- It is contained by the
ILcdLayer
returned by getLayer() ()} - It contains the tree model object returned by getTreeModelObject() somewhere in its underlying hierarchy
- Returns:
- a KML layer
- It is contained by the
-
getView
Returns a layer that has the following properties:
- It contains the
ILcdLyaer
returned by getLayer() ()}
- Returns:
- a KML layer
- It contains the
-
getParent
Returns the parent of this
TLcyKML22TreeModelObject
- Returns:
- The parent of this
TLcyKML22TreeModelObject
; null if this node is the root node and has no parent.
-
getChildren
Gets the children of this
TLcyKML22TreeModelObject
If a child is added or removed, this list should be updated as well
- Returns:
- the children of this
TLcyKML22TreeModelObject
-
addModelNodeContainerListener
Adds aILCdModelContainerListener
to thisTLcyKML22TreeModelObject
. The model container listener will be givenModelNodeContainerEvent
instances.- Parameters:
aModelContainerListener
- a model container listener
-
removeModelNodeContainerListener
Removes aILcdModelContainerListener
from thisTLcyKML22TreeModelObject
.- Parameters:
aModelContainerListener
- a model container listener- See Also:
-
equals
-
hashCode
public int hashCode() -
destroy
public void destroy()Destroys this tree model object by removing all internal state. The tree model object is no longer valid after this call.
-