org.geotools.gui.swing.legend
Class LegendRuleNodeInfo
java.lang.Object
org.geotools.gui.swing.legend.LegendNodeInfo
org.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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 ruleicon
- icon for this rule generated by LegendIconMaker from this
rulerule
- rule for the cellsample
- feature sample from this data using this rule
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.