P
- Type of the product.java.lang.Runnable
public class LayoutDirector<P>
extends java.lang.Object
implements java.lang.Runnable
LayoutDirector
produces a graphical representation of a layout of an
SBMLDocument
.Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
COMPARTMENT_LINK |
Constant for use as the key for compartment links, also see
LAYOUT_LINK . |
static java.lang.String |
KEY_FOR_FLUX_VALUES |
Constant for use as the key for flux values.
|
static java.lang.String |
LAYOUT_LINK |
Constant for use as the key for layout links.
|
static java.lang.String |
NO_WHISKERS |
|
static java.lang.String |
PN_RELATIVE_DOCKING_POINT |
Constant for use as the key for relative docking points.
|
static java.lang.String |
SPECIAL_ROTATION_NEEDED |
|
static java.lang.String |
SPECIES_RELATIVE_DOCKING_POINT |
Constant for use as the key for relative docking points for a species,
also see
PN_RELATIVE_DOCKING_POINT . |
Constructor | Description |
---|---|
LayoutDirector(java.io.File inputFile,
LayoutBuilder<P> builder,
LayoutAlgorithm algorithm) |
|
LayoutDirector(Layout layout,
LayoutBuilder<P> builder,
LayoutAlgorithm algorithm) |
|
LayoutDirector(SBMLDocument doc,
LayoutBuilder<P> builder,
LayoutAlgorithm algorithm) |
|
LayoutDirector(SBMLDocument doc,
LayoutBuilder<P> builder,
LayoutAlgorithm algorithm,
int index) |
Modifier and Type | Method | Description |
---|---|---|
static SpeciesReferenceRole |
determineRole(SpeciesReferenceGlyph srg) |
|
static boolean |
edgeIsLayouted(ReactionGlyph reactionGlyph,
SpeciesReferenceGlyph speciesReferenceGlyph) |
Check if the incoming edge is layouted, i.e. if it has a curve.
|
java.lang.Boolean |
getAddWhiskers() |
Returns the value of addWhiskers
|
LayoutAlgorithm |
getAlgorithm() |
|
LayoutBuilder<P> |
getBuilder() |
|
int |
getLayoutIndex() |
|
P |
getProduct() |
Return the product of the building process.
|
static boolean |
glyphHasDimensions(GraphicalObject glyph) |
Check if a glyph has dimensions.
|
static boolean |
glyphHasPosition(GraphicalObject glyph) |
Check if a glyph has a position.
|
static boolean |
glyphIsLayouted(GraphicalObject glyph) |
Check if a glyph as complete layout information (i.e. if it as both
dimensions and position).
|
static boolean |
isModifier(SpeciesReferenceGlyph srg) |
Check if a species reference glyph can be interpreted as an activator,
inhibitor, or generic modifier.
|
static boolean |
isProduct(SpeciesReferenceGlyph srg) |
Check if a species reference glyph is a product.
|
java.lang.Boolean |
isSetAddWhiskers() |
Returns whether addWhiskers is set
|
static boolean |
isSubstrate(SpeciesReferenceGlyph srg) |
Check if a species reference glyph is a substrate.
|
void |
run() |
|
void |
setAddWhiskers(java.lang.Boolean addWhiskers) |
Sets the value of addWhiskers
|
void |
setAlgorithm(LayoutAlgorithm algorithm) |
|
void |
setBuilder(LayoutBuilder<P> builder) |
|
void |
setLayoutIndex(int layoutIndex) |
|
static boolean |
textGlyphIsIndependent(TextGlyph textGlyph) |
Check whether a text glyph represents an independent text (i.e. it is not
associated with any other graphical object or species.
|
java.lang.String |
toString() |
|
boolean |
unsetAddWhiskers() |
Unsets the variable addWhiskers
|
public static final java.lang.String SPECIAL_ROTATION_NEEDED
public static final java.lang.String NO_WHISKERS
public static final java.lang.String KEY_FOR_FLUX_VALUES
public static final java.lang.String LAYOUT_LINK
public static final java.lang.String COMPARTMENT_LINK
LAYOUT_LINK
.public static final java.lang.String PN_RELATIVE_DOCKING_POINT
ReactionGlyph
to denote the relative docking position of the
connecting arcs.public static final java.lang.String SPECIES_RELATIVE_DOCKING_POINT
PN_RELATIVE_DOCKING_POINT
.public LayoutDirector(java.io.File inputFile, LayoutBuilder<P> builder, LayoutAlgorithm algorithm) throws javax.xml.stream.XMLStreamException, java.io.IOException
inputFile
- file containing the SBML documentbuilder
- LayoutBuilder instance for producing the outputalgorithm
- LayoutAlgorithm instance for layouting elementsjavax.xml.stream.XMLStreamException
java.io.IOException
public LayoutDirector(SBMLDocument doc, LayoutBuilder<P> builder, LayoutAlgorithm algorithm)
doc
- the SBMLdocumentbuilder
- LayoutBuilder instance for producing the outputalgorithm
- LayoutAlgorithm instance for layouting elementspublic LayoutDirector(SBMLDocument doc, LayoutBuilder<P> builder, LayoutAlgorithm algorithm, int index)
doc
- the SBMLdocumentbuilder
- LayoutBuilder instance for producing the outputalgorithm
- LayoutAlgorithm instance for layouting elementsindex
- the index of the layout for which to produce the ouputpublic LayoutDirector(Layout layout, LayoutBuilder<P> builder, LayoutAlgorithm algorithm)
layout
- the SBML layout for which to produce the outputbuilder
- LayoutBuilder instance for producing the outputalgorithm
- LayoutAlgorithm instance for layouting elementspublic java.lang.Boolean getAddWhiskers()
public java.lang.Boolean isSetAddWhiskers()
public void setAddWhiskers(java.lang.Boolean addWhiskers)
public boolean unsetAddWhiskers()
true
, if addWhiskers was set before,
otherwise false
public int getLayoutIndex()
public void setLayoutIndex(int layoutIndex)
layoutIndex
- the index of the layout to be setpublic static boolean edgeIsLayouted(ReactionGlyph reactionGlyph, SpeciesReferenceGlyph speciesReferenceGlyph)
reactionGlyph
- process node of the edgespeciesReferenceGlyph
- species node of the edgepublic static boolean glyphIsLayouted(GraphicalObject glyph)
glyph
- public static boolean glyphHasDimensions(GraphicalObject glyph)
glyph
- public static boolean glyphHasPosition(GraphicalObject glyph)
glyph
- public static boolean isSubstrate(SpeciesReferenceGlyph srg)
srg
- a SpeciesReferenceGlyph
true
if the given SpeciesReferenceGlyph
can be
associated with a consuming process or false
otherwise.public static boolean isModifier(SpeciesReferenceGlyph srg)
srg
- a SpeciesReferenceGlyph
true
if the given SpeciesReferenceGlyph
acts as
an SpeciesReferenceRole.ACTIVATOR
, SpeciesReferenceRole.INHIBITOR
or SpeciesReferenceRole.MODIFIER
.public static SpeciesReferenceRole determineRole(SpeciesReferenceGlyph srg)
srg
- public static boolean isProduct(SpeciesReferenceGlyph srg)
srg
- public static boolean textGlyphIsIndependent(TextGlyph textGlyph)
textGlyph
- public void run()
run
in interface java.lang.Runnable
public void setBuilder(LayoutBuilder<P> builder)
builder
- the builder to be setpublic LayoutBuilder<P> getBuilder()
public void setAlgorithm(LayoutAlgorithm algorithm)
algorithm
- the algorithm to be setpublic LayoutAlgorithm getAlgorithm()
public P getProduct()
public java.lang.String toString()
toString
in class java.lang.Object