de.soldin.jumpcore
Class UndoableSetGeometry

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by de.soldin.jumpcore.UndoableSetGeometry
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, javax.swing.undo.UndoableEdit

public class UndoableSetGeometry
extends javax.swing.undo.AbstractUndoableEdit
implements java.util.Collection

The UndoableSetGeometry is a implementation of a Collection, as well as a AbstractUndoableEdit. The purpose is to have an undoable swing component for modifying geometries.

With these capabilities joined it can act as a container for multiple UndoableSetGeometry objects, which can be executed in a batch and as a single action.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
UndoableSetGeometry(Layer layer, java.lang.String name)
           
UndoableSetGeometry(java.lang.String name)
           
 
Method Summary
 boolean add(java.lang.Object o)
           
 boolean add(UndoableSetGeometry t)
           
 boolean addAll(java.util.Collection c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection c)
           
 void execute()
           
 com.vividsolutions.jts.geom.Geometry getGeom(Feature in_feature)
           
 java.lang.String getName()
           
 java.lang.String getPresentationName()
           
 java.lang.String getRedoPresentationName()
           
 java.lang.String getUndoPresentationName()
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 void redo()
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 void setGeom(Feature feature, com.vividsolutions.jts.geom.Geometry geom)
           
 int size()
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] a)
           
 void undo()
           
 void unexecute()
           
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

UndoableSetGeometry

public UndoableSetGeometry(Layer layer,
                           java.lang.String name)

UndoableSetGeometry

public UndoableSetGeometry(java.lang.String name)
Method Detail

redo

public void redo()
Specified by:
redo in interface javax.swing.undo.UndoableEdit
Overrides:
redo in class javax.swing.undo.AbstractUndoableEdit

undo

public void undo()
Specified by:
undo in interface javax.swing.undo.UndoableEdit
Overrides:
undo in class javax.swing.undo.AbstractUndoableEdit

getPresentationName

public java.lang.String getPresentationName()
Specified by:
getPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getPresentationName in class javax.swing.undo.AbstractUndoableEdit

getUndoPresentationName

public java.lang.String getUndoPresentationName()
Specified by:
getUndoPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getUndoPresentationName in class javax.swing.undo.AbstractUndoableEdit

getRedoPresentationName

public java.lang.String getRedoPresentationName()
Specified by:
getRedoPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getRedoPresentationName in class javax.swing.undo.AbstractUndoableEdit

execute

public void execute()

unexecute

public void unexecute()

getName

public java.lang.String getName()

setGeom

public void setGeom(Feature feature,
                    com.vividsolutions.jts.geom.Geometry geom)

getGeom

public com.vividsolutions.jts.geom.Geometry getGeom(Feature in_feature)

add

public boolean add(UndoableSetGeometry t)

size

public int size()
Specified by:
size in interface java.util.Collection

clear

public void clear()
Specified by:
clear in interface java.util.Collection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection

addAll

public boolean addAll(java.util.Collection c)
Specified by:
addAll in interface java.util.Collection

containsAll

public boolean containsAll(java.util.Collection c)
Specified by:
containsAll in interface java.util.Collection

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.Collection

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.Collection

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
Specified by:
toArray in interface java.util.Collection