jwo.landserf.gui
Class GraphicsArea

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by jwo.landserf.gui.GraphicsArea
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GraphicsArea
extends JPanel

Panel for the displaying and graphical querying of spatial objects.

Version:
2.3, 29th September, 2008.
Author:
Jo Wood.
See Also:
Serialized Form

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.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int ADD
          RGB addition.
static int BLEND
          Blend surface and drape.
static int BROADCAST_QUERY
          Indicates broadcast query mode (listeners informed).
static int CLEAR
          No raster display.
static int DIGIT_PAN
          Indicates panning while in digitizing mode.
static int DIGITIZE
          Indicates digitizing mode.
static int HUEINT
          Hue-Intensity map.
static int HUESAT
          Hue-Saturation map.
static int MULTISCALE_QUERY
          Indicates multiscale query mode.
static int NORMAL
          Indicates normal display mode.
static int PAN
          Indicates panning display mode.
static int PROFILE
          Indicates cross-sectional profile mode.
static int QUERY
          Indicates query mode.
static int RASTER
          Interpolated k-colour raster.
static int SHADED
          Shaded relief blended with k-colour raster
static int ZOOM
          Indicates zooming display mode.
 
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
GraphicsArea()
          Creates a stand-alone panel for displaying spatial models.
GraphicsArea(GISFrame parent)
          Creates a panel for displaying spatial models.
 
Method Summary
 void addRubberbandListener(RubberbandListener rbListener)
          Adds a rubber band listener to the list of objects to be informed when a new rubber band is created.
 void addScaleQuery(JWDialogueListener listener, int paramType)
          Adds a link between graphics area and mouse for multi-scale raster query.
 boolean displayRast()
          Displays the currently selected raster(s) according to the currently selected display type.
 Footprint getCompleteBounds()
          Returns the geographic bounds of the maps displayed in the graphics area.
 BufferedImage getCompleteImage()
          Returns a copy of the current image associated with the graphics area.
 BufferedImage getCompleteImage(boolean includeAlpha)
          Returns a copy of the current image associated with the graphics area.
 int getDisplayType()
          Reports the currently selected raster display type.
 Footprint getGeoBounds()
          Reports the georeferenced boundaries of the current viewing area.
 AffineTransform getGeoToPixel()
          Reports the affine transformation required to convert georeferenced to pixel coordinates.
 Point2D getGeoToPixel(Point2D geo)
          Transforms the given point from georeferenced to pixel coordinates.
 int getImageHeight()
          Returns the current image height in pixels.
 int getImageWidth()
          Returns the current image width in pixels.
 AffineTransform getPixelToGeo()
          Reports the affine transformation required to convert pixel to georeferenced coordinates.
 Point2D getPixelToGeo(Point2D pxl)
          Transforms the given point from pixel to georeferenced coordinates.
 Image getRasterImage()
          Returns the current image associated with the display of any rasters graphics area.
 Image getScaledImage()
          Returns the scaled image associated with the graphics area.
 VectorStyles getVectorStyles()
          Reports the currently used vector rendering styles.
 void keepOverlay(boolean isKept)
          Determines if any overlay vectors remain on screen with successive repaints.
 void paintComponent(Graphics g)
          Updates the graphics area with a representation of the currently selected spatial objects.
 void removeRubberbandListener(RubberbandListener rbListener)
          Removes a given listener from the list of objects to be informed when a new rubber band is created.
 void removeScaleQuery(ScaleGraphBox scaleGraph)
          Removes a given scale graph for reporting multi-scale variation.
 void setBoundaryColour(Color colour)
          Sets the colour to use for polygon boundaries.
 void setBusy(boolean isBusy)
          Indicates that some process has started or stopped.
 void setCursor(Cursor newCursor)
          Changes the cursor associated with this graphics area.
 void setDisplayMode(int mode)
          Sets the display mode (NORMAL, ZOOM, PAN, QUERY, BROADCAST_QUERY or MULTISCALE_QUERY).
 void setDisplayType(int displayType)
          Sets the raster display type.
 void setDisplayVect(boolean display)
          Determines whether the currently selected vectors are displayed or not.
 void setFixedLineWidth(boolean isFixedLineWidth)
          Sets whether line width should be fixed as user zooms in/out.
 void setFixedPointSize(boolean isFixedPointSize)
          Sets whether or not point rendering style uses fixed size independently of zooming scale.
 void setLabelBackground(Color colour)
          Sets the colour to use for label backgrounds.
 void setLabelForeground(Color colour)
          Sets the colour to use for label foregrounds.
 void setLabelPosition(int position)
          Sets the label position relative to its location.
 void setLabelSize(float size)
          Sets the font size at which to display labels.
 void setLineWidth(float width)
          Sets the rendering line width (in pixels).
 void setOverlayStyles(VectorStyles overlayStyles)
          Sets the styles used for displaying a vector overlay.
 void setPointSize(float pointSize)
          Sets the point symbol size (in pixels).
 void setPolygonOpacity(float opacity)
          Sets the rendering opacity of polygon interiors.
 void setRaster1(RasterMap raster)
          Makes the given raster surface the primary one to display.
 void setRaster2(RasterMap raster)
          Makes the given raster surface the secondary one to display.
 void setRasterValueOverlay(boolean isDisplayed)
          Determines whether raster values are displayed numerically over the raster grid.
 void setRenderingStyle(int style)
          Sets the rendering style for vectors.
 void setRubberbandType(int bandType)
          Sets the type of rubber band feature to be displayed.
 void setShowLabels(boolean showLabels)
          Determines whether point labels are to be shown or not.
 void setSurroundLine(boolean isSurroundLine)
          Determines whether line symbolisation should be hollow (true) or solid (false).
 void setSurroundPoint(boolean surroundPoint)
          Determines whether point symbols should be hollow (true) or solid (false).
 void setVectorMap1(VectorMap vectorMap)
          Makes the given vector map the primary one to display.
 void setVectorMap2(VectorMap vectorMap)
          Makes the given vector map the secondary one to display.
 void setVectorOverlay(VectorMap overlay)
          Displays the given vector map as an overlay.
 void setVectorStyles(VectorStyles styles)
          Sets the styles for vector rendering.
 void setViewListener(FootprintListener viewListener)
          Sets the view listener that is informed when the main view changes (e.g through zooming or panning, or the display of a new spatial object).
 void showFullImage()
          Resets the zoom/panning display to show full image.
 void startProfileQuery(JWDialogueListener listener)
          Creates a profile query box to display surface or vector profiles.
 void stopProfileQuery()
          Stops querying surface profiles.
 boolean usesRaster1()
          Reports whether primary raster is being used in the current display.
 boolean usesRaster2()
          Reports whether secondary raster is being used in the current display.
 boolean usesVector()
          Reports whether vector is being used in the current display.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, 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, setLayout, 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, getBackground, 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, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLEAR

public static final int CLEAR
No raster display.

See Also:
Constant Field Values

RASTER

public static final int RASTER
Interpolated k-colour raster.

See Also:
Constant Field Values

SHADED

public static final int SHADED
Shaded relief blended with k-colour raster

See Also:
Constant Field Values

BLEND

public static final int BLEND
Blend surface and drape.

See Also:
Constant Field Values

HUESAT

public static final int HUESAT
Hue-Saturation map.

See Also:
Constant Field Values

HUEINT

public static final int HUEINT
Hue-Intensity map.

See Also:
Constant Field Values

ADD

public static final int ADD
RGB addition.

See Also:
Constant Field Values

NORMAL

public static final int NORMAL
Indicates normal display mode.

See Also:
Constant Field Values

ZOOM

public static final int ZOOM
Indicates zooming display mode.

See Also:
Constant Field Values

PAN

public static final int PAN
Indicates panning display mode.

See Also:
Constant Field Values

QUERY

public static final int QUERY
Indicates query mode.

See Also:
Constant Field Values

MULTISCALE_QUERY

public static final int MULTISCALE_QUERY
Indicates multiscale query mode.

See Also:
Constant Field Values

PROFILE

public static final int PROFILE
Indicates cross-sectional profile mode.

See Also:
Constant Field Values

BROADCAST_QUERY

public static final int BROADCAST_QUERY
Indicates broadcast query mode (listeners informed).

See Also:
Constant Field Values

DIGITIZE

public static final int DIGITIZE
Indicates digitizing mode.

