com.objex.panywhere
Class LegendItem

java.lang.Object
  extended by com.objex.panywhere.LegendItem
All Implemented Interfaces:
ComparableLegendItem, java.io.Serializable

public class LegendItem
extends java.lang.Object
implements java.io.Serializable, ComparableLegendItem

A legend item stands for a specific genetic condition or trait that is being tracked within a pedigree. It is shown on the pedigree by square icon on the symbols legend. There are two types of legend items, those with conditions and those without any conditions associated with them
Legend items with conditions are assigned to a person only if the person's data matches the conditions defined in the legend item. Legend items with no conditions must be explicitly assigned to a person. No further checks are done when the user and/or programmer assigns a conditionless legend item
to a person. A person to whom a legend item has been assigned will have their icon's quadrants painted in the same way as the legend item's icon is painted in the symbols legend. Examples below show how to assign legend items to a person's symbol.



In this example, a symbol legend item quadrant 1 painted red and with text "Rectal Cancer" is painted on the pedigree symbols legend. The person's icon will also have quandrant 1 painted red to show that the person does have rectal cancer. There is no condition specified in the legend item.

 
  void nonConditionBasedSymbolsLegendExample() {
        String LEGEND_ITEM_ID = "1";
        String LEGEND_ITEM_TEXT = "Rectal Cancer";
        Pedigree l_pedigree = new Pedigree();

        //create a new LegendItem and add it to the symbols legend
        //Quadrant 1 color must be set to RED
        Legend l_subtext_legend = l_pedigree.getLegend();
        LegendItem l_legend_item = new LegendItem();
        l_legend_item.setQuadOneColor(Color.red);
        l_legend_item.setID(LEGEND_ITEM_ID);
        l_legend_item.setLegendDisplayText(LEGEND_ITEM_TEXT);
        l_subtext_legend.addLegendItem(LEGEND_ITEM_ID, l_legend_item);

        //assign the legend item's quadrant settings and color to this person's symbol. No conditions apply
        Individual l_person = new Individual();
        l_pedigree.assignLegendItem(l_person, l_legend_item, false);
    }
 
 

