com.objex.panywhere
Class Symbol

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

public class Symbol
extends java.lang.Object
implements SymbolModel, java.io.Serializable

A Symbol object has any number of LegendItems assigned to it depending on whether or not the Individual who owns the Symbol has custom data and other properties that satisfy the LegendItems' where clauses / conditions. If a LegendItem has been assigned to the Symbol object, the method Symbol.matches(LegendItem) must return true. Any region of an Individual's icon can be interpretted by referring to the Pedigree Legend to determine what traits are being represented by the LegendItems assigned to this Symbol.

See Also:
LegendItem, Serialized Form

Constructor Summary
Symbol()
          Creates a new Symbol object with no color coding schemes
Symbol(java.lang.String ID)
          Creates a new Symbol object whose ID property is set to UPN of the Individual who owns the symbol.
 
Method Summary
 void addSymbolChangeListener(SymbolChangeListener listener)
          Allows users of Symbol Bean to registser for Icon update events.
 void assign(LegendItem aItem)
          Assigns aItem as one of the legend Items for this Symbol.
 void assignLegendItem(LegendItem aItem)
          Assigns a LegendItem to this symbol.
 void clear()
          Unassigns all assigned LegendItems.
 void cloneSymbol(LegendItem aItem)
          Assigns aItem as one of the legend Items for this Symbol.
 Symbol cloneSymbol(java.lang.String ownerid)
          Returns a clone of this Symbol object with a different ownerid reference.
 void fireSymbolChanged(SymbolChangeEvent evt)
          Fires/excutes UpdateIcon events and executes the locally implemented version of method iconUpdated().
 java.awt.Color getCenterCircleColor()
           
 java.awt.Color getCenterSquareColor()
           
 java.lang.String getOwnerID()
          Getter for property ownerID.
 java.awt.Color getQuad1DotColor()
          Getter for property quad1DotColor.
 java.awt.Color getQuad2DotColor()
          Getter for property quad2DotColor.
 java.awt.Color getQuad3DotColor()
          Getter for property quad3DotColor.
 java.awt.Color getQuad4DotColor()
          Getter for property quad4DotColor.
 java.awt.Color getQuadFourColor()
           
 java.awt.Color getQuadOneColor()
           
 java.awt.Color getQuadThreeColor()
           
 java.awt.Color getQuadTwoColor()
           
 boolean isHLine()
           
 boolean isQuad1Dot()
           
 boolean isQuad2Dot()
           
 boolean isQuad3Dot()
           
 boolean isQuad4Dot()
           
 boolean isQuestionMark()
           
 boolean isVLine()
           
 boolean matches(LegendItem aItem)
          Determines whether or not a Symbol had the specified LegendItem assigned to it.
 void removeSymbolChangeListener(SymbolChangeListener listener)
          Allows users of Symbol Bean to de-registser Icon update events.
 void setCenterCircleColor(java.awt.Color qColor)
          Sets the color value for the centre circle of the symbol.
 void setCenterCircleColor(int qColorRGB)
          Sets the RGB value for the color for the centre circle of the symbol.
 void setCenterSquareColor(java.awt.Color qColor)
          Sets the color for the centre square of the symbol.
 void setCenterSquareColor(int qColorRGB)
          Sets the RGB value for the color for the centre squqre of the symbol.
 void setHLine(boolean rhs)
          Sets or unsets the vertical line flag for this symbol depending on the value of parameter passed.
 void setOwnerID(java.lang.String ownerID)
          Setter for property ownerID.
 void setQuad1Dot(boolean qColor)
          Sets the symbol color for quadrant 1 dot to a default of black or to null depending on value of parameter bColor.
 void setQuad1DotColor(java.awt.Color quad1DotColor)
          Setter for property quad1DotColor.
 void setQuad2Dot(boolean qColor)
          Sets the symbol color for quadrant 2 dot to a default of black or to null depending on value of parameter bColor.
 void setQuad2DotColor(java.awt.Color quad2DotColor)
          Setter for property quad2DotColor.
 void setQuad3Dot(boolean qColor)
          Sets the symbol color for quadrant 3 dot to a default of black or to null depending on value of parameter bColor.
 void setQuad3DotColor(java.awt.Color quad3DotColor)
          Setter for property quad3DotColor.Must generate a SymbolChangeEvent with quadrant seven (7) as the source.
 void setQuad4Dot(boolean qColor)
          Sets the symbol color for quadrant 4 dot to a default of black or to null depending on value of parameter bColor.
 void setQuad4DotColor(java.awt.Color quad4DotColor)
          Setter for property quad4DotColor.
 void setQuadFourColor(java.awt.Color qColor)
          Sets the symbol color for quadrant 4.
 void setQuadFourColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 4.
 void setQuadOneColor(java.awt.Color qColor)
          Sets the symbol color for quadrant 1.
 void setQuadOneColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 1.
 void setQuadThreeColor(java.awt.Color qColor)
          Sets the symbol color for quadrant 3.
 void setQuadThreeColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 3.
 void setQuadTwoColor(java.awt.Color qColor)
          Sets the symbol color for quadrant 2.
 void setQuadTwoColor(int qColorRGB)
          Sets the RGB value for the color in Quadrant 2.
 void setQuestionMark(boolean q)
          Sets the flag to show question mark symbol to true or false.
 void setVLine(boolean vline)
           
 void unassign(LegendItem aItem)
          De-assigns the encoding arising from the object aItem which may have been removed or updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Symbol