See Also:
Constant Field Values

DIGIT_PAN

public static final int DIGIT_PAN
Indicates panning while in digitizing mode.

See Also:
Constant Field Values
Constructor Detail

GraphicsArea

public GraphicsArea()
Creates a stand-alone panel for displaying spatial models. Defaults to allowing display of single raster and vector map.


GraphicsArea

public GraphicsArea(GISFrame parent)
Creates a panel for displaying spatial models.

Parameters:
parent - Containing window with status and progress output.
Method Detail

displayRast

public boolean displayRast()
Displays the currently selected raster(s) according to the currently selected display type.

Returns:
True if no problems with display.

setVectorOverlay

public void setVectorOverlay(VectorMap overlay)
Displays the given vector map as an overlay. This can be used for showing temporary vector maps such as those created interactively via on-screen digitizing.

Parameters:
overlay - Vector map to overlay on display.

setOverlayStyles

public void setOverlayStyles(VectorStyles overlayStyles)
Sets the styles used for displaying a vector overlay. If not specified or null provided, the existing vector style will be used for overlays.

Parameters:
overlayStyles - Drawing style for vector overlay.

setViewListener

public void setViewListener(FootprintListener viewListener)
Sets the view listener that is informed when the main view changes (e.g through zooming or panning, or the display of a new spatial object).

Parameters:
viewListener - Class listening for a change in view.

setRasterValueOverlay

public void setRasterValueOverlay(boolean isDisplayed)
Determines whether raster values are displayed numerically over the raster grid. Numeric values are scaled approximately to fit inside raster cell, so overlay should only be set to true if rasters are relatively small.

Parameters:
isDisplayed - Numeric overlay is displayed if set to true.

keepOverlay

public void keepOverlay(boolean isKept)
Determines if any overlay vectors remain on screen with successive repaints. If this is set to false, overlay disappears as soon as mouse is released. To remove overlay vector from display, set value to false.

Parameters:
isKept - Vector overlay will remain on screen if true.

setRaster1

public void setRaster1(RasterMap raster)
Makes the given raster surface the primary one to display.

Parameters:
raster - New primary raster to be displayed.

setRaster2

public void setRaster2(RasterMap raster)
Makes the given raster surface the secondary one to display.

Parameters:
raster - New secondary raster to be displayed.

setVectorMap1

public void setVectorMap1(VectorMap vectorMap)
Makes the given vector map the primary one to display.

Parameters:
vectorMap - New vector map to be displayed.

setVectorMap2

public void setVectorMap2(VectorMap vectorMap)
Makes the given vector map the secondary one to display.

Parameters:
vectorMap - New vector map to be displayed.

setDisplayVect

public void setDisplayVect(boolean display)
Determines whether the currently selected vectors are displayed or not.

Parameters:
display - True if vector is to be displayed.

showFullImage

public void showFullImage()
Resets the zoom/panning display to show full image.


paintComponent

public void paintComponent(Graphics g)
Updates the graphics area with a representation of the currently selected spatial objects.

Overrides:
paintComponent in class JComponent
Parameters:
g - Graphics context in which to draw.

getGeoBounds

public Footprint getGeoBounds()
Reports the georeferenced boundaries of the current viewing area. This is calculated in real-time, so should be consistent with current zooming/panning position.

Returns:
Georeferenced boundaries of viewing area.

addRubberbandListener

public void addRubberbandListener(RubberbandListener rbListener)
Adds a rubber band listener to the list of objects to be informed when a new rubber band is created.

Parameters:
rbListener - Object listening out for a rubber band event.

removeRubberbandListener

public void removeRubberbandListener(RubberbandListener rbListener)
Removes a given listener from the list of objects to be informed when a new rubber band is created.

Parameters:
rbListener - Object to be removed from listeners.

setRubberbandType

public void setRubberbandType(int bandType)
Sets the type of rubber band feature to be displayed. Can be either a box or line.

Parameters:
bandType - Type of rubber band to display. Can be JWRubberband.BOX or JWRubberband.LINE.
See Also:
JWRubberband

addScaleQuery

public void addScaleQuery(JWDialogueListener listener,
                          int paramType)
Adds a link between graphics area and mouse for multi-scale raster query. Initially asks for maximum scale and parameter to calculate.