In the following example, a symbol legend item quadrant 1 painted red and with text "Rectal Cancer" is painted on the pedigree symbols legend. The legend item has a condition that must be satisfied by a person for the symbol to be applied.
Two people are created, one with data that satisfies the legend item condition, and another without such data. The first person's icon will also have quandrant 1 painted red to show that the person does have rectal cancer.

 
   void conditionsBasedSymbolsLegendExample() {
         String LEGEND_ITEM_ID = "1";
        String LEGEND_ITEM_TEXT = "Female Individual";
        Pedigree l_pedigree = new Pedigree();
        int GENDER_FIELDID = 2;
        String FEMALE_GENDER_VALUE = "0";

        //create a new LegendItem and add it to the symbols legend
        //Quadrant 1 color must be set to RED
        Legend l_symbols_legend = l_pedigree.getLegend();
        LegendItem l_legend_item = new LegendItem();
        l_legend_item.setQuadOneColor(Color.red);
        l_legend_item.setID(LEGEND_ITEM_ID);
        l_legend_item.setLegendDisplayText(LEGEND_ITEM_TEXT);
        l_legend_item.addCondition(GENDER_FIELDID, CompareOperator.QUERY_EQUALS,  FEMALE_GENDER_VALUE);
        l_symbols_legend.addLegendItem(LEGEND_ITEM_ID, l_legend_item);

        //This person has the data that satisfies the condition defined in the legend item
        Individual ind = l_pedigree.getFamily().getIndividual("1);
        Data l_data = new Data();
        l_data.setFieldid(GENDER_FIELDID);
        l_data.setValue(FEMALE_GENDER_VALUE); //This will be used to determine person's eligibility to have subtext displayed
        ind.setData(l_data);


        //This person DOES NOT have the data that satisfies the condition defined in the legend item
        String NONMATCHING_FEMALE_GENDER_VALUE = "10";
        Individual ind2 = l_pedigree.getFamily().getIndividual("2);
        Data l_data2 = new Data();
        l_data2.setFieldid(GENDER_FIELDID);
        l_data.setValue(NONMATCHING_FEMALE_GENDER_VALUE);
        ind.setData(l_data);
    }
 
 
The 1st person's icon will have quadrant 1 painted red to show that she is a female. The 1st quadrant of the 2nd person's icon will not be painted red because the data does not match the condition defined by the legend item.

See Also:
Symbol, Legend, LegendCondition, Serialized Form

Constructor Summary
LegendItem()
          Creates a new Legend item with null symbols
 
Method Summary
 void addCondition(int ai_conditionfieldid, CompareOperator a_operator, java.lang.Object aCompareValue)
          Adds a new Subtext condition that will determine whethere or not an Indvidual subject's subtext value should be deisplayed based on whether or not the data value in the specified field for this subtext item satisfies the specified condition.
 void addCondition(int ai_tableid, int ai_conditionfieldid, CompareOperator a_operator, java.lang.Object aCompareValue)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)
           
 void copyItem(LegendItem mCon)
          Copies the the encoding details from the specified Legend Item and encodes this Legend item with them.
 void encodeQuadColor(long al_legend_quad_color)
          Updates LegendItem's quadrant color codes decoding the Long Integer passed as parameter.
 java.awt.Color getCenterCircleColor()
           
 java.awt.Paint getCenterCirclePaint()
          Deprecated.  
 java.awt.Color getCenterSquareColor()
           
 java.awt.Paint getCenterSquarePaint()
          Deprecated.  
 java.util.List<LegendCondition> getConditions()
           
 int getID()
           
 java.lang.String getLegendDisplayText()
           
 java.lang.String getLegendText()
           
 boolean getQuad1Dot()
           
 java.awt.Color getQuad1DotColor()
          Getter for property quad1DotColor.
 boolean getQuad2Dot()
           
 java.awt.Color getQuad2DotColor()
          Getter for property quad2DotColor.
 boolean getQuad3Dot()
           
 java.awt.Color getQuad3DotColor()
          Getter for property quad3DotColor.
 boolean getQuad4Dot()
           
 java.awt.Color getQuad4DotColor()
          Getter for property quad4DotColor.
 java.awt.Color getQuadFourColor()
           
 java.awt.Paint getQuadFourPaint()
          Deprecated.  
 java.awt.Color getQuadOneColor()
           
 java.awt.Paint getQuadOnePaint()
          Deprecated.  
 java.awt.Color getQuadThreeColor()
           
 java.awt.Paint getQuadThreePaint()
          Deprecated.  
 java.awt.Color getQuadTwoColor()
           
 java.awt.Paint getQuadTwoPaint()
          Deprecated.  
 double getX()
           
 double getY()
           
 boolean hasConditions()
           
 boolean isHLine()
           
 boolean isQuestionMark()
           
 boolean isVisible()
           
 boolean isVLine()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)
           
 void render(double x, double y, double w, double h, java.awt.Graphics2D g2d)
          Paints an Icon and its description on the Pedigree surface
 void render(double x, double y, double w, double h, java.awt.Graphics2D g2d, boolean drawtext)
          Paints an Icon and its description on the Pedigree surface
 void setCenterCircleColor(java.awt.Color qColor)
          Sets the color value for the centre circle of the legend item
 void setCenterCircleColor(int qColorRGB)
          Sets the RGB value for the color for the centre circle of the legend item
 void setCenterCirclePaint(java.awt.Paint qPaint)
          Deprecated.  
 void setCenterSquareColor(java.awt.Color qColor)
          Sets the color for the centre square of the legend item
 void setCenterSquareColor(int qColorRGB)
          Sets the RGB value for the color for the centre squqre of the legend item
 void setCenterSquarePaint(java.awt.Paint qPaint)
          Deprecated.  
 void setConditions(java.util.List<LegendCondition> aConditions)
          Sets the new Iterable list of subtext conditions
 void setHLine(boolean hline)
          Sets or unsets the vertical line flag for this legend item depending on the value of parameter passed.
 void setID(int ai_id)
          Sets the legend Item's ID
 void setLegendDisplayText(java.lang.String legendDisplayText)
          Sets the display text for the legend item.
 void setLegendText(java.lang.String text)
          Sets legend text for this legend Item.
 void setQuad1Dot(boolean qColor)
          Sets the legend item color for quadrant 1.
 void setQuad1DotColor(java.awt.Color aColor)
          Setter for property quad1DotColor.
 void setQuad2Dot(boolean qColor)
          Sets the legend item color for quadrant 2 dot.
 void setQuad2DotColor(java.awt.Color aColor)
          Setter for property quad2DotColor.
 void setQuad3Dot(boolean qColor)
          Sets the legend item color for quadrant 3 dot
 void setQuad3DotColor(java.awt.Color aColor)
          Setter for property quad3DotColor.
 void setQuad4Dot(boolean qColor)
          Sets the legend item color for quadrant 4 dot
 void setQuad4DotColor(java.awt.Color aColor)
          Setter for property quad4DotColor.
