org.forester.archaeopteryx.phylogeny.data
Class RenderableDomainArchitecture

java.lang.Object
  extended by org.forester.phylogeny.data.DomainArchitecture
      extended by org.forester.archaeopteryx.phylogeny.data.RenderableDomainArchitecture
All Implemented Interfaces:
RenderablePhylogenyData, PhylogenyData

public final class RenderableDomainArchitecture
extends DomainArchitecture
implements RenderablePhylogenyData


Field Summary
 
Fields inherited from class org.forester.phylogeny.data.DomainArchitecture
NHX_SEPARATOR
 
Constructor Summary
RenderableDomainArchitecture(DomainArchitecture domain_structure)
           
 
Method Summary
 StringBuffer asSimpleText()
           
 StringBuffer asText()
           
 PhylogenyData copy()
          Creates a new PhylogenyData object with identical values as this PhylogenyData.
 ProteinDomain getDomain(int i)
           
 SortedMap<Double,ProteinDomain> getDomains()
           
 int getNumberOfDomains()
           
 Dimension getOriginalSize()
           
 Object getParameter()
           
 double getRenderingFactorWidth()
           
 Dimension getRenderingSize()
           
 int getTotalLength()
           
 boolean isDisplayDomainNames()
           
 boolean isEqual(PhylogenyData data)
          Returns true if the names and the order of the domains match (domain and linker lengths are ignored).
 void render(double x1, double y1, Graphics2D g, TreePanel tree_panel, boolean to_pdf)
          This can be used to render phylogeny data as graphics (for example, display of the domain structure).
static void setColorMap(Map<String,Color> domain_colors)
           
 void setDisplayDomainNames(boolean display_domain_names)
           
 void setParameter(double e_value_threshold_exp)
           
 void setRenderingFactorWidth(double rendering_factor_width)
           
 void setRenderingHeight(double rendering_height)
           
 StringBuffer toNHX()
           
 void toPhyloXML(Writer writer, int level, String indentation)
          Writes a phyloXML representation of this phylogeny data.
 
Methods inherited from class org.forester.phylogeny.data.DomainArchitecture
addDomain, setTotalLength, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenderableDomainArchitecture

public RenderableDomainArchitecture(DomainArchitecture domain_structure)
Method Detail

asSimpleText

public StringBuffer asSimpleText()
Specified by:
asSimpleText in interface PhylogenyData
Overrides:
asSimpleText in class DomainArchitecture

asText

public StringBuffer asText()
Specified by:
asText in interface PhylogenyData
Overrides:
asText in class DomainArchitecture

copy

public PhylogenyData copy()
Description copied from interface: PhylogenyData
Creates a new PhylogenyData object with identical values as this PhylogenyData. This ~should~ return a deep copy, but not there yet.

Specified by:
copy in interface PhylogenyData
Overrides:
copy in class DomainArchitecture
Returns:
a ~deep~ copy of this PhylogenyData

getDomain

public ProteinDomain getDomain(int i)
Overrides:
getDomain in class DomainArchitecture

getDomains

public SortedMap<Double,ProteinDomain> getDomains()
Overrides:
getDomains in class DomainArchitecture

getNumberOfDomains

public int getNumberOfDomains()
Overrides:
getNumberOfDomains in class DomainArchitecture

getOriginalSize

public Dimension getOriginalSize()
Specified by:
getOriginalSize in interface RenderablePhylogenyData

getParameter

public Object getParameter()
Specified by:
getParameter in interface RenderablePhylogenyData

getRenderingFactorWidth

public double getRenderingFactorWidth()

getRenderingSize

public Dimension getRenderingSize()
Specified by:
getRenderingSize in interface RenderablePhylogenyData

getTotalLength

public int getTotalLength()
Overrides:
getTotalLength in class DomainArchitecture

isDisplayDomainNames

public boolean isDisplayDomainNames()

isEqual

public boolean isEqual(PhylogenyData data)
Description copied from class: DomainArchitecture
Returns true if the names and the order of the domains match (domain and linker lengths are ignored).

Specified by:
isEqual in interface PhylogenyData
Overrides:
isEqual in class DomainArchitecture
Returns:
in general, true if and only if all fiels are exactly identical, false otherwise

render

public void render(double x1,
                   double y1,
                   Graphics2D g,
                   TreePanel tree_panel,
                   boolean to_pdf)
Description copied from interface: RenderablePhylogenyData
This can be used to render phylogeny data as graphics (for example, display of the domain structure). In most Renderable implementations this will do nothing (i.e. just return).

Specified by:
render in interface RenderablePhylogenyData
g - the Graphics to render to

setDisplayDomainNames

public void setDisplayDomainNames(boolean display_domain_names)

setParameter

public void setParameter(double e_value_threshold_exp)
Specified by:
setParameter in interface RenderablePhylogenyData

setRenderingFactorWidth

public void setRenderingFactorWidth(double rendering_factor_width)

setRenderingHeight

public void setRenderingHeight(double rendering_height)
Specified by:
setRenderingHeight in interface RenderablePhylogenyData

toNHX

public StringBuffer toNHX()
Specified by:
toNHX in interface PhylogenyData
Overrides:
toNHX in class DomainArchitecture

toPhyloXML

public void toPhyloXML(Writer writer,
                       int level,
                       String indentation)
                throws IOException
Description copied from interface: PhylogenyData
Writes a phyloXML representation of this phylogeny data.

Specified by:
toPhyloXML in interface PhylogenyData
Overrides:
toPhyloXML in class DomainArchitecture
Throws:
IOException

setColorMap

public static void setColorMap(Map<String,Color> domain_colors)