org.geotools.gui.swing.legend
Class LegendRuleNodeInfo

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

public class LegendRuleNodeInfo
extends LegendNodeInfo

This class only store name of the style element node and the icon for the style, it maybe will be extended to create icon itself. for creating Icon, a feature sample is required to get value out of the rule.

Author:
jianhuij
See Also:
Serialized Form

Constructor Summary
LegendRuleNodeInfo(java.lang.String name, javax.swing.Icon icon, Rule rule, Feature sample)
          Creates a new instance of LegendStyleElementNodeInfo
 
Method Summary
 java.awt.Color getBackground(boolean selected)
           
 Feature getFeatureSample()
           
 javax.swing.Icon getIcon()
           
 javax.swing.Icon getIcon(boolean selected)
           
 Rule getRule()
           
 boolean isSelected()
           
 void setFeatureSample(Feature sample)
           
 void setIcon(javax.swing.Icon icon)
           
 void setRule(Rule rule)
           
 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

LegendRuleNodeInfo

public LegendRuleNodeInfo(java.lang.String name,
                          javax.swing.Icon icon,
                          Rule rule,
                          Feature sample)
Creates a new instance of LegendStyleElementNodeInfo

Parameters:
name - title for this rule
icon - icon for this rule generated by LegendIconMaker from this rule
rule - rule for the cell
sample - feature sample from this data using this rule
Method Detail

setFeatureSample

public void setFeatureSample(Feature sample)

getFeatureSample

public Feature getFeatureSample()

setRule

public void setRule(Rule rule)

getRule

public Rule getRule()

setIcon

public void setIcon(javax.swing.Icon icon)

getIcon

public javax.swing.Icon getIcon()

toString

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

getIcon

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

getBackground

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

isSelected

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


Copyright © GeoTools. All Rights Reserved.