protected  void setQuadColor(int color, LegendItem a_item, int ai_quadno)
           
protected  void setQuadColor(LegendItem a_item, int ai_quadno, java.awt.Color a_color)
           
 void setQuadFourColor(java.awt.Color qColor)
          Sets the legend item color for quadrant 4
 void setQuadFourColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 4
 void setQuadFourPaint(java.awt.Paint qPaint)
          Deprecated.  
 void setQuadOneColor(java.awt.Color qColor)
          Sets the legend item color for quadrant 1
 void setQuadOneColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 1
 void setQuadOnePaint(java.awt.Paint qPaint)
          Deprecated.  
 void setQuadThreeColor(java.awt.Color qColor)
          Sets the legend item color for quadrant 3
 void setQuadThreeColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 3
 void setQuadThreePaint(java.awt.Paint qPaint)
          Deprecated.  
 void setQuadTwoColor(java.awt.Color qColor)
          Sets the legend item color for quadrant 2
 void setQuadTwoColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 2
 void setQuadTwoPaint(java.awt.Paint qPaint)
          Deprecated.  
 void setQuestionMark(boolean q)
          Sets the flag to show question mark legend item to true or false.
 void setVisible(boolean visible)
          Set the visible property.
 void setVLine(boolean vline)
          Sets or unsets the vertical line flag for this legend item depending on the value of parameter passed.
 void setX(double xc)
          Sets the current legend legend item location X Coordinate
 void setY(double yc)
          Sets the current legend legend item location Y Coordinate
 java.util.Map<java.lang.Integer,java.util.Vector<LegendCondition>> toConditionsMap()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LegendItem

public LegendItem()
Creates a new Legend item with null symbols

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener lstnr)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener lstnr)

getX

public double getX()
Returns:
The current legend legend item location X Coordinate

getY

public double getY()
Returns:
The current legend legend item location Y Coordinate

setX

public void setX(double xc)
Sets the current legend legend item location X Coordinate

Parameters:
xc - The value to set the location to

setY

public void setY(double yc)
Sets the current legend legend item location Y Coordinate

Parameters:
yc - The value to set the location to

getLegendText

public java.lang.String getLegendText()
Returns:
The legend text for this legend Item. This is the text that will be displayed to the right of the legend item icon on the symbols legend

setLegendText

public void setLegendText(java.lang.String text)
Sets legend text for this legend Item. This is the text that will be displayed to the right of the legend item icon on the symbols legend

Parameters:
text - The new legend text

getID

public int getID()
Returns:
The current legend ID

setID

public void setID(int ai_id)
Sets the legend Item's ID

Parameters:
ai_id - The new legendItem ID

getQuad1Dot

public boolean getQuad1Dot()
Returns:
True if quadrant 1 dot must be painted

setQuad1Dot

public void setQuad1Dot(boolean qColor)
Sets the legend item color for quadrant 1.

Parameters:
qColor - The new color for quadrant 1.

getQuad2Dot

public boolean getQuad2Dot()
Returns:
True if quadrant 2 dot must be painted

setQuad2Dot

public void setQuad2Dot(boolean qColor)
Sets the legend item color for quadrant 2 dot.

Parameters:
qColor - The new color for quadrant 2 dot.

getQuad3Dot

public boolean getQuad3Dot()
Returns:
True if quadrant 3 dot must be shown

setQuad3Dot

public void setQuad3Dot(boolean qColor)
Sets the legend item color for quadrant 3 dot

Parameters:
qColor - The new color for quadrant 3 dot.

getQuad4Dot

