Class TLcyKML22TreeModelObject

java.lang.Object
com.luciad.lucy.addons.kml22.TLcyKML22TreeModelObject

public class TLcyKML22TreeModelObject extends Object

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 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 by aLayer. This is always an instance of TLcdKML22RenderableModel
      aLayer - A KML layer
      aView - A view that directly contains aLayer
    • 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 by aLayer. This is always an instance of TLcdKML22RenderableModel
      aLayer - A KML layer
      aView - A view that directly contains aLayer
      aParent - The parent node of this TLcyKML22TreeModelObject
  • Method Details

    • getTreeModelObject

      public Object getTreeModelObject()

      Returns an object that represents an element in the model content tree of KML.

      This is always one of the following:

      Returns:
      a tree model object
    • getLayer

      public ILcdLayer 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
    • getModel

      public ILcdModel 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
    • getView

      public ILcdView getView()

      Returns a layer that has the following properties:

      • It contains the ILcdLyaer returned by getLayer() ()}
      Returns:
      a KML layer
    • getParent

      public TLcyKML22TreeModelObject 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

      public List<TLcyKML22TreeModelObject> 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

      public void addModelNodeContainerListener(ILcdModelContainerListener aModelContainerListener)
      Adds a ILCdModelContainerListener to this TLcyKML22TreeModelObject. The model container listener will be given ModelNodeContainerEvent instances.
      Parameters:
      aModelContainerListener - a model container listener
    • removeModelNodeContainerListener

      public void removeModelNodeContainerListener(ILcdModelContainerListener aModelContainerListener)
      Removes a ILcdModelContainerListener from this TLcyKML22TreeModelObject.
      Parameters:
      aModelContainerListener - a model container listener
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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.