info.bioinfweb.treegraph.document.nodedata
Class BranchLengthAdapter

java.lang.Object
  extended by info.bioinfweb.treegraph.document.nodedata.BranchLengthAdapter
All Implemented Interfaces:
NodeDataAdapter

public class BranchLengthAdapter
extends Object
implements NodeDataAdapter


Field Summary
private static BranchLengthAdapter sharedInstance
           
 
Constructor Summary
BranchLengthAdapter()
           
 
Method Summary
 boolean decimalOnly()
           
 void delete(Node node)
           
 Branch getDataElement(Node node)
          This method should return the tree element which contains the data which is edited with the implementation of the respective adapter.
 double getDecimal(Node node)
           
static BranchLengthAdapter getSharedInstance()
           
 String getText(Node node)
           
 boolean isDecimal(Node node)
           
 boolean isEmpty(Node node)
           
 boolean isString(Node node)
           
 boolean readOnly()
           
 void setDecimal(Node node, double value)
           
 void setDecimal(Node node, double value, int decimalPlaceCount)
           
 void setText(Node node, String value)
           
 String toString()
          A description of the adapter that is readable by the user should be returned here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sharedInstance

private static BranchLengthAdapter sharedInstance
Constructor Detail

BranchLengthAdapter

public BranchLengthAdapter()
Method Detail

getSharedInstance

public static BranchLengthAdapter getSharedInstance()

decimalOnly

public boolean decimalOnly()
Specified by:
decimalOnly in interface NodeDataAdapter

readOnly

public boolean readOnly()
Specified by:
readOnly in interface NodeDataAdapter

isDecimal

public boolean isDecimal(Node node)
Specified by:
isDecimal in interface NodeDataAdapter

isEmpty

public boolean isEmpty(Node node)
Specified by:
isEmpty in interface NodeDataAdapter

isString

public boolean isString(Node node)
Specified by:
isString in interface NodeDataAdapter

setDecimal

public void setDecimal(Node node,
                       double value)
Specified by:
setDecimal in interface NodeDataAdapter

getText

public String getText(Node node)
Specified by:
getText in interface NodeDataAdapter

getDecimal

public double getDecimal(Node node)
                  throws NumberFormatException
Specified by:
getDecimal in interface NodeDataAdapter
Throws:
NumberFormatException

setDecimal

public void setDecimal(Node node,
                       double value,
                       int decimalPlaceCount)

setText

public void setText(Node node,
                    String value)
             throws NumberFormatException,
                    NodeDataActionNotSupportedException
Specified by:
setText in interface NodeDataAdapter
Throws:
NumberFormatException
NodeDataActionNotSupportedException

delete

public void delete(Node node)
Specified by:
delete in interface NodeDataAdapter

getDataElement

public Branch getDataElement(Node node)
Description copied from interface: NodeDataAdapter
This method should return the tree element which contains the data which is edited with the implementation of the respective adapter.

Specified by:
getDataElement in interface NodeDataAdapter
Returns:

toString

public String toString()
Description copied from interface: NodeDataAdapter
A description of the adapter that is readable by the user should be returned here.

Specified by:
toString in interface NodeDataAdapter
Overrides:
toString in class Object