Class AbstractProjectionChangePolicy

  extended by com.bbn.openmap.layer.policy.AbstractProjectionChangePolicy
All Implemented Interfaces:
Direct Known Subclasses:
ListResetPCPolicy, NullProjectionChangePolicy, StandardPCPolicy

public abstract class AbstractProjectionChangePolicy
extends java.lang.Object
implements ProjectionChangePolicy

Implements the common functionality of all projection change policies.


Field Summary
protected  OMGraphicHandlerLayer layer
Constructor Summary
protected AbstractProjectionChangePolicy()
  AbstractProjectionChangePolicy(OMGraphicHandlerLayer omghl)
Method Summary
 OMGraphicHandlerLayer getLayer()
 void setLayer(OMGraphicHandlerLayer omghl)
 void workerComplete(OMGraphicList aList)
          This is a subtle call, that dictates what should happen when the LayerWorker has completed working in it's thread.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.bbn.openmap.layer.policy.ProjectionChangePolicy

Field Detail


protected OMGraphicHandlerLayer layer
Constructor Detail


protected AbstractProjectionChangePolicy()


public AbstractProjectionChangePolicy(OMGraphicHandlerLayer omghl)
Method Detail


public void setLayer(OMGraphicHandlerLayer omghl)
Specified by:
setLayer in interface ProjectionChangePolicy
omghl - the OMGraphicHandlerLayer the policy is working for.


public OMGraphicHandlerLayer getLayer()
Specified by:
getLayer in interface ProjectionChangePolicy
the OMGraphicHandlerLayer the policy is working for.


public void workerComplete(OMGraphicList aList)
This is a subtle call, that dictates what should happen when the LayerWorker has completed working in it's thread. The LayerWorker.get() method returns whatever was returned in the OMGraphicHandler.prepare() method, an OMGraphicList. In most cases, this object should be set as the Layer's list at this time. Some Layers, working asynchronously with their data sources, might want nothing to happen and should use a policy that overrides this method so that nothing does.

Modified as of 5.1.2/5.1 to control when layer.repaint() is called. If the previous OMGraphicList is null, and the current OMGraphicList is also null, then repaint is not called. This is to cut back on a flashing effect when layers that aren't doing anything call for repaints before those that are call for painting.

Specified by:
workerComplete in interface ProjectionChangePolicy
aList - the current OMGraphicList returned from the prepare() method via the SwingWorker thread.

Copyright (C) BBNT Solutions LLC; See for details