|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.layout.edge.LabelPlacement
This class uses a labeling algorithm to position labels on edges .
| Field Summary | |
static int |
BESTFIT
Place a label on the best detected area. |
int |
distanceBetweenLabels
The value of this member determines the distance of labels boundary to each other. |
int |
distanceToLine
The value of this member determines the distance of label boundary to the edge. |
static int |
FIRSTFIT
Place a label on the first detected area that is big enough for it |
int |
strategy
The value of this member determines the using strategy of placing labels |
| Constructor Summary | |
LabelPlacement()
The Constructor. |
|
| Method Summary | |
void |
arrangeLabel(LayoutableEdge edge)
This method arranges the label of the edge specified by edge |
void |
arrangeLabel(LayoutableEdge edge,
Coordinate[] coords)
This method arranges the label of the edge specified by edge.
|
void |
arrangeLabel(LayoutableEdge edge,
Coordinate[] coords,
int anchor,
int placement)
/** This method arranges the label of the edge specified by edge.
|
void |
arrangeLabels(com.tensegrity.graph.layout.edge.EdgeElement[] edges,
java.util.ArrayList obstacles,
boolean autodetect)
This method arranges labels of all edges specified by edges |
void |
arrangeLabels(LayoutableEdge[] edges,
java.util.ArrayList obstacles,
boolean autodetect,
int strategy)
This method arranges labels of all edges specified by edges |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int strategy
public static final int FIRSTFIT
public static final int BESTFIT
public int distanceToLine
public int distanceBetweenLabels
| Constructor Detail |
public LabelPlacement()
| Method Detail |
public void arrangeLabels(LayoutableEdge[] edges,
java.util.ArrayList obstacles,
boolean autodetect,
int strategy)
edges
edges - the list of edges of which the labels are to be placed.obstacles - the list of all obstacles that must be avoided.autodetect - a boolean to determine whether the position
of the labels should differ from the default to ensure an overlapping
drawing of them.strategy - the strategy that is to be used. It can be:
public void arrangeLabels(com.tensegrity.graph.layout.edge.EdgeElement[] edges,
java.util.ArrayList obstacles,
boolean autodetect)
edges
edges - the list of edges of which the labels are to be placed.obstacles - the list of all obstacles that must be avoided.autodetect - a boolean to determine whether the position
of the labels should differ from the default to ensure an overlapping
drawing of them.public void arrangeLabel(LayoutableEdge edge)
edge
edge - the edge of which the label is to be placed.
public void arrangeLabel(LayoutableEdge edge,
Coordinate[] coords)
edge.
It ignores the internal edge coordinates which can be gotten by
LayoutableEdge.getCoordinates()
edge - the edge of which the label is to be placed.coords - the coordinates that should be taken into consideration. The
internal edge coordinates will be ignored.
public void arrangeLabel(LayoutableEdge edge,
Coordinate[] coords,
int anchor,
int placement)
edge.
It ignores the internal edge coordinates.
edge - the edge of which the label is to be placed.coords - the coordinates that should be taken into consideration. Theanchor - the default anchor.placement - the default placement.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||