public Symbol()
Creates a new Symbol object with no color coding schemes


Symbol

public Symbol(java.lang.String ID)
Creates a new Symbol object whose ID property is set to UPN of the Individual who owns the symbol.

Parameters:
ID - The UPN of the owner of this symbol object
Method Detail

isQuestionMark

public boolean isQuestionMark()
Specified by:
isQuestionMark in interface SymbolModel
Returns:
True if Question mark symbol is set and false otherwise

setQuestionMark

public void setQuestionMark(boolean q)
Description copied from interface: SymbolModel
Sets the flag to show question mark symbol to true or false. Must generate a SymbolChangeEvent with quadrant eleven(11) as the source.

Specified by:
setQuestionMark in interface SymbolModel
Parameters:
q - The value to set (True or False)

isQuad1Dot

public boolean isQuad1Dot()
Specified by:
isQuad1Dot in interface SymbolModel
Returns:
True if quadrant 1 dot must be shown

setQuad1Dot

public void setQuad1Dot(boolean qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 1 dot to a default of black or to null depending on value of parameter bColor. Must generate a SymbolChangeEvent with quadrant five(5) as the source.

Specified by:
setQuad1Dot in interface SymbolModel
Parameters:
qColor - A boolean indicating whether or not to set the quadrant 1 dot to default color.

isQuad2Dot

public boolean isQuad2Dot()
Specified by:
isQuad2Dot in interface SymbolModel
Returns:
True if quadrant 2 dot must be shown

setQuad2Dot

public void setQuad2Dot(boolean qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 2 dot to a default of black or to null depending on value of parameter bColor. Must generate a SymbolChangeEvent with quadrant six(6) as the source.

Specified by:
setQuad2Dot in interface SymbolModel
Parameters:
qColor - A boolean indicating whether or not to set the quadrant 2 dot to default color.

isQuad3Dot

public boolean isQuad3Dot()
Specified by:
isQuad3Dot in interface SymbolModel
Returns:
True if quadrant 3 dot must be shown

setQuad3Dot

public void setQuad3Dot(boolean qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 3 dot to a default of black or to null depending on value of parameter bColor. Must generate a SymbolChangeEvent with quadrant seven(7) as the source.

Specified by:
setQuad3Dot in interface SymbolModel
Parameters:
qColor - A boolean indicating whether or not to set the quadrant 3 dot to default color.

isQuad4Dot

public boolean isQuad4Dot()
Specified by:
isQuad4Dot in interface SymbolModel
Returns:
True if quadrant 4 dot must be shown

setQuad4Dot

public void setQuad4Dot(boolean qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 4 dot to a default of black or to null depending on value of parameter bColor. Must generate a SymbolChangeEvent with quadrant eight(8) as the source.

Specified by:
setQuad4Dot in interface SymbolModel
Parameters:
qColor - A boolean indicating whether or not to set the quadrant 4 dot to default color.

isVLine

public boolean isVLine()
Specified by:
isVLine in interface SymbolModel
Returns:
True if vertical line must be shown

setVLine

public void setVLine(boolean vline)
Specified by:
setVLine in interface SymbolModel

isHLine

public boolean isHLine()
Specified by:
isHLine in interface SymbolModel
Returns:
True if horizontal line must be shown

setHLine

public void setHLine(boolean rhs)
Description copied from interface: SymbolModel
Sets or unsets the vertical line flag for this symbol depending on the value of parameter passed.

Specified by:
setHLine in interface SymbolModel
Parameters:
rhs - Boolean indicating whether to set or unset the h/zontal line flag

getQuadOneColor

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

setQuadOneColor

public void setQuadOneColor(java.awt.Color qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 1. Must generate a SymbolChangeEvent with quadrant one(1) as the source.

Specified by:
setQuadOneColor in interface SymbolModel
Parameters:
qColor - The new color for quadrant 1

setQuadOneColor

public void setQuadOneColor(int qColorRGB)
Description copied from interface: SymbolModel
Sets the RGB value for the color in Quadrant 1. Must generate a SymbolChangeEvent with quadrant one(1) as the source.

Specified by:
setQuadOneColor in interface SymbolModel
Parameters:
qColorRGB - The new RGB value

getQuadTwoColor

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

setQuadTwoColor

public void setQuadTwoColor(java.awt.Color qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 2. Must generate a SymbolChangeEvent with quadrant two(2) as the source.

Specified by:
setQuadTwoColor in interface SymbolModel
Parameters:
qColor - The new color for quadrant 2

setQuadTwoColor

public void setQuadTwoColor(int qColorRGB)
Description copied from interface: SymbolModel
Sets the RGB value for the color in Quadrant 2. Must generate a SymbolChangeEvent with quadrant two(2) as the source.

Specified by:
setQuadTwoColor in interface SymbolModel
Parameters:
qColorRGB - The new RGB value

getQuadThreeColor

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

setQuadThreeColor

public void setQuadThreeColor(java.awt.Color qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 3. Must generate a SymbolChangeEvent with quadrant three(3) as the source.

Specified by:
setQuadThreeColor in interface SymbolModel
Parameters:
qColor - The new color for quadrant 3

setQuadThreeColor

public void setQuadThreeColor(int qColorRGB)
Description copied from interface: SymbolModel
Sets the RGB value for the color in Quadrant 3. Must generate a SymbolChangeEvent with quadrant three(3) as the source.

Specified by:
setQuadThreeColor in interface SymbolModel
Parameters:
qColorRGB - The new RGB value

getQuadFourColor

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

setQuadFourColor

public void setQuadFourColor(java.awt.Color qColor)
Description copied from interface: SymbolModel
Sets the symbol color for quadrant 4. Must generate a SymbolChangeEvent with quadrant four(4) as the source.

Specified by:
setQuadFourColor in interface SymbolModel
Parameters:
qColor - The new color for quadrant 4

setQuadFourColor

public void setQuadFourColor(int qColorRGB)
Description copied from interface: SymbolModel
Sets the RGB value for the color in Quadrant 4. Must generate a SymbolChangeEvent with quadrant four(4) as the source.

Specified by:
setQuadFourColor in interface SymbolModel
Parameters:
qColorRGB - The new RGB value

getCenterCircleColor

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

setCenterCircleColor

public void setCenterCircleColor(java.awt.Color qColor)
Description copied from interface: SymbolModel
Sets the color value for the centre circle of the symbol. Must generate a SymbolChangeEvent with quadrant nine (9) as the source.

Specified by:
setCenterCircleColor in interface SymbolModel
Parameters:
qColor - The new color value

setCenterCircleColor

public void setCenterCircleColor(int qColorRGB)
Description copied from interface: SymbolModel
Sets the RGB value for the color for the centre circle of the symbol. Must generate a SymbolChangeEvent with quadrant nine (9) as the source.

Specified by:
setCenterCircleColor in interface SymbolModel
Parameters:
qColorRGB - The new RGB value

getCenterSquareColor

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

setCenterSquareColor

public void setCenterSquareColor(java.awt.Color qColor)
Description copied from interface: SymbolModel
Sets the color for the centre square of the symbol. Must generate a SymbolChangeEvent with quadrant ten(10) as the source.

Specified by:
setCenterSquareColor in interface SymbolModel
Parameters:
qColor - The new color value

setCenterSquareColor

public void setCenterSquareColor(int qColorRGB)
Description copied from interface: SymbolModel
Sets the RGB value for the color for the centre squqre of the symbol. Must generate a SymbolChangeEvent with quadrant ten(10) as the source.

Specified by:
setCenterSquareColor in interface SymbolModel
Parameters:
qColorRGB - The new RGB value

cloneSymbol

public void cloneSymbol(LegendItem aItem)
Assigns aItem as one of the legend Items for this Symbol. If a Symbol with the same ID already exists it will be replaced

Specified by:
cloneSymbol in interface SymbolModel
Parameters:
aItem - The LegendItem whose encoding is to be copied to this Symbol
See Also:
assign(LegendItem)

matches

public boolean matches(LegendItem aItem)
Description copied from interface: SymbolModel
Determines whether or not a Symbol had the specified LegendItem assigned to it. A Symbol is said to match a Legend Item object IFF all the set regions or non-NULL regions of a LegendItem are matched in the Symbol object. For instance if a LegendItem object has quadrant one (1) set to red and quadrant three (3) set to blue, then for a Symbol object to match this LegendItem, it must have the corresponding quadrants set to the same colors as in the LegendItem (red and blue in this case).

Specified by:
matches in interface SymbolModel
Parameters:
aItem - The LegendItem to compare to
Returns:
TRUE if this Symbol has the legend item aItem assigned

cloneSymbol

public Symbol cloneSymbol(java.lang.String ownerid)
Returns a clone of this Symbol object with a different ownerid reference. all the encoding information from the source Symbol is retained in the clone.

Specified by:
cloneSymbol in interface SymbolModel
Parameters:
ownerid - The new ownerid for the cloned Symbol object.

getOwnerID

public java.lang.String getOwnerID()
Getter for property ownerID.

Specified by:
getOwnerID in interface SymbolModel
Returns:
Value of property ownerID.

setOwnerID

public void setOwnerID(java.lang.String ownerID)
Setter for property ownerID.

Specified by:
setOwnerID in interface SymbolModel
Parameters:
ownerID - New value of property ownerID.

addSymbolChangeListener

public void addSymbolChangeListener(SymbolChangeListener listener)
Allows users of Symbol Bean to registser for Icon update events.


removeSymbolChangeListener

public void removeSymbolChangeListener(SymbolChangeListener listener)
Allows users of Symbol Bean to de-registser Icon update events.


fireSymbolChanged

public void fireSymbolChanged(SymbolChangeEvent evt)
Fires/excutes UpdateIcon events and executes the locally implemented version of method iconUpdated().

Parameters:
evt - The UpdateIcon event generated when any one of the quadrant's colors have changed / been updated

getQuad1DotColor

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

Specified by:
getQuad1DotColor in interface SymbolModel
Returns:
Value of property quad1DotColor.

setQuad1DotColor

public void setQuad1DotColor(java.awt.Color quad1DotColor)
Description copied from interface: SymbolModel
Setter for property quad1DotColor. Must generate a SymbolChangeEvent with quadrant five (5) as the source.

Specified by:
setQuad1DotColor in interface SymbolModel
Parameters:
quad1DotColor - New value of property quad1DotColor.

getQuad2DotColor

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

Specified by:
getQuad2DotColor in interface SymbolModel
Returns:
Value of property quad2DotColor.

setQuad2DotColor

public void setQuad2DotColor(java.awt.Color quad2DotColor)
Description copied from interface: SymbolModel
Setter for property quad2DotColor. Must generate a SymbolChangeEvent with quadrant six (6) as the source.

Specified by:
setQuad2DotColor in interface SymbolModel
Parameters:
quad2DotColor - New value of property quad2DotColor.

getQuad3DotColor

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

Specified by:
getQuad3DotColor in interface SymbolModel
Returns:
Value of property quad3DotColor.

setQuad3DotColor

public void setQuad3DotColor(java.awt.Color quad3DotColor)
Description copied from interface: SymbolModel
Setter for property quad3DotColor.Must generate a SymbolChangeEvent with quadrant seven (7) as the source.

Specified by:
setQuad3DotColor in interface SymbolModel
Parameters:
quad3DotColor - New value of property quad3DotColor.

getQuad4DotColor

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

Specified by:
getQuad4DotColor in interface SymbolModel
Returns:
Value of property quad4DotColor.

setQuad4DotColor

public void setQuad4DotColor(java.awt.Color quad4DotColor)
Description copied from interface: SymbolModel
Setter for property quad4DotColor. Must generate a SymbolChangeEvent with quadrant eight (8) as the source.

Specified by:
setQuad4DotColor in interface SymbolModel
Parameters:
quad4DotColor - New value of property quad4DotColor.

assignLegendItem

public void assignLegendItem(LegendItem aItem)
Assigns a LegendItem to this symbol. The result is that when the symbol is painted, the encoding information on the LegendItem will be used to show the presense and/or asbsence of the condition represented by the assigned LegendItem.

Since:
2.0

clear

public void clear()
Unassigns all assigned LegendItems. Once this is done, no encoding information remains in this Symbol object


unassign

public void unassign(LegendItem aItem)
De-assigns the encoding arising from the object aItem which may have been removed or updated.

Parameters:
aItem - The legend item whose encoding has to be unassigned from this Symbol object

assign

public void assign(LegendItem aItem)
Assigns aItem as one of the legend Items for this Symbol. If a Symbol with the same ID already exists it will be replaced

Parameters:
aItem - The LegendItem whose encoding has to be copied to the Symbol