|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.objex.panywhere.SubtextLegend
public class SubtextLegend
This class defines the Legend for the Subtext elements of an Individual. The SubtextLegend contains any number of SubtextLegendItems that correspond to the custom data contained in the "dataitems" property of the Individual object. While there is only one SubtextLegend object for the whole control, as many instances of the legend are drawn as there are generations within the Pedigree, with each instance being rendered relative to the leftmost Individual within the generation. Rendering SubtextLegend can be switched on or off by setting the Pedigree.setShowSubtextLegend(Boolean) property.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_SAMPLE_PROPERTY
|
| Constructor Summary | |
|---|---|
SubtextLegend()
Creates a new SubtextLegend instance |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
addSubtextLegendItem(SubtextLegendItem aItem)
Add a new subtext legend item to the subtextlegend |
void |
addSubtextListener(SubtextListener listener)
Interested classes must register to receieve Subtext Events |
void |
clearLegend()
Clears the Subtext Legend. |
int |
count()
|
protected void |
fireSubtextLegendItemAdded(SubtextEvent evt)
Fires SubtextEvent events whenevenr a new subtext legend item has been added |
protected void |
fireSubtextLegendItemRemoved(SubtextEvent evt)
Fires SubtextEvent events whenever a new subtext legend item has been removed |
double |
getHeight()
Returns the maximum height of the subtext legend. |
int |
getItemCount()
|
SubtextLegendItem |
getLegendItem(int ai_order)
|
java.lang.String |
getSampleProperty()
|
SubtextLegendItem |
getSubtextLegendItem(int ai_fieldid)
|
java.util.Map<java.lang.Integer,SubtextLegendItem> |
getSubtextLegendItems()
|
java.util.Iterator<SubtextLegendItem> |
getSubtextLegendIterator()
Return an Iterable list of all SubtextLegendItems in this subtext legend. |
java.util.Iterator<SubtextLegendItem> |
getSubtextLegendIterator(boolean ab_odered)
Return an Iterable list of all SubtextLegendItems in this subtext legend. |
double |
getWidth()
Returns the maximum width of the subtext legend. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
SubtextLegendItem |
removeSubtextLegendItem(int ai_fieldid)
Removes the SubtextLegendItem object corresponding to data field whose id is "ai_fieldid " |
void |
removeSubtextListener(SubtextListener listener)
Used to removed SubtextListeners |
protected void |
render(java.awt.Graphics2D g2d,
DrawingContext dc,
double ad_genY,
double ad_rightMargin)
Draws all the SubtextLegendItem lines. |
void |
setHeight(double ai_height)
Sets the maximum height of the subtext legend. |
void |
setSampleProperty(java.lang.String value)
|
void |
setSubtextLegendItems(java.util.Map<java.lang.Integer,SubtextLegendItem> aSubtextLegendItems)
Sets the new list of subtext legend Items |
void |
setWidth(double ai_width)
Sets the maximum width of the subtext legend. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROP_SAMPLE_PROPERTY
| Constructor Detail |
|---|
public SubtextLegend()
| Method Detail |
|---|
public java.lang.String getSampleProperty()
public void setSampleProperty(java.lang.String value)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public SubtextLegendItem getSubtextLegendItem(int ai_fieldid)
public SubtextLegendItem removeSubtextLegendItem(int ai_fieldid)
public void addSubtextLegendItem(SubtextLegendItem aItem)
aItem - The Legend item object to be addedpublic double getWidth()
public void setWidth(double ai_width)
ai_width - The new maximum width for the subtext legendpublic double getHeight()
public void setHeight(double ai_height)
ai_height - The new maximum height for the subtext legendpublic void clearLegend()
public int count()
protected void render(java.awt.Graphics2D g2d,
DrawingContext dc,
double ad_genY,
double ad_rightMargin)
g2d - The graphics objectdc - The drawing context with the control's specific rendering properties. Of particular importance is the Font used for rendering subtext
which is obtained from the "dc".ad_genY - The Y-Coordinate of the leftmost Individual in the generation for which this SubtextLegend is being drawnad_rightMargin - The X-Coordinate of the leftmost Individual within the generation for which this SubtextLegend is being drawn. The
SubtextLegendItems will be rendered relative to this X-Coordinatepublic void addSubtextListener(SubtextListener listener)
listener - The SubtextListener object to be added or registeredpublic void removeSubtextListener(SubtextListener listener)
listener - The SubtextListenerprotected void fireSubtextLegendItemAdded(SubtextEvent evt)
evt - The AddEventprotected void fireSubtextLegendItemRemoved(SubtextEvent evt)
evt - The SubtextEventpublic java.util.Iterator<SubtextLegendItem> getSubtextLegendIterator()
public java.util.Iterator<SubtextLegendItem> getSubtextLegendIterator(boolean ab_odered)
public java.util.Map<java.lang.Integer,SubtextLegendItem> getSubtextLegendItems()
public void setSubtextLegendItems(java.util.Map<java.lang.Integer,SubtextLegendItem> aSubtextLegendItems)
aSubtextLegendItems - The new map of subtext legend Itemspublic int getItemCount()
public SubtextLegendItem getLegendItem(int ai_order)
ai_order - The line number/order for the SubtextLegendItem to be returned
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||