org.geotools.gui.swing
Class StyledMapPane

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byorg.geotools.gui.swing.ZoomPane
                  extended byorg.geotools.gui.swing.MapPane
                      extended byorg.geotools.gui.swing.StyledMapPane
All Implemented Interfaces:
DeformableViewer, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class StyledMapPane
extends MapPane

A map pane which support styling.

Version:
$Id: StyledMapPane.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class org.geotools.gui.swing.ZoomPane
DEFAULT_ZOOM, RESET, ROTATE, SCALE_X, SCALE_Y, TRANSLATE_X, TRANSLATE_Y, UNIFORM_SCALE, zoom
 
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
StyledMapPane()
          Construct a default map panel.
StyledMapPane(CoordinateSystem cs)
          Construct a map panel using the specified coordinate system.
 
Method Summary
 java.awt.geom.Rectangle2D getArea()
          Returns a bounding box representative of the geographic area to drawn.
 MapContext getMapContext()
          Returns the last context set with #setContext, or null if none.
 Renderer getRenderer()
          Returns the for this map pane.
 void setMapContext(MapContext context)
          Set a new context as the current one.
 
Methods inherited from class org.geotools.gui.swing.MapPane
getCoordinateSystem, getDefaultPopupMenu, getDefaultSize, getPopupMenu, getPreferredPixelSize, getToolTipText, paintComponent, printComponent, processMouseEvent, processMouseMotionEvent, setCoordinateSystem, setToolTipText
 
Methods inherited from class org.geotools.gui.swing.ZoomPane
addMouseListener, addZoomChangeListener, buildNavigationMenu, correctApparentPixelPosition, createScrollPane, fireZoomChanged, getInsets, getInsets, getMagnifierBorder, getMagnifierGlass, getMagnifierMenu, getMouseSelectionShape, getPreferredArea, getScaleFactor, getVisibleArea, getZoomableBounds, hasPreferredArea, isMagnifierEnabled, isMagnifierVisible, isPaintingWhileAdjusting, mouseSelectionPerformed, paintComponent, paintMagnifier, printComponent, removeZoomChangeListener, repaint, reset, reset, scrollRectToVisible, setMagnifierBorder, setMagnifierEnabled, setMagnifierGlass, setMagnifierVisible, setPaintingWhileAdjusting, setPreferredArea, setResetPolicy, setVisibleArea, tieModels, transform, transformPixels, untieModels, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, processComponentKeyEvent, processKeyBinding, processKeyEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyledMapPane

public StyledMapPane()
Construct a default map panel.


StyledMapPane

public StyledMapPane(CoordinateSystem cs)
Construct a map panel using the specified coordinate system.

Parameters:
cs - The rendering coordinate system.
Method Detail

getMapContext

public MapContext getMapContext()
Returns the last context set with #setContext, or null if none.

Returns:
The map context.

setMapContext

public void setMapContext(MapContext context)
                   throws java.lang.Exception
Set a new context as the current one. Invoking this method will remove all layers in the and replace them with new layers from the given context.

Parameters:
context - The new context, or null for removing any previous context.
Throws:
java.lang.Exception - DOCUMENT ME!

getArea

public java.awt.geom.Rectangle2D getArea()
Returns a bounding box representative of the geographic area to drawn. This method returns the first of the following area available:

Overrides:
getArea in class MapPane
Returns:
The enclosing area to be drawn with the default zoom, or null if this area can't be computed.
See Also:
ZoomPane.setPreferredArea(java.awt.geom.Rectangle2D), Context#getBoundingBox, Renderer.getPreferredArea()

getRenderer

public Renderer getRenderer()
Returns the for this map pane.

Overrides:
getRenderer in class MapPane
Returns:
DOCUMENT ME!
See Also:
Renderer.addLayer(org.geotools.renderer.j2d.RenderedLayer), Renderer.removeLayer(org.geotools.renderer.j2d.RenderedLayer), Renderer.removeAllLayers(), Renderer.getLayers(), Renderer.getLayerCount()
Task:
TODO: Change the returns type to StyledRenderer when we will be allowed to compile with J2SE 1.5.


Copyright © GeoTools. All Rights Reserved.