com.partnersoft.maps.actors
Class AbstractSnapshotActor

java.lang.Object
  extended by com.partnersoft.maps.model.AbstractMapEditActor
      extended by com.partnersoft.maps.actors.AbstractModuleMapEditActor
          extended by com.partnersoft.maps.actors.AbstractSnapshotActor
All Implemented Interfaces:
MapEditActor

public abstract class AbstractSnapshotActor
extends AbstractModuleMapEditActor

An abstract actor for snapshots, represented as MapViewFrames.

Copyright 2007-2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski, Jaim Ahmed, Paul Reavis

Field Summary
 
Fields inherited from class com.partnersoft.maps.actors.AbstractModuleMapEditActor
app, mapset, module
 
Constructor Summary
AbstractSnapshotActor(MapApp app, MapSet mapset)
           
 
Method Summary
 Ephemeron ephemeronFor(MapEditContext context)
          Returns an Ephemeron for the given context.
protected abstract  MapViewFrame frameForAdd(MapEditContext context)
          Subclasses must implement this to return a MapViewFrame representation of a snapshot to be added in the given context.
protected abstract  MapViewFrame frameForItem(MapDataItem item)
          Subclasses must implement this to return a MapViewFrame representation of a snapshot corresponding to the given MapDataItem.
 boolean isMoveSupported(MapEditContext item)
          Returns true if moving is supported.
 boolean isRotateSupported(MapEditContext context)
          Returns true if rotate is supported.
protected abstract  void modifySnapshot(MapEditContext context, MapViewFrame snapshotFrame, XyPoint selectLocation)
          Subclasses must implement this to modify the currently selected snapshot using the given snapshotFrame (representing the modified version) and then select it at the given selectLocation (representing the place nearest the mouse click that you should reselect the snapshot at).
 void move(MapEditContext context)
          Performs a move.
 void rotate(MapEditContext context)
          Performs a rotate.
 
Methods inherited from class com.partnersoft.maps.actors.AbstractModuleMapEditActor
clearSelectionList, refresh, refreshAndReselect, refreshAndSelect, refreshAndSelect, select, select
 
Methods inherited from class com.partnersoft.maps.model.AbstractMapEditActor
add, connect, convert, copy, delete, edit, isAddSupported, isConnectSupported, isConvertSupported, isCopySupported, isDeleteSupported, isEditSupported, listSupportedActions, listSupportedTools
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSnapshotActor

public AbstractSnapshotActor(MapApp app,
                             MapSet mapset)
Method Detail

frameForAdd

protected abstract MapViewFrame frameForAdd(MapEditContext context)
Subclasses must implement this to return a MapViewFrame representation of a snapshot to be added in the given context.


frameForItem

protected abstract MapViewFrame frameForItem(MapDataItem item)
Subclasses must implement this to return a MapViewFrame representation of a snapshot corresponding to the given MapDataItem.


modifySnapshot

protected abstract void modifySnapshot(MapEditContext context,
                                       MapViewFrame snapshotFrame,
                                       XyPoint selectLocation)
Subclasses must implement this to modify the currently selected snapshot using the given snapshotFrame (representing the modified version) and then select it at the given selectLocation (representing the place nearest the mouse click that you should reselect the snapshot at).


isMoveSupported

public boolean isMoveSupported(MapEditContext item)
Description copied from interface: MapEditActor
Returns true if moving is supported.

Specified by:
isMoveSupported in interface MapEditActor
Overrides:
isMoveSupported in class AbstractMapEditActor

move

public void move(MapEditContext context)
Description copied from interface: MapEditActor
Performs a move. Throws UnsupportedOperationException if isMoveSupported() is false.

Specified by:
move in interface MapEditActor
Overrides:
move in class AbstractMapEditActor
Parameters:
context - TODO

isRotateSupported

public boolean isRotateSupported(MapEditContext context)
Description copied from interface: MapEditActor
Returns true if rotate is supported.

Specified by:
isRotateSupported in interface MapEditActor
Overrides:
isRotateSupported in class AbstractMapEditActor

rotate

public void rotate(MapEditContext context)
Description copied from interface: MapEditActor
Performs a rotate. Throws UnsupportedOperationException if isRotateSupported() is false.

Specified by:
rotate in interface MapEditActor
Overrides:
rotate in class AbstractMapEditActor
Parameters:
context - TODO

ephemeronFor

public Ephemeron ephemeronFor(MapEditContext context)
Description copied from interface: MapEditActor
Returns an Ephemeron for the given context.

Specified by:
ephemeronFor in interface MapEditActor
Overrides:
ephemeronFor in class AbstractMapEditActor