|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface describes the basic legend element. a legend element may has a label that can be set to eight positions relative to the legend graphic. A LegendElement can be activated or deactivated. It depends on the using application what effect this behavior will have. It depends on implementing classes how a LegendElement is realized. E.g. as 'simple' image or maybe as composition of Components.
LegendElements can be collected in a LegendElementCollection which also is a LegendElement to group elements or to create more complex elements.
Each LegendElement is able to paint itself as BufferedImage
Field Summary | |
static int |
LP_BOTTOMCENTER
|
static int |
LP_BOTTOMLEFT
|
static int |
LP_BOTTOMRIGHT
|
static int |
LP_LEFT
|
static int |
LP_NOLABEL
|
static int |
LP_RIGHT
|
static int |
LP_TOPCENTER
|
static int |
LP_TOPLEFT
|
static int |
LP_TOPRIGHT
|
Method Summary | |
java.awt.image.BufferedImage |
exportAsImage()
exports the LegendElement as BufferedImage |
java.lang.String |
getLabel()
returns the label set to LegendElement. |
double |
getLabelOrientation()
returns the current orientation of the label of the LegendElement in radians. |
int |
getLabelPlacement()
returns the placement of the label relative to the legend symbol. |
void |
setActive(boolean active)
activates or deactivates the label |
void |
setLabel(java.lang.String label)
sets the label of the LegendElement |
void |
setLabelOrientation(double orientation)
sets the orientation of the label of the LegendElement. |
void |
setLabelPlacement(int lablePosition)
sets the placement of the label relative to the legend symbol. |
Field Detail |
public static final int LP_NOLABEL
public static final int LP_TOPCENTER
public static final int LP_TOPLEFT
public static final int LP_TOPRIGHT
public static final int LP_RIGHT
public static final int LP_LEFT
public static final int LP_BOTTOMCENTER
public static final int LP_BOTTOMRIGHT
public static final int LP_BOTTOMLEFT
Method Detail |
public void setLabel(java.lang.String label)
label
- label of the LegendElementpublic java.lang.String getLabel()
public void setLabelOrientation(double orientation)
orientation
- public double getLabelOrientation()
public void setLabelPlacement(int lablePosition)
+---+---+---+ | 1 | 0 | 2 | +---+---+---+ | 4 |LEG| 3 | +---+---+---+ | 7 | 5 | 6 | +---+---+---+An implementation of the interface may not supoort all positions.
lablePosition
- public int getLabelPlacement()
public void setActive(boolean active)
active
- public java.awt.image.BufferedImage exportAsImage() throws LegendException
LegendException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |