Home / Development / Documentation / 2.0.44 / ScaleBar
TreeGraph 2
 


info.bioinfweb.treegraph.document
Class ScaleBar

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

public class ScaleBar
extends AbstractTextElement
implements PaintableElement, LineElement, Cloneable

This element represents a scale bar for the branch length values.
Its text property stores the name of the unit that is displayed.

Author:
Ben Stöver

Field Summary
private  ScaleBarFormats formats
           
 
Fields inherited from class info.bioinfweb.treegraph.document.ConcretePaintableElement
positions
 
Constructor Summary
ScaleBar()
           
 
Method Summary
 void assignScaleBarData(ScaleBar other)
          This method currently does not do anything but should be called in the clone()-method of derived classes anyway because ScaleBar might contain data that needs to be copied in future versions.
 ScaleBar clone()
          Implementing classes should not copy the EnumMap positions because the copy of this element will be located at another position.
 ScaleBarFormats getFormats()
           
 void setFormats(ElementFormats formats)
           
 
Methods inherited from class info.bioinfweb.treegraph.document.AbstractTextElement
assignTextElementData, getData, toString
 
Methods inherited from class info.bioinfweb.treegraph.document.ConcretePaintableElement
getPosition
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface info.bioinfweb.treegraph.document.PaintableElement
getPosition
 

Field Detail

formats

private ScaleBarFormats formats
Constructor Detail

ScaleBar

public ScaleBar()
Method Detail

getFormats

public ScaleBarFormats getFormats()
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

assignScaleBarData

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


clone

public ScaleBar clone()
Description copied from class: ConcretePaintableElement
Implementing classes should not copy the EnumMap positions because the copy of this element will be located at another position. Therefor the copy will should an empty EnumMap.

Specified by:
clone in interface TextElement
Specified by:
clone in class AbstractTextElement