|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.geotools.gui.swing.JMapPane
public class JMapPane
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected BufferedImage |
baseImage
the base image of the map |
protected Envelope |
mapArea
the area of the map to draw |
protected Envelope |
oldMapArea
the last map area drawn. |
protected Rectangle |
oldRect
the size of the pane last time we drew |
static int |
Pan
|
protected BufferedImage |
panningImage
the base image of the map |
protected boolean |
reset
|
static int |
Reset
|
static int |
Select
|
static int |
ZoomIn
|
static int |
ZoomOut
|
Fields inherited from class javax.swing.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 java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JMapPane()
|
|
JMapPane(GTRenderer render,
MapContext context)
create a basic JMapPane |
|
JMapPane(LayoutManager layout,
boolean isDoubleBuffered,
GTRenderer render,
MapContext context)
full constructor extending JPanel |
Method Summary | |
---|---|
Envelope |
bestAllowedMapArea(Envelope env)
Korrigiert den Envelope aka mapArea auf die beste
erlaubte Flaeche damit die Massstabsbeschaenkungen noch eingehalten
werden, FALLS der uebergeben Envelope nicht schon gueltig sein sollte. |
void |
doSelection(double x,
double y,
MapLayer layer)
|
protected void |
drawRectangle(Graphics graphics)
|
MapContext |
getContext()
|
MapLayer |
getHighlightLayer()
|
HighlightManager |
getHighlightManager()
|
Style |
getLineHighlightStyle()
|
Style |
getLineSelectionStyle()
|
Envelope |
getMapArea()
|
Double |
getMaxZoomScale()
Retuns the maximum allowed zoom scale. |
Double |
getMinZoomScale()
Retuns the minimum allowed zoom scale. |
Style |
getPointHighlightStyle()
|
Style |
getPointSelectionStyle()
|
Style |
getPolygonHighlightStyle()
|
Style |
getPolygonSelectionStyle()
|
GTRenderer |
getRenderer()
get the renderer |
FeatureCollection |
getSelection()
|
MapLayer |
getSelectionLayer()
|
SelectionManager |
getSelectionManager()
|
int |
getState()
|
double |
getZoomFactor()
|
void |
highlightChanged(HighlightChangedEvent e)
|
boolean |
isHighlight()
|
boolean |
isReset()
|
void |
layerAdded(MapLayerListEvent event)
|
void |
layerChanged(MapLayerListEvent event)
|
void |
layerMoved(MapLayerListEvent event)
|
void |
layerRemoved(MapLayerListEvent event)
|
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
protected void |
paintComponent(Graphics g)
|
protected void |
processDrag(int x1,
int y1,
int x2,
int y2,
MouseEvent e)
|
void |
propertyChange(PropertyChangeEvent evt)
|
void |
selectionChanged(SelectionChangedEvent e)
|
void |
setClickable(boolean clickable)
if clickable is set to true then a single click on the map pane will zoom or pan the map. |
void |
setContext(MapContext context)
|
void |
setHighlight(boolean highlight)
|
void |
setHighlightLayer(MapLayer highlightLayer)
|
void |
setHighlightManager(HighlightManager highlightManager)
|
void |
setLineHighlightStyle(Style lineHighlightStyle)
|
void |
setLineSelectionStyle(Style lineSelectionStyle)
|
void |
setMapArea(Envelope mapArea)
|
void |
setMaxZoomScale(Double maxZoomScale)
Set the maximum allowed zoom scale. |
void |
setMinZoomScale(Double minZoomScale)
Set the minimum (nearest) allowed zoom scale. |
void |
setPointHighlightStyle(Style pointHighlightStyle)
|
void |
setPointSelectionStyle(Style pointSelectionStyle)
|
void |
setPolygonHighlightStyle(Style polygonHighlightStyle)
|
void |
setPolygonSelectionStyle(Style polygonSelectionStyle)
|
void |
setRenderer(GTRenderer renderer)
|
void |
setReset(boolean reset)
|
void |
setSelection(FeatureCollection selection)
|
void |
setSelectionLayer(MapLayer selectionLayer)
|
void |
setSelectionManager(SelectionManager selectionManager)
|
void |
setState(int state)
|
void |
setZoomFactor(double zoomFactor)
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int Reset
public static final int ZoomIn
public static final int ZoomOut
public static final int Pan
public static final int Select
protected Envelope mapArea
protected Rectangle oldRect
protected Envelope oldMapArea
protected BufferedImage baseImage
protected BufferedImage panningImage
protected boolean reset
Constructor Detail |
---|
public JMapPane()
public JMapPane(GTRenderer render, MapContext context)
render
- - how to draw the mapcontext
- - the map context to displaypublic JMapPane(LayoutManager layout, boolean isDoubleBuffered, GTRenderer render, MapContext context)
layout
- - layout (probably shouldn't be set)isDoubleBuffered
- - a Swing thing I don't really understandrender
- - what to draw the map withcontext
- - what to drawMethod Detail |
---|
public GTRenderer getRenderer()
public void setRenderer(GTRenderer renderer)
public MapContext getContext()
public void setContext(MapContext context)
public Envelope getMapArea()
public void setMapArea(Envelope mapArea)
public int getState()
public void setState(int state)
public double getZoomFactor()
public void setZoomFactor(double zoomFactor)
public MapLayer getSelectionLayer()
public void setSelectionLayer(MapLayer selectionLayer)
public boolean isHighlight()
public void setHighlight(boolean highlight)
public MapLayer getHighlightLayer()
public void setHighlightLayer(MapLayer highlightLayer)
public HighlightManager getHighlightManager()
public void setHighlightManager(HighlightManager highlightManager)
public Style getLineHighlightStyle()
public void setLineHighlightStyle(Style lineHighlightStyle)
public Style getLineSelectionStyle()
public void setLineSelectionStyle(Style lineSelectionStyle)
public Style getPointHighlightStyle()
public void setPointHighlightStyle(Style pointHighlightStyle)
public Style getPointSelectionStyle()
public void setPointSelectionStyle(Style pointSelectionStyle)
public Style getPolygonHighlightStyle()
public void setPolygonHighlightStyle(Style polygonHighlightStyle)
public Style getPolygonSelectionStyle()
public void setPolygonSelectionStyle(Style polygonSelectionStyle)
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
public void doSelection(double x, double y, MapLayer layer)
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
protected void processDrag(int x1, int y1, int x2, int y2, MouseEvent e)
public void highlightChanged(HighlightChangedEvent e)
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public boolean isReset()
public void setReset(boolean reset)
public void layerAdded(MapLayerListEvent event)
public void layerRemoved(MapLayerListEvent event)
public void layerChanged(MapLayerListEvent event)
public void layerMoved(MapLayerListEvent event)
protected void drawRectangle(Graphics graphics)
public void setClickable(boolean clickable)
clickable
- public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public FeatureCollection getSelection()
public void setSelection(FeatureCollection selection)
public void selectionChanged(SelectionChangedEvent e)
public SelectionManager getSelectionManager()
public void setSelectionManager(SelectionManager selectionManager)
public Envelope bestAllowedMapArea(Envelope env)
Envelope
aka mapArea
auf die beste
erlaubte Flaeche damit die Massstabsbeschaenkungen noch eingehalten
werden, FALLS der uebergeben Envelope nicht schon gueltig sein sollte.
public Double getMinZoomScale()
Double
.MAX_VALUE
public Double getMaxZoomScale()
Double
.MIN_VALUE
public void setMaxZoomScale(Double maxZoomScale)
public void setMinZoomScale(Double minZoomScale)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |