|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.renderer.j2d.RenderedLayer org.geotools.renderer.j2d.RenderedLegend
Base class for legends painted at fixed location in the widget area. Contrary to others kinds of layers, legends location are not zoom-dependent. The legend location is specified by two quantities: a compass-direction relative to widget's bounds (for example North-East) and a margin in dots (or pixels) to keep between the legend and widget's borders.
Field Summary |
Fields inherited from class org.geotools.renderer.j2d.RenderedLayer |
listeners |
Constructor Summary | |
RenderedLegend()
Construct a new legend located in the upper left corner ( LegendPosition.NORTH_WEST ).
|
|
RenderedLegend(java.lang.String text)
Construct a new legend with the specified text. |
Method Summary | |
java.awt.Insets |
getInsets()
Returns the space in pixels between the legend and the painting area's bounds. |
java.awt.Insets |
getMargin()
Deprecated. Use getInsets() instead. |
LegendPosition |
getPosition()
Returns the legend position. |
java.lang.String |
getText()
Returns the legend text, or null if none. |
protected void |
paint(RenderingContext context)
Paint the text in the legend area. |
void |
setInsets(java.awt.Insets insets)
Set the space in pixels between the legend and the painting area's bounds. |
void |
setMargin(java.awt.Insets insets)
Deprecated. Use setInsets(java.awt.Insets) instead. |
void |
setPosition(LegendPosition position)
Set the legend position. |
void |
setText(java.lang.String text)
Set the legend text. |
Methods inherited from class org.geotools.renderer.j2d.RenderedLayer |
addPropertyChangeListener, addPropertyChangeListener, dispose, getAction, getCoordinateSystem, getLocale, getName, getPreferredArea, getPreferredPixelSize, getRenderer, getToolTipText, getTreeLock, getZOrder, isVisible, prefetch, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, setCoordinateSystem, setPreferredArea, setPreferredPixelSize, setVisible, setZOrder, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RenderedLegend()
LegendPosition.NORTH_WEST
).
The space between legend and widget's bounds default to 15 pixels.
public RenderedLegend(java.lang.String text)
LegendPosition.NORTH_WEST
). The space between legend and
widget's bounds default to 15 pixels.
text
- The legend text, or null
if none.Method Detail |
public java.lang.String getText()
null
if none.
public void setText(java.lang.String text)
text
- The new legend text, or null
if none.public LegendPosition getPosition()
public void setPosition(LegendPosition position)
public java.awt.Insets getMargin()
getInsets()
instead.
public void setMargin(java.awt.Insets insets)
setInsets(java.awt.Insets)
instead.
public java.awt.Insets getInsets()
public void setInsets(java.awt.Insets insets)
protected void paint(RenderingContext context) throws org.opengis.referencing.operation.TransformException
paint
in class RenderedLayer
context
- Information relatives to the rendering context.
org.opengis.referencing.operation.TransformException
- If a coordinate transformation failed
during the rendering process.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |