Class EditState

java.lang.Object
  |
  +--EditState
All Implemented Interfaces:
java.io.Serializable

public class EditState
extends java.lang.Object
implements java.io.Serializable

Each editstate records the state of an open editor window. Used to reopen windows as they were when the file was last closed.

See Also:
Serialized Form

Field Summary
(package private)  java.awt.Rectangle bounds
          The position of the editor on the desktop.
(package private)  boolean closed
          True if editor was closed.
(package private)  int layer
          The layer of the editor.
(package private)  boolean maximized
          True if editor ws maximized
(package private)  boolean minimized
          True if editor ws minimized
(package private)  double rotation
          The rotation of the editor.
(package private)  double scale
          The current scale setting.
private static long serialVersionUID
           
(package private)  Editable target
          What is being edited.
(package private)  java.awt.Point view
          The position of the scrollpane of this editor
 
Constructor Summary
EditState(EditFrame frame)
          Build an EditState recording the state of an editor.
 
Method Summary
 void restore(CartoFrame frame)
          Restore the state of our editor.
static void restoreAll(EditState[] edits, CartoFrame frame)
          Restore all the edits in the frame
(package private) static EditState[] saveEditors(javax.swing.JDesktopPane pane)
          Record the states of all editors on a dektop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

closed

boolean closed
True if editor was closed. Closed windows should be removed from the desktop, so this shouldn't happen. If it does, nothing is recorded


maximized

boolean maximized
True if editor ws maximized


minimized

boolean minimized
True if editor ws minimized


layer

int layer
The layer of the editor. Saving this may help put the right window on top.


bounds

java.awt.Rectangle bounds
The position of the editor on the desktop.


target

Editable target
What is being edited. A segment of composite


scale

double scale
The current scale setting.


rotation

double rotation
The rotation of the editor. Undefined for segments.


view

java.awt.Point view
The position of the scrollpane of this editor

Constructor Detail

EditState

public EditState(EditFrame frame)
Build an EditState recording the state of an editor.

Method Detail

saveEditors

static EditState[] saveEditors(javax.swing.JDesktopPane pane)
Record the states of all editors on a dektop.


restore

public void restore(CartoFrame frame)
Restore the state of our editor. Add it to the CartoFrame. and set it to be the way it was when last saved.


restoreAll

public static void restoreAll(EditState[] edits,
                              CartoFrame frame)
Restore all the edits in the frame