public boolean getQuad4Dot()
Returns:
True if quadrant 4 dot must be shown

setQuad4Dot

public void setQuad4Dot(boolean qColor)
Sets the legend item color for quadrant 4 dot

Parameters:
qColor - The new color for quadrant 4 dot

isVLine

public boolean isVLine()
Returns:
True if vertical line must be shown

setVLine

public void setVLine(boolean vline)
Sets or unsets the vertical line flag for this legend item depending on the value of parameter passed.

Parameters:
vline - Boolean indicating whether to set or unset the vertcial line flag

isQuestionMark

public boolean isQuestionMark()
Returns:
True If Question mark legend item is set and false otherwise

setQuestionMark

public void setQuestionMark(boolean q)
Sets the flag to show question mark legend item to true or false.

Parameters:
q - The value to set (True or False)

isHLine

public boolean isHLine()
Returns:
True if horizontal line must be shown

setHLine

public void setHLine(boolean hline)
Sets or unsets the vertical line flag for this legend item depending on the value of parameter passed.

Parameters:
hline - Boolean indicating whether to set or unset the h/zontal line flag

getQuadOneColor

public java.awt.Color getQuadOneColor()
Returns:
The current value of the Color for quadrant 1, null if no color is set

setQuadOneColor

public void setQuadOneColor(java.awt.Color qColor)
Sets the legend item color for quadrant 1

Parameters:
qColor - The new color for quadrant 1

getQuadOnePaint

public java.awt.Paint getQuadOnePaint()
Deprecated. 


setQuadOnePaint

public void setQuadOnePaint(java.awt.Paint qPaint)
Deprecated. 


getQuadTwoPaint

public java.awt.Paint getQuadTwoPaint()
Deprecated. 


setQuadTwoPaint

public void setQuadTwoPaint(java.awt.Paint qPaint)
Deprecated. 


getQuadThreePaint

public java.awt.Paint getQuadThreePaint()
Deprecated. 


setQuadThreePaint

public void setQuadThreePaint(java.awt.Paint qPaint)
Deprecated. 


getQuadFourPaint

public java.awt.Paint getQuadFourPaint()
Deprecated. 


setQuadFourPaint

public void setQuadFourPaint(java.awt.Paint qPaint)
Deprecated. 


getCenterCirclePaint

public java.awt.Paint getCenterCirclePaint()
Deprecated. 


setCenterCirclePaint

public void setCenterCirclePaint(java.awt.Paint qPaint)
Deprecated. 


getCenterSquarePaint

public java.awt.Paint getCenterSquarePaint()
Deprecated. 


setCenterSquarePaint

public void setCenterSquarePaint(java.awt.Paint qPaint)
Deprecated. 


setQuadOneColor

public void setQuadOneColor(int qColorRGB)
Sets the RGB value for the color in Quadrant 1

Parameters:
qColorRGB - The new RGB value

getQuadTwoColor

public java.awt.Color getQuadTwoColor()
Returns:
The current value of the Color for quadrant 2, null if no color is set

setQuadTwoColor

public void setQuadTwoColor(java.awt.Color qColor)
Sets the legend item color for quadrant 2

Parameters:
qColor - The new color for quadrant 2

setQuadTwoColor

public void setQuadTwoColor(int qColorRGB)
Sets the RGB value for the color in Quadrant 2

Parameters:
qColorRGB - The new RGB value

getQuadThreeColor

public java.awt.Color getQuadThreeColor()
Returns:
The current value of the Color for quadrant 3, null if no color is set

setQuadThreeColor

public void setQuadThreeColor(java.awt.Color qColor)
Sets the legend item color for quadrant 3

Parameters:
qColor - The new color for quadrant 3

setQuadThreeColor

public void setQuadThreeColor(int qColorRGB)
Sets the RGB value for the color in Quadrant 3

Parameters:
qColorRGB - The new RGB value

getQuadFourColor

public java.awt.Color getQuadFourColor()
Returns:
The current value of the Color for quadrant 4, null if no color is set

setQuadFourColor

public void setQuadFourColor(java.awt.Color qColor)
Sets the legend item color for quadrant 4

Parameters:
qColor - The new color for quadrant 4

setQuadFourColor

public void setQuadFourColor(int qColorRGB)
Sets the RGB value for the color in Quadrant 4

