|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--jwo.utils.JWCanvas | +--jwo.landserf.gui.GraphicsArea
Class for creating a canvas to display possible raster and vector graphics.
Nested Class Summary |
Nested classes inherited from class java.awt.Canvas |
Canvas.AccessibleAWTCanvas |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static int |
BLEND
Blend surface and drape. |
static int |
CLEAR
No raster display. |
static int |
HUESAT
Hue-Saturation map. |
static int |
RASTER
Interpolated k-colour raster. |
static int |
SHADED
Shaded relief blended with k-colour raster |
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 the canvas onto which graphics will be drawn. |
Method Summary | |
void |
addRubberbandListener(RubberbandListener rbListener)
Adds a rubberband listener to the list of objects to be informed when a new rubberband is created. |
boolean |
displayRast(RastSurf surf,
RastSurf drape)
Displays raster object on screen, scaled to the maximum size allowed by the window while preserving aspect ratio. |
boolean |
displayVect(VectorMap vectorMap)
Display vector in window, scaled to georegister with any raster objects. |
int |
getDisplay()
Reports the currently selected raster display type. |
RastSurf |
getDrape()
Gets the currently displayed drape. |
Image |
getImage()
Returns the current image associated with the graphics area. |
int |
getImageHeight()
Returns the current image height in pixels. |
int |
getImageWidth()
Returns the current image width in pixels. |
Image |
getScaledImage()
Returns the scaled image associated with the graphics area. |
JWRectangle |
getSubRegion()
Reports the currently selected sub-region. |
RastSurf |
getSurf()
Gets the currently displayed raster. |
void |
mouseClicked(MouseEvent mouseEvent)
Checks for mouse clicks, but does nothing. |
void |
mouseDragged(MouseEvent mouseEvent)
Checks for mouse dragging and draws a rubberband box in the appropriate location. |
void |
mouseEntered(MouseEvent mouseEvent)
Checks for pointer entering event, but does nothing. |
void |
mouseExited(MouseEvent mouseEvent)
Checks for pointer exiting event, but does nothing. |
void |
mouseMoved(MouseEvent mouseEvent)
Checks for mouse movement, but does nothing. |
void |
mousePressed(MouseEvent mouseEvent)
Checks for mouse button press, and reports on the (x,y,z) values at current mouse position. |
void |
mouseReleased(MouseEvent mouseEvent)
Checks for mouse button release, and turns off mouse query. |
void |
paint(Graphics g)
Plots the graphics onto the canvas. |
void |
removeProfileQueryBox()
Removes the profile query box and turns off interactive profile query. |
void |
removeRastQueryBox()
Removes the raster query box and turns off interactive raster query. |
void |
removeRubberbandListener(RubberbandListener rbListener)
Removes a given listener from the list of objects to be informed when a new rubberband is created. |
void |
removeScaleQueryBox()
Removes the multi-scale raster query box and turns off interactive raster query. |
void |
set3dBorder(boolean is3d)
Sets the 3D border facility on or off. |
void |
setClear(boolean clear)
Turns screen clearing on or off. |
void |
setDisplay(int displayType)
Sets the raster display type. |
void |
setFullView()
Resets view so all data are visible. |
void |
setOverlay(boolean draw)
Determines if the overlay vector is drawn in the graphics window. |
void |
setOverlay(VectorMap vectMap,
boolean draw)
Sets the overlay vector map to be drawn in the graphics window. |
void |
setRubberbandType(int bandType)
Sets the type of rubberband feature to be displayed. |
void |
setVectorDisplay(boolean isDisplayed)
Sets the vector display to on or off. |
void |
startNetworkQuery()
Establishes a link (if one does not already exist) between graphics area and mouse for feature queries. |
void |
startProfileQuery()
Establishes a link (if one does not already exist) between graphics area and mouse for raster profile query. |
void |
startRastQuery()
Establishes a link (if one does not already exist) between graphics area and mouse for raster query. |
void |
startScaleQuery(int paramType)
Establishes a link (if one does not already exist) between graphics area and mouse for multi-scale raster query. |
void |
stopNetworkQuery()
Breaks the link between graphics area and mouse for feature queries. |
void |
stopProfileQuery()
Breaks the link between graphics area and mouse for raster profile query. |
void |
stopRastQuery()
Breaks the link between graphics area and mouse for raster query. |
void |
stopScaleQuery()
Breaks the link between graphics area and mouse for multi-scale raster query. |
double |
xToEasting(int x)
Converts display pixel coordinate into its georeferenced equivalent. |
double |
yToNorthing(int y)
Converts display pixel coordinate into its georeferenced equivalent. |
Methods inherited from class jwo.utils.JWCanvas |
componentHidden, componentMoved, componentResized, componentShown, update |
Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CLEAR
public static final int RASTER
public static final int SHADED
public static final int BLEND
public static final int HUESAT
Constructor Detail |
public GraphicsArea()
Method Detail |
public void paint(Graphics g)
paint
in class Canvas
g
- The graphics context in which to paint.public boolean displayRast(RastSurf surf, RastSurf drape)
surf
- Raster surface to display.drape
- Drape to display over surface.
public boolean displayVect(VectorMap vectorMap)
public int getDisplay()
public void setDisplay(int displayType)
displayType
- Raster display type.public RastSurf getSurf()
public RastSurf getDrape()
public Image getImage()
public Image getScaledImage()
public int getImageWidth()
public int getImageHeight()
public void setVectorDisplay(boolean isDisplayed)
isDisplayed
- Determines if vector is displayed or not.public void set3dBorder(boolean is3d)
is3d
- Determines if border is 3D.public void setClear(boolean clear)
clear
- Will clear screen on redraw if set to true.public double xToEasting(int x)
x
- pixel x coordinate to convert.
public double yToNorthing(int y)
y
- pixel y coordinate to convert.
public void startRastQuery()
public void startProfileQuery()
public void startNetworkQuery()
public void startScaleQuery(int paramType)
paramType
- Parameter type to calculate on query.public void removeRastQueryBox()
public void removeProfileQueryBox()
public void removeScaleQueryBox()
public void stopRastQuery()
public void stopProfileQuery()
public void stopNetworkQuery()
public void stopScaleQuery()
public void setFullView()
public void addRubberbandListener(RubberbandListener rbListener)
rbListener
- Object listening out for a rubberband event.public void removeRubberbandListener(RubberbandListener rbListener)
rbListener
- Object to be removed from listeners.public void setRubberbandType(int bandType)
bandType
- Type of rubberband to display. Can be JWRubberband.BOX or
JWRubberband.LINE.JWRubberband
public JWRectangle getSubRegion()
public void setOverlay(VectorMap vectMap, boolean draw)
vectMap
- The vector map to draw or remove.draw
- True if map is to be drawn, false if it is to be removed.public void setOverlay(boolean draw)
draw
- True if map is to be drawn, false if it is to be removed.public void mouseClicked(MouseEvent mouseEvent)
mouseClicked
in interface MouseListener
mouseEvent
- Mouse click event.public void mousePressed(MouseEvent mouseEvent)
mousePressed
in interface MouseListener
mouseEvent
- Mouse press event.public void mouseReleased(MouseEvent mouseEvent)
mouseReleased
in interface MouseListener
mouseEvent
- Mouse release event.public void mouseDragged(MouseEvent mouseEvent)
mouseDragged
in interface MouseMotionListener
mouseEvent
- Mouse dragging event.public void mouseMoved(MouseEvent mouseEvent)
mouseMoved
in interface MouseMotionListener
mouseEvent
- Mouse movement event.public void mouseEntered(MouseEvent mouseEvent)
mouseEntered
in interface MouseListener
mouseEvent
- Pointer entering event.public void mouseExited(MouseEvent mouseEvent)
mouseExited
in interface MouseListener
mouseEvent
- Mouse exiting event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |