jwo.landserf.gui
Class GISFrameAdapter

java.lang.Object
  extended byjwo.landserf.gui.GISFrameAdapter
All Implemented Interfaces:
GISFrame
Direct Known Subclasses:
SimpleGISFrame

public class GISFrameAdapter
extends Object
implements GISFrame

An abstract adapter class for creating GISFrames. The methods in this class are empty. This class exists as convenience for GISFrames. Extend this class to create a GISFrame and override the methods for the bahaviour of interest.

Version:
2.1, 3rd September, 2004.
Author:
Jo Wood.

Field Summary
 
Fields inherited from interface jwo.landserf.gui.GISFrame
NOT_SELECTED, PRIMARY, SECONDARY
 
Constructor Summary
GISFrameAdapter(Frame parent)
          Creats a new GISFrame with the given parent.
 
Method Summary
 void addRaster(RasterMap newRast, int selection)
          Would adds a new raster to the collection stored in the GIS frame, but ignored in this case.
 void addVectorMap(VectorMap newVect, int selection)
          Adds a new vector map to the collection stored in the GIS frame, but ignored in this case.
 void broadcastFootprint(Footprint fp)
          Broadcasts the given footprint to any footprint listeners, but does nothing in this case.
 Frame getFrame()
          Reports the AWT frame in which this should be embedded.
 GraphicsArea getGraphicsArea()
          Returns the graphics area used for display of geographic objects, but ignored in this case.
 PrintUtilities getPrintUtilities()
          Passes on the printer utilites from the frame.
 RasterMap getRaster1()
          Returns the primary raster surface associated with the window, but does nothing in this case.
 RasterMap getRaster2()
          Returns the secondary raster surface associated with the window, but ignored in this case.
 VectorMap getVectorMap1()
          Returns the primary vector map associated with the window, but ignored in this case.
 VectorMap getVectorMap2()
          Returns the secondary vector map associated with the window, but ignored in this case.
 boolean isExperimental()
          Reports whether experimental functionality is available to the GUI.
 void redisplay(boolean doRecalc)
          Redisplays the contents of the frame, but ignored in this case.
 void removeSpatialObject(SpatialObject spObj)
          Removes the given spatial object from those stored by the GISFrame but does nothing in this case.
 void setBroadcastPointQuery(boolean queryMode, FootprintListener fpListener)
          Turns broadcast point query mode on or off, but ignored in this case.
 void setBusy(boolean busy)
          Indicates that some process has started or stopped.
 void setMaxProgress(int maxProgress)
          Displays the maximum progress value, but does nothing in this case.
 void setMessage(String text)
          Displays the given message in frame, but does nothing in this case.
 void setMinProgress(int minProgress)
          Displays the minimum progress value, but does nothing in this case.
 void setProgress(int progress)
          Sets the current progress (should be between 0 and 100 unless minimum or maximum progress values have been changed.
 void setRaster1(RasterMap raster)
          Makes the given raster surface the primary one to be processed.
 void setRaster2(RasterMap raster)
          Makes the given raster surface the secondary one to be processed.
 void setVectorMap1(VectorMap vectorMap)
          Makes the given vector map the primary one associated with the window.
 void setVectorMap2(VectorMap vectorMap)
          Makes the given vector map the primary one associated with the window.
 void updateInputGUI()
          Updates the window's menu/button items according to what is currently stored or displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GISFrameAdapter

public GISFrameAdapter(Frame parent)
Creats a new GISFrame with the given parent.

Parameters:
parent - Parent frame.
Method Detail

updateInputGUI

public void updateInputGUI()
Updates the window's menu/button items according to what is currently stored or displayed.

Specified by:
updateInputGUI in interface GISFrame

redisplay

public void redisplay(boolean doRecalc)
Redisplays the contents of the frame, but ignored in this case.

Specified by:
redisplay in interface GISFrame
Parameters:
doRecalc - If true, contents of frame can be recalculated, but ignored in this case.

addRaster

public void addRaster(RasterMap newRast,
                      int selection)
Would adds a new raster to the collection stored in the GIS frame, but ignored in this case.

Specified by:
addRaster in interface GISFrame
Parameters:
newRast - new Raster to add.
selection - Selection type (PRIMARY, SECONDARY or NOT_SELECTED).

addVectorMap

public void addVectorMap(VectorMap newVect,
                         int selection)
Adds a new vector map to the collection stored in the GIS frame, but ignored in this case.

Specified by:
addVectorMap in interface GISFrame
Parameters:
newVect - new vector map to add.
selection - Selection type (PRIMARY, SECONDARY or NOT_SELECTED).

removeSpatialObject

public void removeSpatialObject(SpatialObject spObj)
Removes the given spatial object from those stored by the GISFrame but does nothing in this case.

Specified by:
removeSpatialObject in interface GISFrame
Parameters:
spObj - Spatial object to remove (ignored).

getRaster1

public RasterMap getRaster1()
Returns the primary raster surface associated with the window, but does nothing in this case.

Specified by:
getRaster1 in interface GISFrame
Returns:
Primary raster surface associated with this window.

getRaster2

public RasterMap getRaster2()
Returns the secondary raster surface associated with the window, but ignored in this case.

Specified by:
getRaster2 in interface GISFrame
Returns:
Secondary raster surface associated with this window.

getGraphicsArea

public GraphicsArea getGraphicsArea()
Returns the graphics area used for display of geographic objects, but ignored in this case.

Specified by:
getGraphicsArea in interface GISFrame
Returns:
Graphics area.

getVectorMap1

public VectorMap getVectorMap1()
Returns the primary vector map associated with the window, but ignored in this case.

Specified by:
getVectorMap1 in interface GISFrame
Returns:
Primary vector map associated with this window.

getVectorMap2

public VectorMap getVectorMap2()
Returns the secondary vector map associated with the window, but ignored in this case.

Specified by:
getVectorMap2 in interface GISFrame
Returns:
Secondary vector map associated with this window.

getFrame

public Frame getFrame()
Reports the AWT frame in which this should be embedded.

Specified by:
getFrame in interface GISFrame
Returns:
AWT frame in which this is embedded.

getPrintUtilities

public PrintUtilities getPrintUtilities()
Passes on the printer utilites from the frame. If the utilities have not been initialised, they should be at this point. This is used since printer initialisation can be expensive so is better passed by reference rather than recreated. Ignored in this case.

Specified by:
getPrintUtilities in interface GISFrame
Returns:
Set of printer utilities for printing, previewing and storing printer settings. Returns null in this case.

isExperimental

public boolean isExperimental()
Reports whether experimental functionality is available to the GUI. This can be useful when testing new functionality that may not be available to the general user. By default this returns false.

Specified by:
isExperimental in interface GISFrame
Returns:
True if experimental functionality is to be made available.

setRaster1

public void setRaster1(RasterMap raster)
Makes the given raster surface the primary one to be processed. Ignored in this case.

Specified by:
setRaster1 in interface GISFrame
Parameters:
raster - New primary raster to be associated with this window.

setRaster2

public void setRaster2(RasterMap raster)
Makes the given raster surface the secondary one to be processed. Ignored in this case.

Specified by:
setRaster2 in interface GISFrame
Parameters:
raster - New secondary raster to be associated with this window.

setVectorMap1

public void setVectorMap1(VectorMap vectorMap)
Makes the given vector map the primary one associated with the window. Ignored in this case.

Specified by:
setVectorMap1 in interface GISFrame
Parameters:
vectorMap - New vector map to be associated with this window.

setVectorMap2

public void setVectorMap2(VectorMap vectorMap)
Makes the given vector map the primary one associated with the window. Ignored in this case.

Specified by:
setVectorMap2 in interface GISFrame
Parameters:
vectorMap - New vector map to be associated with this window.

setMessage

public void setMessage(String text)
Displays the given message in frame, but does nothing in this case.

Specified by:
setMessage in interface GISFrame
Parameters:
text - Message to display.

setMinProgress

public void setMinProgress(int minProgress)
Displays the minimum progress value, but does nothing in this case.

Specified by:
setMinProgress in interface GISFrame
Parameters:
minProgress - Minimum progress value.

setMaxProgress

public void setMaxProgress(int maxProgress)
Displays the maximum progress value, but does nothing in this case.

Specified by:
setMaxProgress in interface GISFrame
Parameters:
maxProgress - Maximum progress value.

setProgress

public void setProgress(int progress)
Sets the current progress (should be between 0 and 100 unless minimum or maximum progress values have been changed. Does nothing in this case.

Specified by:
setProgress in interface GISFrame
Parameters:
progress - progress value.

broadcastFootprint

public void broadcastFootprint(Footprint fp)
Broadcasts the given footprint to any footprint listeners, but does nothing in this case.

Specified by:
broadcastFootprint in interface GISFrame
Parameters:
fp - Footprint to broadcast.

setBusy

public void setBusy(boolean busy)
Indicates that some process has started or stopped. This may be used by the GUI to indicate processing visually. Ignored in this case.

Specified by:
setBusy in interface GISFrame
Parameters:
busy - Busy if true.

setBroadcastPointQuery

public void setBroadcastPointQuery(boolean queryMode,
                                   FootprintListener fpListener)
Turns broadcast point query mode on or off, but ignored in this case.

Specified by:
setBroadcastPointQuery in interface GISFrame
Parameters:
queryMode - Point query mode is on if true, otherwise off.


Copyright Jo Wood, 1996-2004, last modified, 3rd September, 2004