public class GraphMLEdge extends AbstractIDElement implements LabeledElement, EdgeType
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<EdgeLabel> |
additionalLabels
The additional labels.
|
idPOLYLINE_EDGE, QUADCURVE_EDGE| Constructor and Description |
|---|
GraphMLEdge(AbstractGraphMLDiagram diagram,
java.lang.String id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalLabel(EdgeLabel label)
Create an additional label.
|
GraphMLEdge |
clone() |
EdgeLabel |
createAdditionalLabel()
Create an additional label.
|
EdgeLabel |
createAdditionalLabel(java.lang.String label)
Create an additional label, with a specified ratio.
|
EdgeLabel |
createAdditionalLabel(java.lang.String label,
float ratio)
Create an additional label, with a specified ratio.
|
EdgeLabel |
createLabel(boolean createIfExist)
Create the edge associated label.
|
java.util.List<EdgeLabel> |
getAdditionalLabels()
Return the list of additional labels.
|
Arrows |
getArrows()
Return the edge arrows.
|
java.lang.String |
getDescription()
Return the element description.
|
short |
getEdgeType()
Return the edge type.
|
java.lang.String |
getID()
Returns the edge id.
|
EdgeLabel |
getLabel()
Return the edge associated label.
|
java.lang.String |
getLabelText()
Return the element label text.
|
LineStyle |
getLineStyle()
Return the edge line style.
|
Path |
getPath()
Return the edge path.
|
PortConstraints |
getPortConstraints()
Return the port constraints on the edge.
|
IGraphMLNode |
getSource()
Return the edge source.
|
IGraphMLNode |
getTarget()
Return the edge target.
|
boolean |
hasAdditionalLabels()
Return true if the edge has additional labels.
|
boolean |
hasConstraints()
Return true if there is a port constraints on the edge.
|
boolean |
hasLabel()
Return true if the edge has a main label.
|
boolean |
isSmoothed()
Return true if the edge is smoothed.
|
void |
setArrows(Arrows arrows)
Set the edge arrows.
|
protected void |
setDefaults()
Set the defaults.
|
void |
setDescription(java.lang.String desc)
Set the element description.
|
void |
setEdgeType(short edgeType)
Set the edge type.
|
void |
setLabel(EdgeLabel edgeLabel)
Set the edge label.
|
EdgeLabel |
setLabel(java.lang.String text)
Set the element label text.
|
EdgeLabel |
setLabel(java.lang.String text,
float ratio)
Set the element label text.
|
void |
setLineStyle(LineStyle lineStyle)
Set the edge line style.
|
void |
setPath(Path path)
Set the edge path.
|
boolean |
setPortConstraint(short element,
short side)
Set a port constraint on the edge.
|
boolean |
setPortConstraint(java.lang.String element,
java.lang.String side)
Set a port constraint on the edge.
|
void |
setSmoothed(boolean smoothed)
Set if the edge is smoothed.
|
void |
setSource(IGraphMLNode source)
Return the edge source.
|
void |
setTarget(IGraphMLNode target)
Set the edge target.
|
void |
updateLabel()
Called when the label is updated.
|
getURL, getURLAsString, hasURL, setURL, setURLequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateLabelPlacement, getLabelPlacementgetURL, getURLAsString, hasDescription, hasURL, isTemplate, setURL, setURLprotected final java.util.List<EdgeLabel> additionalLabels
public GraphMLEdge(AbstractGraphMLDiagram diagram, java.lang.String id)
diagram - the diagramid - the edge idpublic GraphMLEdge clone()
clone in class AbstractIDElementprotected void setDefaults()
public void setEdgeType(short edgeType)
edgeType - the typeEdgeTypepublic short getEdgeType()
public void setSmoothed(boolean smoothed)
smoothed - true if the edge is smoothedpublic boolean isSmoothed()
public void setSource(IGraphMLNode source)
source - the sourcepublic IGraphMLNode getSource()
public void setTarget(IGraphMLNode target)
target - the targetpublic IGraphMLNode getTarget()
public java.lang.String getID()
getID in interface IDElementgetID in class AbstractIDElementpublic void setDescription(java.lang.String desc)
setDescription in interface IDElementsetDescription in class AbstractIDElementdesc - the descriptionpublic java.lang.String getDescription()
getDescription in interface IDElementgetDescription in class AbstractIDElementpublic void setPath(Path path)
path - the pathpublic Path getPath()
public void setArrows(Arrows arrows)
arrows - the arrowspublic Arrows getArrows()
public boolean hasConstraints()
public PortConstraints getPortConstraints()
public boolean setPortConstraint(short element,
short side)
element - the elementside - the side constraintpublic boolean setPortConstraint(java.lang.String element,
java.lang.String side)
element - the elementside - the side constraintpublic void setLineStyle(LineStyle lineStyle)
lineStyle - the line stylepublic LineStyle getLineStyle()
public void setLabel(EdgeLabel edgeLabel)
edgeLabel - the labelpublic EdgeLabel getLabel()
getLabel in interface LabeledElementpublic boolean hasLabel()
public void updateLabel()
updateLabel in interface LabeledElementpublic EdgeLabel createLabel(boolean createIfExist)
createLabel in interface LabeledElementcreateIfExist - true if a new label will be created even if it already existspublic void addAdditionalLabel(EdgeLabel label)
label - the additional labelpublic EdgeLabel createAdditionalLabel(java.lang.String label)
label - the labelpublic EdgeLabel createAdditionalLabel(java.lang.String label, float ratio)
label - the labelratio - the label ratiopublic EdgeLabel createAdditionalLabel()
public java.util.List<EdgeLabel> getAdditionalLabels()
public boolean hasAdditionalLabels()
public EdgeLabel setLabel(java.lang.String text, float ratio)
text - the label textratio - the label ratiopublic EdgeLabel setLabel(java.lang.String text)
public java.lang.String getLabelText()
getLabelText in interface LabeledElementCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence