|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.bbn.openmap.MapBean
public class MapBean
The MapBean is the main component of the OpenMap Development Kit. It is a Java Bean that manages and displays a map. A map is comprised of a projection and a list of layers, and this class has methods that allow you to control the projection parameters and to add and remove layers. Layers that are part of the map receive dynamic notifications of changes to the underlying view and projection.
Most of the methods in the MapBean are called from the Java AWT and Swing code. These methods make the MapBean a good "Swing citizen" to its parent components, and you should not need to invoke them. In general there are only two reasons to call MapBean methods: controlling the projection, and adding or removing layers.
When controlling the MapBean projection, simply call the method that applies - setCenter, pan, zoom, etc. NOTE: If you are setting more than one parameter of the projection, it's more efficient to getProjection(), directly set the parameters of the projection object, and then call setProjection() with the modified projection. That way, each ProjectionListener of the MapBean (each layer) will only receive one projectionChanged() method call, as opposed to receiving one for each projection adjustment.
To add or remove layers, use the add() and remove() methods that the MapBean inherits from java.awt.Container. The add() method can be called with an integer that indicates its desired position in the layer list.
Changing the default clipping area may cause some Layers to not be drawn completely, depending on what the clipping area is set to and when the layer is trying to get itself painted. When manually adjusting clipping area, make sure that when restricted clipping is over that a full repaint occurs if there is a chance that another layer may be trying to paint itself.
PropertyChangeListeners and ProjectionListeners both receive notifications of the projection changes, but the PropertyChangeListeners receive them first. If you want to have a component that limits the MapBean's projection parameters, it should be a PropertyChangeListener on the MapBean, and throw a ProjectionChangeVetoException whenever a Projection setting falls outside of the limits. The ProjectionChangeVetoException should hold the alternate settings allowed by the listener. When a ProjectionChangeVetoException is thrown, all of the PropertyChangeListeners will receive another PropertyChangeEvent notification, under the MapBean.projectionVetoed property name. The old value for that property will be the rejected Projection object, and the new value will be the ProjectionChangeVetoException containing the new suggestions. The MapBean will then apply the suggestions and launch another round of projection change notifications. The ProjectionListeners only receive notification of Projections that have passed through the PropertyChangeListeners.
Layer
,
Serialized FormNested Class Summary | |
---|---|
protected class |
MapBean.RotationHelper
|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected java.util.Vector<Layer> |
addedLayers
This vector is to let the layers know when they have been added to the map. |
protected java.awt.Paint |
background
The background color for this particular MapBean. |
static java.lang.String |
BackgroundProperty
|
protected Layer[] |
currentLayers
|
static java.lang.String |
CursorProperty
|
static java.awt.Color |
DEFAULT_BACKGROUND_COLOR
|
static float |
DEFAULT_CENTER_LAT
|
static float |
DEFAULT_CENTER_LON
|
static int |
DEFAULT_HEIGHT
|
static float |
DEFAULT_SCALE
|
static int |
DEFAULT_WIDTH
|
protected boolean |
doContainerChange
|
protected boolean |
layerRemovalDelayed
Some users may want the layers deleted immediately when they are removed from the map. |
static java.lang.String |
LayersProperty
|
protected int |
minHeight
|
protected int |
minWidth
|
protected PaintListenerSupport |
painters
The PaintListeners want to know when the map has been repainted. |
protected Proj |
projection
|
protected ProjectionFactory |
projectionFactory
|
static java.lang.String |
ProjectionProperty
|
protected ProjectionSupport |
projectionSupport
|
static java.lang.String |
ProjectionVetoedProperty
|
protected java.util.Vector<Layer> |
removedLayers
Layers that are removed from the MapBean are held until the next projection change. |
protected MapBeanRepaintPolicy |
repaintPolicy
The MapBeanRepaintPolicy to use to handler/filter/pace layer repaint() requests. |
protected double |
rotationAngle
The angle, in radians, to rotate the map. |
protected MapBean.RotationHelper |
rotHelper
|
static boolean |
suppressCopyright
Suppress the copyright message on initialization. |
static java.lang.String |
title
OpenMap title. |
static java.lang.String |
version
OpenMap version. |
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 | |
---|---|
MapBean()
Construct a MapBean. |
|
MapBean(boolean useThreadedNotification)
|
Method Summary | ||
---|---|---|
protected void |
addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
Adds additional constraints on possible children components. |
|
void |
addPaintListener(PaintListener l)
Add a PaintListener. |
|
void |
addProjectionListener(ProjectionListener l)
Add a ProjectionListener to the MapBean. |
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
In addition to adding the PropertyChangeListener as the JComponent method does, this method also provides the listener with the initial version of the Layer and Cursor properties. |
|
void |
center(CenterEvent evt)
Handles incoming CenterEvents . |
|
protected void |
changeLayers(java.awt.event.ContainerEvent e)
ContainerListener Interface method. |
|
void |
componentAdded(java.awt.event.ContainerEvent e)
ContainerListener Interface method. |
|
void |
componentHidden(java.awt.event.ComponentEvent e)
ComponentListener interface method. |
|
void |
componentMoved(java.awt.event.ComponentEvent e)
ComponentListener interface method. |
|
void |
componentRemoved(java.awt.event.ContainerEvent e)
ContainerListener Interface method. |
|
void |
componentResized(java.awt.event.ComponentEvent e)
ComponentListener interface method. |
|
void |
componentShown(java.awt.event.ComponentEvent e)
ComponentListener interface method. |
|
protected void |
debugmsg(java.lang.String msg)
|
|
void |
dispose()
Call when getting rid of the MapBean, it releases pointers to all listeners and kills the ProjectionSupport thread. |
|
protected void |
drawProjectionBackground(java.awt.Graphics g)
Convenience method to test if Graphics is Graphics2D object, and to try to do the right thing. |
|
protected void |
fireProjectionChanged()
Called from within the MapBean when its projection listeners need to know about a projection change. |
|
java.awt.Color |
getBackground()
Get the background color of the map. |
|
java.awt.Paint |
getBckgrnd()
Get the background of the map. |
|
java.awt.geom.Point2D |
getCenter()
Gets the center of the map in the form of a LatLonPoint. |
|
java.awt.geom.Point2D |
getCoordinates(java.awt.event.MouseEvent event)
Convenience function to get the LatLonPoint representing a screen location from a MouseEvent. |
|
|
getCoordinates(java.awt.event.MouseEvent event,
T llp)
Convenience function to get the LatLonPoint representing a screen location from a MouseEvent. |
|
static java.lang.String |
getCopyrightMessage()
Return the OpenMap Copyright message. |
|
boolean |
getDoContainerChange()
ContainerListener Interface method. |
|
java.awt.Graphics |
getGraphics(boolean rotateIfSet)
|
|
java.awt.Insets |
getInsets()
Get the Insets of the MapBean. |
|
MapBeanRepaintPolicy |
getMapBeanRepaintPolicy()
Get the MapBeanRepaintPolicy used by the MapBean. |
|
java.awt.Dimension |
getMinimumSize()
Return the minimum size of the MapBean window. |
|
java.awt.geom.Point2D |
getNonRotatedLocation(java.awt.event.MouseEvent event)
Convenience function to get the pixel Point2D representing a screen location from a MouseEvent in the projection space (as if there is no rotation set). |
|
java.awt.geom.Point2D |
getNonRotatedLocation(java.awt.event.MouseEvent event,
java.awt.geom.Point2D pnt)
Convenience function to get the pixel Point2D representing a screen location from a MouseEvent in the projection space (as if there is no rotation set). |
|
java.awt.Shape |
getNonRotatedShape(java.awt.Shape shape)
If the map has been rotated, get a shape that has been transformed into the pixel space of the unrotated maps (the space the projected OMGraphics know about). |
|
Projection |
getProjection()
Get the projection property, reflects the projection with no rotation. |
|
ProjectionFactory |
getProjectionFactory()
|
|
Projection |
getRotatedProjection()
|
|
double |
getRotationAngle()
Get the rotation of the map in RADIANS. |
|
protected MapBean.RotationHelper |
getRotHelper()
Get the RotationHelper that assists with rotated maps. |
|
float |
getScale()
Gets the scale of the map. |
|
protected MapBean.RotationHelper |
getUpdatedRotHelper()
Handles all of the updating of the RotationHelper if needed, based on the current rotation settings on the MapBean. |
|
void |
hideLayerPalettes()
Turn off all layer palettes. |
|
|
inverse(double x,
double y,
T ret)
Checks the rotation set on the MapBean and accounts for it before calling inverse on the projection. |
|
boolean |
isBufferDirty()
Checks whether the image buffer should be repainted. |
|
boolean |
isBuffered()
Interface-like method to query if the MapBean is buffered, so you can control behavior better. |
|
boolean |
isLayerRemovalDelayed()
|
|
void |
paint(java.awt.Graphics g)
Same as JComponent.paint(), except if there are no children (Layers), the projection still paints the background and the border is painted. |
|
void |
paintBorder(java.awt.Graphics g)
We override this to set the paint mode on the Graphics before the border is painted, otherwise we get an XOR effect in the border. |
|
void |
paintChildren(java.awt.Graphics g)
Same as JComponent.paintChildren() except any PaintListeners are notified and the border is painted over the children. |
|
void |
paintChildren(java.awt.Graphics g,
java.awt.Rectangle clip)
Same as paintChildren, but allows you to set a clipping area to paint. |
|
void |
paintChildrenWithBorder(java.awt.Graphics g,
boolean drawBorder)
Method that provides an option of whether or not to draw the border when painting. |
|
protected void |
paintLayers(java.awt.Graphics g)
A method that grabs the component list of the MapBean, and renders just the layers from back to front. |
|
void |
paintPainters(java.awt.Graphics g)
|
|
void |
pan(PanEvent evt)
Handles incoming PanEvents . |
|
void |
projectionChanged(ProjectionEvent e)
ProjectionListener interface method. |
|
void |
purgeAndNotifyRemovedLayers()
Clear the vector containing all of the removed layers, and let those layers know they have been removed from the map. |
|
void |
removePaintListener(PaintListener l)
Remove a PaintListener. |
|
void |
removeProjectionListener(ProjectionListener l)
Remove a ProjectionListener from the MapBean. |
|
void |
repaint(Layer layer)
A call to try and get the MapBean to reduce flashing by controlling when repaints happen, waiting for lower layers to call for a repaint(), too. |
|
void |
setBackground(java.awt.Color color)
|
|
void |
setBackgroundColor(java.awt.Color color)
Set the background color of the map. |
|
void |
setBckgrnd(java.awt.Paint paint)
Set the background of the map. |
|
void |
setBufferDirty(boolean value)
Interface-like method to set a buffer dirty, if there is one. |
|
void |
setCenter(double lat,
double lon)
Sets the center of the map. |
|
void |
setCenter(float lat,
float lon)
Sets the center of the map. |
|
void |
setCenter(java.awt.geom.Point2D newCenter)
Sets the center of the map. |
|
void |
setCursor(java.awt.Cursor newCursor)
Set the Mouse cursor over the MapBean component. |
|
void |
setDoContainerChange(boolean value)
ContainerListener Interface method. |
|
void |
setLayerRemovalDelayed(boolean set)
If true (default) layers are held when they are removed, and then released and notified of removal when the projection changes. |
|
void |
setLayers(LayerEvent evt)
LayerListener interface method. |
|
void |
setLayout(java.awt.LayoutManager mgr)
Prevents changing the LayoutManager. |
|
void |
setMapBeanRepaintPolicy(MapBeanRepaintPolicy mbrp)
Set the MapBeanRepaintPolicy used by the MapBean. |
|
void |
setMinimumSize(java.awt.Dimension dim)
Set the minimum size of the MapBean window. |
|
void |
setProjection(Projection aProjection)
Set the projection. |
|
void |
setProjectionFactory(ProjectionFactory projFactory)
|
|
void |
setRotationAngle(double angle)
Set the rotation of the map in RADIANS. |
|
void |
setRotationAngle(double angle,
boolean fastRotation)
Set the rotation of the map in RADIANS. |
|
protected void |
setRotHelper(MapBean.RotationHelper nRotHelper)
|
|
void |
setScale(float newScale)
Sets the scale of the map. |
|
void |
showLayerPalettes()
Go through the layers, and for all of them that have the autoPalette variable turned on, show their palettes. |
|
java.lang.String |
toString()
Return a string-ified representation of the MapBean. |
|
void |
zoom(ZoomEvent evt)
Zoom the Map. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LayersProperty
public static final java.lang.String CursorProperty
public static final java.lang.String BackgroundProperty
public static final java.lang.String ProjectionProperty
public static final java.lang.String ProjectionVetoedProperty
public static final java.lang.String title
public static final java.lang.String version
public static boolean suppressCopyright
public static final float DEFAULT_CENTER_LAT
public static final float DEFAULT_CENTER_LON
public static final float DEFAULT_SCALE
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
protected int minHeight
protected int minWidth
protected Proj projection
protected final ProjectionSupport projectionSupport
protected final java.util.Vector<Layer> removedLayers
protected boolean layerRemovalDelayed
protected final java.util.Vector<Layer> addedLayers
protected final PaintListenerSupport painters
protected java.awt.Paint background
protected MapBeanRepaintPolicy repaintPolicy
protected double rotationAngle
public static final java.awt.Color DEFAULT_BACKGROUND_COLOR
protected transient Layer[] currentLayers
protected transient boolean doContainerChange
protected ProjectionFactory projectionFactory
protected MapBean.RotationHelper rotHelper
Constructor Detail |
---|
public MapBean()
public MapBean(boolean useThreadedNotification)
Method Detail |
---|
public static java.lang.String getCopyrightMessage()
public java.lang.String toString()
toString
in class java.awt.Component
public void dispose()
protected final void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
addImpl
in class java.awt.Container
comp
- Componentconstraints
- Objectindex
- int locationpublic final void setLayout(java.awt.LayoutManager mgr)
setLayout
in class java.awt.Container
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public void setMinimumSize(java.awt.Dimension dim)
setMinimumSize
in class javax.swing.JComponent
public final java.awt.Insets getInsets()
This makes sure that there will be no +x,+y offset when drawing graphics. This is ok since any borders around the MapBean will get drawn afterwards on top.
getInsets
in class javax.swing.JComponent
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
e
- ComponentEventpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
e
- ComponentEventpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
e
- ComponentEventpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
e
- ComponentEventpublic void addProjectionListener(ProjectionListener l)
l
- ProjectionListenerpublic void removeProjectionListener(ProjectionListener l)
l
- ProjectionListenerprotected void fireProjectionChanged()
public void purgeAndNotifyRemovedLayers()
public float getScale()
Projection.getScale()
public void setScale(float newScale)
newScale
- the new scaleProj.setScale(float)
public java.awt.geom.Point2D getCenter()
Projection.getCenter()
public void setCenter(java.awt.geom.Point2D newCenter)
newCenter
- the center point of the mapProj.setCenter(Point2D)
public void setCenter(double lat, double lon)
lat
- the latitude of center point of the map in decimal degreeslon
- the longitude of center point of the map in decimal degreesProj.setCenter(double, double)
public void setCenter(float lat, float lon)
lat
- the latitude of center point of the map in decimal degreeslon
- the longitude of center point of the map in decimal degreesProj.setCenter(double, double)
public void setBackgroundColor(java.awt.Color color)
color
- java.awt.Color.public void setBackground(java.awt.Color color)
setBackground
in class javax.swing.JComponent
public void paintBorder(java.awt.Graphics g)
paintBorder
in class javax.swing.JComponent
public void setBckgrnd(java.awt.Paint paint)
paint
- java.awt.Paint.public java.awt.Color getBackground()
getBackground
in class java.awt.Component
public java.awt.Paint getBckgrnd()
public Projection getProjection()
public Projection getRotatedProjection()
public void setProjection(Projection aProjection)
aProjection
- Projectionpublic void center(CenterEvent evt)
CenterEvents
.
center
in interface CenterListener
evt
- the incoming center eventpublic void pan(PanEvent evt)
PanEvents
.
pan
in interface PanListener
evt
- the incoming pan eventpublic void zoom(ZoomEvent evt)
zoom
in interface ZoomListener
evt
- the ZoomEvent describing the new scale.public void setDoContainerChange(boolean value)
value
- booleanpublic boolean getDoContainerChange()
public void componentAdded(java.awt.event.ContainerEvent e)
componentAdded
in interface java.awt.event.ContainerListener
e
- ContainerEventpublic void componentRemoved(java.awt.event.ContainerEvent e)
componentRemoved
in interface java.awt.event.ContainerListener
e
- ContainerEventpurgeAndNotifyRemovedLayers()
protected void changeLayers(java.awt.event.ContainerEvent e)
e
- ContainerEventpublic void projectionChanged(ProjectionEvent e)
projectionChanged
in interface ProjectionListener
e
- ProjectionEventpublic void setCursor(java.awt.Cursor newCursor)
setCursor
in class java.awt.Component
newCursor
- Cursorpublic void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
addPropertyChangeListener
in class java.awt.Container
protected final void debugmsg(java.lang.String msg)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
protected void drawProjectionBackground(java.awt.Graphics g)
public void paintChildren(java.awt.Graphics g)
paintChildren
in class javax.swing.JComponent
public void paintPainters(java.awt.Graphics g)
public void paintChildren(java.awt.Graphics g, java.awt.Rectangle clip)
protected void paintLayers(java.awt.Graphics g)
g
- Graphicspublic java.awt.Graphics getGraphics(boolean rotateIfSet)
public void paintChildrenWithBorder(java.awt.Graphics g, boolean drawBorder)
public void addPaintListener(PaintListener l)
l
- PaintListenerpublic void removePaintListener(PaintListener l)
l
- PaintListenerpublic void setLayers(LayerEvent evt)
setLayers
in interface LayerListener
evt
- a LayerEventpublic void repaint(Layer layer)
public void setMapBeanRepaintPolicy(MapBeanRepaintPolicy mbrp)
public MapBeanRepaintPolicy getMapBeanRepaintPolicy()
public java.awt.geom.Point2D getCoordinates(java.awt.event.MouseEvent event)
public <T extends java.awt.geom.Point2D> T getCoordinates(java.awt.event.MouseEvent event, T llp)
public java.awt.geom.Point2D getNonRotatedLocation(java.awt.event.MouseEvent event)
public java.awt.geom.Point2D getNonRotatedLocation(java.awt.event.MouseEvent event, java.awt.geom.Point2D pnt)
public java.awt.Shape getNonRotatedShape(java.awt.Shape shape)
shape
- input shape
public <T extends java.awt.geom.Point2D> T inverse(double x, double y, T ret)
x
- horizontal window pixel from left sidey
- vertical window pixel from topret
- Point2D object returned with coordinates suitable for
projection where mouse event is.
public boolean isBuffered()
public void setBufferDirty(boolean value)
value
- booleanpublic boolean isBufferDirty()
public void setLayerRemovalDelayed(boolean set)
set
- the settingpublic boolean isLayerRemovalDelayed()
public void showLayerPalettes()
public void hideLayerPalettes()
public ProjectionFactory getProjectionFactory()
public void setProjectionFactory(ProjectionFactory projFactory)
protected MapBean.RotationHelper getUpdatedRotHelper()
protected MapBean.RotationHelper getRotHelper()
protected void setRotHelper(MapBean.RotationHelper nRotHelper)
nRotHelper
- the locRotHelper to set as the current one. Disposes of
the old one.public void setRotationAngle(double angle)
angle
- radians of rotation, increasing clockwise.public void setRotationAngle(double angle, boolean fastRotation)
angle
- radians of rotation, increasing clockwise.fastRotation
- if true, fireProjectionChange will not be called, and
the RotationHelper will be used to spin image buffer.public double getRotationAngle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |