Home / Development / Documentation / 2.0.44 / AbstractLegendAdapter
TreeGraph 2
 


info.bioinfweb.treegraph.document.format.adapters.distance
Class AbstractLegendAdapter

java.lang.Object
  extended by info.bioinfweb.treegraph.document.format.adapters.distance.AbstractLegendAdapter
All Implemented Interfaces:
DistanceAdapter
Direct Known Subclasses:
LegendLineWidthAdapter, LegendMarginBottomAdapter, LegendMarginLeftAdapter, LegendMarginRightAdapter, LegendMarginTopAdapter, LegendSpacingAdapter, LegendTextHeightAdapter

public abstract class AbstractLegendAdapter
extends Object
implements DistanceAdapter

This class is the superclass of all distance adapters which have emty implementations of their methods and are only used to be selectable items in an adapter list.

Since:
2.0.24
Author:
Ben Stöver

Constructor Summary
AbstractLegendAdapter()
           
 
Method Summary
 float getDistance(Node node)
          This method always returns Float.NaN.
abstract  DistanceValue getDistanceValue(LegendFormats formats)
           
 void setDistance(float distance, Node node)
          This method does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLegendAdapter

public AbstractLegendAdapter()
Method Detail

getDistance

public float getDistance(Node node)
This method always returns Float.NaN.

Specified by:
getDistance in interface DistanceAdapter
Parameters:
node - the node to get the distance value from
Returns:
See Also:
DistanceAdapter.getDistance(info.bioinfweb.treegraph.document.Node)

setDistance

public void setDistance(float distance,
                        Node node)
This method does nothing.

Specified by:
setDistance in interface DistanceAdapter
Parameters:
distance - the new distance value in millimeters
See Also:
DistanceAdapter.setDistance(float, info.bioinfweb.treegraph.document.Node)

getDistanceValue

public abstract DistanceValue getDistanceValue(LegendFormats formats)