Parameters:
qColorRGB - The new RGB value

getCenterCircleColor

public java.awt.Color getCenterCircleColor()
Returns:
The current center Circle Color - null if no color is set

setCenterCircleColor

public void setCenterCircleColor(java.awt.Color qColor)
Sets the color value for the centre circle of the legend item

Parameters:
qColor - The new color value

setCenterCircleColor

public void setCenterCircleColor(int qColorRGB)
Sets the RGB value for the color for the centre circle of the legend item

Parameters:
qColorRGB - The new RGB value

getCenterSquareColor

public java.awt.Color getCenterSquareColor()
Returns:
The current center square color - null if no color is set

setCenterSquareColor

public void setCenterSquareColor(java.awt.Color qColor)
Sets the color for the centre square of the legend item

Parameters:
qColor - The new color value

setCenterSquareColor

public void setCenterSquareColor(int qColorRGB)
Sets the RGB value for the color for the centre squqre of the legend item

Parameters:
qColorRGB - The new RGB value

render

public void render(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Graphics2D g2d)
Paints an Icon and its description on the Pedigree surface

Parameters:
x - The X coordinate of the LegendItem Icon on the Pedigree surface
y - The Y coordinate of the LegendItem Icon on the Pedigree surface
g2d - The graphics context / paint brush for drawing.

copyItem

public void copyItem(LegendItem mCon)
Copies the the encoding details from the specified Legend Item and encodes this Legend item with them. The ID and Legend Text are not cloned in this exercise.

Parameters:
mCon - The legend item from which the encoding data is to be copied

getQuad1DotColor

public java.awt.Color getQuad1DotColor()
Getter for property quad1DotColor.

Returns:
Value of property quad1DotColor.

setQuad1DotColor

public void setQuad1DotColor(java.awt.Color aColor)
Setter for property quad1DotColor.

Parameters:
aColor - New value of property quad1DotColor.

getQuad2DotColor

public java.awt.Color getQuad2DotColor()
Getter for property quad2DotColor.

Returns:
Value of property quad2DotColor.

setQuad2DotColor

public void setQuad2DotColor(java.awt.Color aColor)
Setter for property quad2DotColor.

Parameters:
aColor - New value of property quad2DotColor.

getQuad3DotColor

public java.awt.Color getQuad3DotColor()
Getter for property quad3DotColor.

Returns:
Value of property quad3DotColor.

setQuad3DotColor

public void setQuad3DotColor(java.awt.Color aColor)
Setter for property quad3DotColor.

Parameters:
aColor - New value of property quad3DotColor.

getQuad4DotColor

public java.awt.Color getQuad4DotColor()
Getter for property quad4DotColor.

Returns:
Value of property quad4DotColor.

setQuad4DotColor

public void setQuad4DotColor(java.awt.Color aColor)
Setter for property quad4DotColor.

Parameters:
aColor - New value of property quad4DotColor.

getConditions

public java.util.List<LegendCondition> getConditions()
Specified by:
getConditions in interface ComparableLegendItem
Returns:
an Iterable list of subtext conditions or null if there are no conditions for this subtext

setConditions

public void setConditions(java.util.List<LegendCondition> aConditions)
Sets the new Iterable list of subtext conditions

Specified by:
setConditions in interface ComparableLegendItem
Parameters:
aConditions - The new list of conditions

getLegendDisplayText

public java.lang.String getLegendDisplayText()
Specified by:
getLegendDisplayText in interface ComparableLegendItem
Returns:
The display text for the legend item. This is what will be drawn on the left side of the subtext line

setLegendDisplayText

public void setLegendDisplayText(java.lang.String legendDisplayText)
Sets the display text for the legend item. This is what will be drawn on the left side of the subtext line

Specified by:
setLegendDisplayText in interface ComparableLegendItem

addCondition

public void addCondition(int ai_conditionfieldid,
                         CompareOperator a_operator,
                         java.lang.Object aCompareValue)
Adds a new Subtext condition that will determine whethere or not an Indvidual subject's subtext value should be deisplayed based on whether or not the data value in the specified field for this subtext item satisfies the specified condition.

