org.geotools.gui.swing.legend
Class LegendLayerNodeInfo

java.lang.Object
  extended byorg.geotools.gui.swing.legend.LegendNodeInfo
      extended byorg.geotools.gui.swing.legend.LegendLayerNodeInfo
All Implemented Interfaces:
java.io.Serializable

public class LegendLayerNodeInfo
extends LegendNodeInfo

it is used to keep the information about legend tree root and layer node such as name, expanded icon, collapsed icon, and isSelected when mean isLayerVisible or does user select the checkbox for this layer node

See Also:
Serialized Form

Constructor Summary
LegendLayerNodeInfo(java.lang.String name, boolean isLayerSelected, MapLayer layer)
          a new instance of LegendLayerNoteObject if layer is null, then this is a root node by name for this note and a boolean parameter to indicate if the layer is selected or visible.
 
Method Summary
 java.awt.Color getBackground(boolean selected)
           
 javax.swing.Icon getIcon(boolean expanded)
           
 MapLayer getMapLayer()
          if the note is a layer, if returns null, this is a root node
 boolean isSelected()
           
 void setMapLayer(MapLayer layer)
           
 void setSelected(boolean selected)
           
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.gui.swing.legend.LegendNodeInfo
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LegendLayerNodeInfo

public LegendLayerNodeInfo(java.lang.String name,
                           boolean isLayerSelected,
                           MapLayer layer)
a new instance of LegendLayerNoteObject if layer is null, then this is a root node by name for this note and a boolean parameter to indicate if the layer is selected or visible.

Parameters:
name - DOCUMENT ME!
isLayerSelected - DOCUMENT ME!
layer - DOCUMENT ME!
Method Detail

setSelected

public void setSelected(boolean selected)

isSelected

public boolean isSelected()
Specified by:
isSelected in class LegendNodeInfo

getBackground

public java.awt.Color getBackground(boolean selected)
Specified by:
getBackground in class LegendNodeInfo

getIcon

public javax.swing.Icon getIcon(boolean expanded)
Specified by:
getIcon in class LegendNodeInfo

setMapLayer

public void setMapLayer(MapLayer layer)

getMapLayer

public MapLayer getMapLayer()
if the note is a layer, if returns null, this is a root node

Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
Specified by:
toString in class LegendNodeInfo


Copyright © GeoTools. All Rights Reserved.