Parameters:
listener - Listens for a close in the scale query box and informs the GUI.
paramType - Parameter type to calculate on query.

removeScaleQuery

public void removeScaleQuery(ScaleGraphBox scaleGraph)
Removes a given scale graph for reporting multi-scale variation.

Parameters:
scaleGraph - Scale graph to remove.

startProfileQuery

public void startProfileQuery(JWDialogueListener listener)
Creates a profile query box to display surface or vector profiles.

Parameters:
listener - Listens for a close in the profile query box and informs the GUI.

stopProfileQuery

public void stopProfileQuery()
Stops querying surface profiles.


getGeoToPixel

public AffineTransform getGeoToPixel()
Reports the affine transformation required to convert georeferenced to pixel coordinates.

Returns:
Affine transformation to convert georeferenced into pixel coordinates.

getDisplayType

public int getDisplayType()
Reports the currently selected raster display type. Currently supports

Returns:
Raster display type.

usesRaster1

public boolean usesRaster1()
Reports whether primary raster is being used in the current display.

Returns:
True if primary raster is being used in display.

usesRaster2

public boolean usesRaster2()
Reports whether secondary raster is being used in the current display.

Returns:
True if secondary raster is being used in display.

usesVector

public boolean usesVector()
Reports whether vector is being used in the current display.

Returns:
True if vector is being used in display.

getGeoToPixel

public Point2D getGeoToPixel(Point2D geo)
Transforms the given point from georeferenced to pixel coordinates.

Parameters:
geo - Georeferenced coordinate pair to transform.
Returns:
Pixel coordinate pair representing the given georeferenced point.

getPixelToGeo

public AffineTransform getPixelToGeo()
Reports the affine transformation required to convert pixel to georeferenced coordinates.

Returns:
Affine transformation to convert pixel into georeferenced coordinates.

getPixelToGeo

public Point2D getPixelToGeo(Point2D pxl)
Transforms the given point from pixel to georeferenced coordinates.

Parameters:
pxl - Pixel coordinate pair to transform.
Returns:
Georeferenced coordinate pair representing the given pixel coordinates.

getRasterImage

public Image getRasterImage()
Returns the current image associated with the display of any rasters graphics area. This image is a direct representation of the raster and is not dependent on window size. Note that if any vectors are currently displayed, they will not be represented in the image. To display vectors as well call getCompleteImage(). The size of the image is dependent on the dimensions of the raster. If there is no image displayed, this method will return a 1x1 pixel blank image.

Returns:
Current image or small blank image if nothing currently displayed.

getCompleteImage

public BufferedImage getCompleteImage()
Returns a copy of the current image associated with the graphics area. This version will not include any transparent areas. The image is a direct representation of any rasters or vectors and is not dependent on window size. This method will create a new buffered image every time it is called, so should be used sparingly to preserve memory resources. The size of the image is dependent on the dimensions of the raster if it exists. If there is no image or vector displayed, this method will return a 1x1 pixel blank image.

Returns:
Current image or small blank image if nothing currently displayed.

getCompleteImage

public BufferedImage getCompleteImage(boolean includeAlpha)
Returns a copy of the current image associated with the graphics area. This image is a direct representation of any rasters or vectors and is not dependent on window size. This method will create a new buffered image every time it is called, so should be used sparingly to preserve memory resources. The size of the image is dependent on the dimensions of the raster if it exists. If there is no image or vector displayed, this method will return a 1x1 pixel blank image.

Parameters:
includeAlpha - Null values will be represented as transparent areas if true.
Returns:
Current image or small blank image if nothing currently displayed.

getCompleteBounds

public Footprint getCompleteBounds()
Returns the geographic bounds of the maps displayed in the graphics area. This is independent of any zoom or pan settings and therefore includes entire spatial objects. This will be the union of the displayed raster and vector if they exist, otherwise the the bounds of the raster or vector map.If neither exist, null is returned.

Returns:
Geographic bounds of full display, or null if nothing displayed.

getScaledImage

public Image getScaledImage()
Returns the scaled image associated with the graphics area. The image is scaled according to the current window dimensions. The size of the image is dependent on the current window size.

Returns:
Current image.

getImageWidth

