public class AstFigureStore extends DrawFigureStore
DrawFigureStore that adds functionality to store and
restore the current AST context along with the properties of a set of
figures. This is intended to make it possible to save figures and restore
them using world coordinates, not just graphics coordinates (so that
figures can be redrawn at the same wavelength, time, celestial coordinates
etc.).| Modifier and Type | Field and Description |
|---|---|
static String |
PLOT_TAG
Name of the tag used for the Plot serialisation
|
protected AstPlotSource |
plotSource
Source of the AST Plot currently being used to map from world
to graphics coordinates
|
drawActions, figureFactory| Constructor and Description |
|---|
AstFigureStore(AstPlotSource plotSource,
String application,
String storeFile,
String tagName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Plot |
restorePlot(Element rootElement) |
void |
restoreState(Element rootElement)
Restore a previous saved state to the
DrawActions
object. |
protected void |
savePlot(Element rootElement) |
void |
saveState(Element rootElement)
Save all the figures currently held by the
DrawActions to the
given root element. |
activate, getApplicationName, getStoreName, getTagName, setDrawActionsprotected AstPlotSource plotSource
public static final String PLOT_TAG
public AstFigureStore(AstPlotSource plotSource, String application, String storeFile, String tagName)
plotSource - the source of the Plot currently
being used to map world coordinates to
graphics coordinates. It is expected that the
Plot will be re-created so access
needs to be provided in this form.application - the name of the application directory used for
backing store files (created in "home" directory).storeFile - file used for storing figures (in application specific
directory).tagName - the name of the tag (root element) that contains figures
that can be restored by this object.public void saveState(Element rootElement)
DrawFigureStoreDrawActions to the
given root element.saveState in interface StoreSourcesaveState in class DrawFigureStorepublic void restoreState(Element rootElement)
DrawFigureStoreDrawActions
object. These are then repainted by any GraphicsPanes that are
associated with the DrawActions instance.restoreState in interface StoreSourcerestoreState in class DrawFigureStoreprotected void savePlot(Element rootElement)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.