Home / Development / Documentation / 2.0.44 / Legend
TreeGraph 2
 


info.bioinfweb.treegraph.document
Class Legend

java.lang.Object
  extended by info.bioinfweb.treegraph.document.ConcretePaintableElement
      extended by info.bioinfweb.treegraph.document.AbstractTextElement
          extended by info.bioinfweb.treegraph.document.Legend
All Implemented Interfaces:
CornerRadiusElement, LineElement, PaintableElement, TextElement, Cloneable

public class Legend
extends AbstractTextElement
implements LineElement, CornerRadiusElement


Field Summary
private  LegendFormats formats
           
private  Legends legends
           
 
Fields inherited from class info.bioinfweb.treegraph.document.ConcretePaintableElement
positions
 
Constructor Summary
Legend(Legends legends)
           
 
Method Summary
 void assignLegendData(Legend other)
          This method currently does not do anything but should be called in the clone()-method of derived classes anyway because Legend might contain data that needs to be copied in future versions.
 Legend clone()
          Returns a deep copy of this legend.
 LegendFormats getFormats()
           
 Legends getLegends()
           
 LegendPositionData getPosition(PositionPaintType type)
          Returns the stored DataPosition-object of an for an positioner- identifier.
 void reinsert()
           
 void setFormats(ElementFormats formats)
           
 void setLegends(Legends legends)
           
 
Methods inherited from class info.bioinfweb.treegraph.document.AbstractTextElement
assignTextElementData, getData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

legends

private Legends legends

formats

private LegendFormats formats
Constructor Detail

Legend

public Legend(Legends legends)
Method Detail

getLegends

public Legends getLegends()

setLegends

public void setLegends(Legends legends)

getFormats

public LegendFormats getFormats()
Specified by:
getFormats in interface CornerRadiusElement
Specified by:
getFormats in interface LineElement
Specified by:
getFormats in interface PaintableElement
Specified by:
getFormats in interface TextElement
Specified by:
getFormats in class AbstractTextElement

setFormats

public void setFormats(ElementFormats formats)
Specified by:
setFormats in interface PaintableElement

getPosition

public LegendPositionData getPosition(PositionPaintType type)
Description copied from interface: PaintableElement
Returns the stored DataPosition-object of an for an positioner- identifier. If no position-object has been stored for this identifier, one will be created.

Specified by:
getPosition in interface PaintableElement
Overrides:
getPosition in class ConcretePaintableElement
Returns:
the stored position

reinsert

public void reinsert()

assignLegendData

public void assignLegendData(Legend other)
This method currently does not do anything but should be called in the clone()-method of derived classes anyway because Legend might contain data that needs to be copied in future versions.
Note that this method does and will not copy the LegendFormats-object.


clone

public Legend clone()
Returns a deep copy of this legend. Note that the linked Legends-object of the returned object is null no matter if this object was linked or not.

Specified by:
clone in interface TextElement
Specified by:
clone in class AbstractTextElement
See Also:
ConcretePaintableElement.clone()