public int getImageWidth()
Returns the current image width in pixels. This depends on the aspect ratio of the image and the current window size.

Returns:
Width of current image.

getImageHeight

public int getImageHeight()
Returns the current image height in pixels. This depends on the aspect ratio of the image and the current window size.

Returns:
Height of current image.

setDisplayType

public void setDisplayType(int displayType)
Sets the raster display type. Currently supports

Parameters:
displayType - Raster display type.

setDisplayMode

public void setDisplayMode(int mode)
Sets the display mode (NORMAL, ZOOM, PAN, QUERY, BROADCAST_QUERY or MULTISCALE_QUERY).

Parameters:
mode - Display mode to use.

setBusy

public void setBusy(boolean isBusy)
Indicates that some process has started or stopped. When busy, a 'busy' cursor is shown.

Parameters:
isBusy - Busy if true.

setCursor

public void setCursor(Cursor newCursor)
Changes the cursor associated with this graphics area.

Overrides:
setCursor in class Component
Parameters:
newCursor - New cursor to use.

setVectorStyles

public void setVectorStyles(VectorStyles styles)
Sets the styles for vector rendering.

Parameters:
styles - Rendering styles to use.

getVectorStyles

public VectorStyles getVectorStyles()
Reports the currently used vector rendering styles.

Returns:
Vector rendering styles used by this graphics area.

setPointSize

public void setPointSize(float pointSize)
Sets the point symbol size (in pixels).

Parameters:
pointSize - Point size in pixels. Need not be a whole number.

setFixedPointSize

public void setFixedPointSize(boolean isFixedPointSize)
Sets whether or not point rendering style uses fixed size independently of zooming scale.

Parameters:
isFixedPointSize - If true, point rendering uses fixed size.

setSurroundPoint

public void setSurroundPoint(boolean surroundPoint)
Determines whether point symbols should be hollow (true) or solid (false).

Parameters:
surroundPoint - True if points are to be drawn as transparent circles with border.

setLineWidth

public void setLineWidth(float width)
Sets the rendering line width (in pixels).

Parameters:
width - Line width in pixels. Need not be a whole number.

setFixedLineWidth

public void setFixedLineWidth(boolean isFixedLineWidth)
Sets whether line width should be fixed as user zooms in/out.

Parameters:
isFixedLineWidth - True if fixed size is to be used.

setSurroundLine

public void setSurroundLine(boolean isSurroundLine)
Determines whether line symbolisation should be hollow (true) or solid (false).

Parameters:
isSurroundLine - True if lines are to be drawn as transparent with borders.

setPolygonOpacity

public void setPolygonOpacity(float opacity)
Sets the rendering opacity of polygon interiors.

Parameters:
opacity - Polygon interior opacity scaled between (0-1) where 0 is transparent and 1 is opaque.

setBoundaryColour

public void setBoundaryColour(Color colour)
Sets the colour to use for polygon boundaries.

Parameters:
colour - Polygon boundary colour, or null if vector attribute used to determine colour.

setRenderingStyle

public void setRenderingStyle(int style)
Sets the rendering style for vectors.

Parameters:
style - Rendering style for vector. Either VectorStyles.SPEED or VectorStyles.QUALITY.

setLabelBackground

public void setLabelBackground(Color colour)
Sets the colour to use for label backgrounds.

Parameters:
colour - Label background colour.

setLabelForeground

public void setLabelForeground(Color colour)
Sets the colour to use for label foregrounds.

Parameters:
colour - Label foreground colour.

setShowLabels

public void setShowLabels(boolean showLabels)
Determines whether point labels are to be shown or not.

Parameters:
showLabels - Point labels are shown if true.

setLabelSize

public void setLabelSize(float size)
Sets the font size at which to display labels.

Parameters:
size - Label font size (in point units).

setLabelPosition

public void setLabelPosition(int position)
Sets the label position relative to its location.

Parameters:
position - Label position. Should be one of VectorStyles.NORTH_WEST, VectorStyles.NORTH, VectorStyles.NORTH_EAST, VectorStyles.EAST, VectorStyles.SOUTH_EAST, VectorStyles.SOUTH, VectorStyles.SOUTH_WEST, VectorStyles.WEST or VectorStyles.CENTRE.
See Also:
VectorStyles


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009