Specified by:
addCondition in interface ComparableLegendItem
Parameters:
ai_conditionfieldid - The field on which the condition is based
a_operator - The comparison operator used.
aCompareValue - The value that the subject Individual's corresponding data field must satisfy in order for the condition to be statisfied.

addCondition

public void addCondition(int ai_tableid,
                         int ai_conditionfieldid,
                         CompareOperator a_operator,
                         java.lang.Object aCompareValue)

toConditionsMap

public java.util.Map<java.lang.Integer,java.util.Vector<LegendCondition>> toConditionsMap()
Specified by:
toConditionsMap in interface ComparableLegendItem
Returns:
An map containing lists of conditions grouped by "FIELDID" or null if this comparable item does not have any conditions. The map contains a Map of LegendCondition item vectors keyed by "FIELDID" so that if there are two conditions in the list for the same fieldid the array/vector will have two entries each containing the condition.

setQuadColor

protected void setQuadColor(LegendItem a_item,
                            int ai_quadno,
                            java.awt.Color a_color)

setQuadColor

protected void setQuadColor(int color,
                            LegendItem a_item,
                            int ai_quadno)

encodeQuadColor

public void encodeQuadColor(long al_legend_quad_color)
Updates LegendItem's quadrant color codes decoding the Long Integer passed as parameter. The item's new color scheme will be defined by decoding the bit segments of the 32 bit Long integer as described below.

BITSITEM VALUE
------------------- -----------------
1-3Quadrant 1 color See �colors� below
4-6Quadrant 2 color See �colors� below
7-9 Quadrant 3 color See �colors� below
10-12Quadrant 4 color See �colors� below
13-15Center circle color See �colors� below
16-18 Center square color See �colors� below
19 Show quadrant 1 1=show 0=hide
20 Show quadrant 2 1=show 0=hide
21 Show quadrant 3 1=show 0=hide
22Show quadrant 4 1=show 0=hide
23 Show circle 1=show 0=hide
24 Show square 1=show 0=hide
25 Show horizontal line 1=show 0=hide
26 Show vertical line 1=show 0=hide
27 Show quadrant1 dot 1=show 0=hide
28 Show quadrant2 dot 1=show 0=hide
29 Show quadrant3 dot 1=show 0=hide
30 Show quadrant4 dot 1=show 0=hide


LegendItem color for each quadrant or part thereof, can be any one of the following predefined colors. A value of ranging from 0 - 7 will determine the color used to paint a quadrant of this item.

ValueColor
----------
0 black
1 blue
2 yellow
3 green
4 red
5 gray
6 cyan
7 magenta


Example
--------
An icon that is shaded magenta on the top, black on the bottom and has a yellow dot at the center is defined by the following binary bit pattern (in bit order from 1-30) shown below :-

HOB<<<----- Bit order increases in this direction <<<<-----LOB

00000000011111 000 010 000 000 111 111

The decimal equivalent of the above binary number is 8134719. To get an Icon that is painted as described above, you would have to pass the value "8134719" to this method as "al_legend_quad_color"

Parameters:
al_legend_quad_color - A 32 bit integer which can be decoded as above.

isVisible

public boolean isVisible()
Returns:
TRUE if the item is to be displayed on the symbols legend. When set, this item will be eligible for display on the legend, otherwise it will be excluded from display as well as from any legend item counts etc

setVisible

public void setVisible(boolean visible)
Set the visible property. When set, this item will be eligible for display on the legend, otherwise it will be excluded from display as well as from any legend item counts etc. This is done so avert situations where hundreds or even thousands of legend items contained in the legend are all displayed.
Use this method to ensure that those legend items that are not used or referenced are not displayed on the legend.

Parameters:
visible - TRUE if the item is to be displayed on the symbols legend.

hasConditions

public boolean hasConditions()
Specified by:
hasConditions in interface ComparableLegendItem
Returns:
TRUE if the comparable item has some conditions associated with it.

render

public void render(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Graphics2D g2d,
                   boolean drawtext)
Paints an Icon and its description on the Pedigree surface

Parameters:
x - The X coordinate of the LegendItem Icon on the Pedigree surface
y - The Y coordinate of the LegendItem Icon on the Pedigree surface
g2d - The graphics context / paint brush for drawing.
drawtext - If true then the legend text will be drawn otherwise just the icon

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object