Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.layer.policy
Class ListResetPCPolicy

    java.lang.Object
      com.bbn.openmap.layer.policy.ListResetPCPolicy

All Implemented Interfaces:
  ProjectionChangePolicy

public class ListResetPCPolicy
extends java.lang.Object
implements ProjectionChangePolicy

ProjectionChangePolicy that uses a Layer SwingWorker to kick off a thread to call layer.prepare() and deletes the current OMGraphicList between projection changes. The standard behavior for layers that gather new OMGraphics for new projections.

Field Summary
`protected OMGraphicHandlerLayer` | `layer` Don't let this be null.

Constructor Summary
`ListResetPCPolicy()` You MUST set a layer at some point.
`ListResetPCPolicy(OMGraphicHandlerLayer layer)` Don't pass in a null layer.

Method Summary
`OMGraphicHandlerLayer` | `getLayer()` Get the OMGraphicHandlerLayer to work with.
`void` | `projectionChanged(ProjectionEvent pe)` The method that is called when the projection changes.
`void` | `setLayer(OMGraphicHandlerLayer l)` Set the OMGraphicHandlerLayer to work with.
`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`

Field Detail

### layer

    protected OMGraphicHandlerLayer layer

  Don't let this be null.

Constructor Detail

### ListResetPCPolicy

    public ListResetPCPolicy()

  You MUST set a layer at some point.

### ListResetPCPolicy

    public ListResetPCPolicy(OMGraphicHandlerLayer layer)

  Don't pass in a null layer.

Method Detail

### setLayer

    public void setLayer(OMGraphicHandlerLayer l)

  Description copied from interface: `ProjectionChangePolicy`
  Set the OMGraphicHandlerLayer to work with.

  Specified by:
    `setLayer` in interface `ProjectionChangePolicy`

### getLayer

    public OMGraphicHandlerLayer getLayer()

  Description copied from interface: `ProjectionChangePolicy`
  Get the OMGraphicHandlerLayer to work with.

  Specified by:
    `getLayer` in interface `ProjectionChangePolicy`

### projectionChanged

    public void projectionChanged(ProjectionEvent pe)

  Description copied from interface: `ProjectionChangePolicy`
  The method that is called when the projection changes. The ProjectionChangePolicy should modify the OMGraphicList and do other functions as dictated by the policy, like starting threads to gather data and generating new OMGraphics for the layer.

  Specified by:
    `projectionChanged` in interface `ProjectionChangePolicy`

### workerComplete

    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.

  Specified by:
    `workerComplete` in interface `ProjectionChangePolicy`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details