repast.simphony.gis.legend
Class LegendRuleEntry

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by repast.simphony.gis.legend.LegendEntry
          extended by repast.simphony.gis.legend.LegendRuleEntry
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class LegendRuleEntry
extends LegendEntry

This legend element represents a rule in a style. This will hold the rule as well as an iconic representation of that rule. This will not have children. Setting the dataVisible flag on this element will have no effect.

Version:
$Revision: 1.5 $
Author:
$Author: howe $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
LegendRuleEntry(String name, Icon icon, org.geotools.styling.Rule rule)
          Creates a new instance of LegendStyleElementNodeInfo
 
Method Summary
 Color getBackground(boolean selected)
          Get the background color for this node based on whether the node is selected or not.
 Icon getIcon()
           
 org.geotools.styling.Rule getRule()
           
 void setIcon(Icon icon)
           
 void setRule(org.geotools.styling.Rule rule)
           
 
Methods inherited from class repast.simphony.gis.legend.LegendEntry
getIcon, getName, isDataVisible, setDataVisible, setDataVisible, setName, toString
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LegendRuleEntry

public LegendRuleEntry(String name,
                       Icon icon,
                       org.geotools.styling.Rule rule)
Creates a new instance of LegendStyleElementNodeInfo

Parameters:
name - The title of the Rule.
icon - The icon for this Rule.
rule - The rule for this LegendEntry.
Method Detail

setRule

public void setRule(org.geotools.styling.Rule rule)

getRule

public org.geotools.styling.Rule getRule()

setIcon

public void setIcon(Icon icon)

getIcon

public Icon getIcon()

getBackground

public Color getBackground(boolean selected)
Description copied from class: LegendEntry
Get the background color for this node based on whether the node is selected or not.

Overrides:
getBackground in class LegendEntry
Parameters:
selected - Is this entry currently selected?
Returns:
The background color for this entry.