|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.optimizers.LabelChoice
public class LabelChoice
Represents different possibilities (candidates) to draw a LabelDisplayElement
.
A LabelChoice
has several Label
candidates, one of this candidates is selected and represents the
best choice.
Constructor Summary | |
---|---|
LabelChoice(LabelDisplayElement element,
Label[] candidates,
float[] qualities,
int selected,
int maxX,
int maxY,
int minX,
int minY)
Creates a new instance of LabelChoice . |
Method Summary | |
---|---|
LabelDisplayElement |
getElement()
Returns the associated LabelDisplayElement . |
int |
getMaxX()
Returns the max x value of the bounding box of all Label candidates. |
int |
getMaxY()
Returns the max y value of the bounding box of all Label candidates. |
int |
getMinX()
Returns the min x value of the bounding box of all Label candidates. |
int |
getMinY()
Returns the min y value of the bounding box of all Label candidates. |
float |
getQuality()
Returns the quality measure of the currently selected Label |
int |
getSelected()
Returns the index of the currently selected Label . |
Label |
getSelectedLabel()
Returns the currently selected Label (which is the best choice of the candidates). |
boolean |
intersects(LabelChoice that)
Determines if this LabelChoice can intersect with another LabelChoice by any chance, i.e. whether
there are at least two Label candidates from each choice that intersect. |
void |
selectLabelRandomly()
Selects one of the contained Label candidates randomly. |
void |
setSelected(int selected)
Sets the selected Label candidate. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LabelChoice(LabelDisplayElement element, Label[] candidates, float[] qualities, int selected, int maxX, int maxY, int minX, int minY)
LabelChoice
.
element
- candidates
- qualities
- selected
- maxX
- maxY
- minX
- minY
- Method Detail |
---|
public void selectLabelRandomly()
Label
candidates randomly.
public void setSelected(int selected)
Label
candidate.
selected
- the index of the Label
to be selectedpublic int getSelected()
Label
.
Label
public float getQuality()
Label
Label
public Label getSelectedLabel()
Label
(which is the best choice of the candidates).
Label
public LabelDisplayElement getElement()
LabelDisplayElement
.
LabelDisplayElement
public int getMaxX()
Label
candidates.
public int getMaxY()
Label
candidates.
public int getMinX()
Label
candidates.
public int getMinY()
Label
candidates.
public boolean intersects(LabelChoice that)
LabelChoice
can intersect with another LabelChoice
by any chance, i.e. whether
there are at least two Label
candidates from each choice that intersect.
that
- LabelChoice
to be tested against this LabelChoice
LabelChoice
s can intersectpublic java.lang.String toString()
toString
in class java.lang.Object
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org