|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectComponent
Container
JComponent
JPanel
AbstractMapPane
JMapPane
public class JMapPane
A lightweight map pane which uses a single renderer and backing image. Used by JMapFrame for the GeoTools tutorial applications.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JMapPane()
Creates a new map pane. |
|
JMapPane(MapContent content)
Creates a new map pane. |
|
JMapPane(MapContent content,
RenderingExecutor executor,
GTRenderer renderer)
Creates a new map pane. |
Method Summary | |
---|---|
protected void |
drawLayers(boolean createNewImage)
Draws layers into one or more images which will then be displayed by the map pane. |
RenderedImage |
getBaseImage()
Retrieve the map pane's current base image. |
GTRenderer |
getRenderer()
Gets the renderer, creating a default one if required. |
protected void |
paintComponent(Graphics g)
|
void |
setMapContent(MapContent content)
Sets the MapContent instance containing the layers
to display. |
void |
setRenderer(GTRenderer renderer)
Sets the renderer to be used by this map pane. |
Methods inherited from class JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JMapPane()
public JMapPane(MapContent content)
content
- the map content containing the layers to display
(may be null
)public JMapPane(MapContent content, RenderingExecutor executor, GTRenderer renderer)
null
content
- the map content containing the layers to displayexecutor
- the rendering executor to manage drawingrenderer
- the renderer to use for drawing layersMethod Detail |
---|
public void setMapContent(MapContent content)
MapContent
instance containing the layers
to display.
setMapContent
in interface MapPane
setMapContent
in class AbstractMapPane
content
- the map contentpublic GTRenderer getRenderer()
public void setRenderer(GTRenderer renderer)
renderer
- the renderer to usepublic RenderedImage getBaseImage()
The map pane caches the most recent rendering of map layers as an image to avoid time-consuming rendering requests whenever possible. The base image will be re-drawn whenever there is a change to map layer data, style or visibility; and it will be replaced by a new image when the pane is resized.
This method returns a live reference to the current base image. Use with caution.
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
protected void drawLayers(boolean createNewImage)
AbstractMapPane
drawLayers
in class AbstractMapPane
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |