uk.ac.starlink.diva
Class DrawFigureStore

java.lang.Object
  extended by uk.ac.starlink.diva.DrawFigureStore
All Implemented Interfaces:
FigureStore, StoreSource
Direct Known Subclasses:
AstFigureStore

public class DrawFigureStore
extends Object
implements FigureStore, StoreSource

Implementation of a StoreSource as a FigureStore to save and restore figures from an application specific backing store file using a StoreControlFrame.

Version:
$Id$
Author:
Peter W. Draper

Field Summary
protected  DrawActions drawActions
          The object that controls the graphical figures.
protected  DrawFigureFactory figureFactory
          Factory for creating figures.
 
Constructor Summary
DrawFigureStore(String application, String storeFile, String tagName)
          Create an instance.
 
Method Summary
 void activate()
          Make the store control UI active
 String getApplicationName()
          Return the application name associated with this store
 String getStoreName()
          Return the file store name associated with this store
 String getTagName()
          Return the root element tag associated with this store
 void restoreState(Element rootElement)
          Restore a previous saved state to the DrawActions object.
 void saveState(Element rootElement)
          Save all the figures currently held by the DrawActions to the given root element.
 void setDrawActions(DrawActions drawActions)
          Set the instance of DrawActions to use with this store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

drawActions

protected DrawActions drawActions
The object that controls the graphical figures.


figureFactory

protected DrawFigureFactory figureFactory
Factory for creating figures.

Constructor Detail

DrawFigureStore

public DrawFigureStore(String application,
                       String storeFile,
                       String tagName)
Create an instance.

Method Detail

saveState

public void saveState(Element rootElement)
Save all the figures currently held by the DrawActions to the given root element.

Specified by:
saveState in interface StoreSource

restoreState

public void restoreState(Element rootElement)
Restore a previous saved state to the DrawActions object. These are then repainted by any GraphicsPanes that are associated with the DrawActions instance.

Specified by:
restoreState in interface StoreSource

getApplicationName

public String getApplicationName()
Return the application name associated with this store

Specified by:
getApplicationName in interface StoreSource

getStoreName

public String getStoreName()
Return the file store name associated with this store

Specified by:
getStoreName in interface StoreSource

getTagName

public String getTagName()
Return the root element tag associated with this store

Specified by:
getTagName in interface StoreSource

setDrawActions

public void setDrawActions(DrawActions drawActions)
Set the instance of DrawActions to use with this store

Specified by:
setDrawActions in interface FigureStore

activate

public void activate()
Make the store control UI active

Specified by:
activate in interface FigureStore


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.