hades.utils
Class GraphicalSelection

java.lang.Object
  extended byhades.utils.GraphicalSelection

public class GraphicalSelection
extends java.lang.Object

keep track of selected objects.

GraphicalSelection: a class to manage object selection in the HADES editor. At the moment, this class uses a Hashtable to store the selected objects. Except for the selectToggle() and print() methods it provides little additional value.

To get a reference to the current Editor selection, use the getSelection() method in class hades.gui.Editor.


Constructor Summary
GraphicalSelection()
          create a new and initially empty GraphicalSelection.
 
Method Summary
 void deselect(java.lang.Object o)
          deselect Object o.
 void deselectAll()
          deselect all objects.
 java.util.Enumeration elements()
          return an Enumeration of all objects in this GraphicalSelection.
 java.lang.String print()
          return a String with all currently selected objects.
 void select(java.lang.Object o)
          add an object to this GraphicalSelection.
 boolean selectToggle(java.lang.Object o)
          Add an object to this GraphicalSelection.
 java.lang.String toString()
          the usual info method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphicalSelection

public GraphicalSelection()
create a new and initially empty GraphicalSelection.

Method Detail

select

public void select(java.lang.Object o)
add an object to this GraphicalSelection.


selectToggle

public boolean selectToggle(java.lang.Object o)
Add an object to this GraphicalSelection. However, if the object already was in this GraphicalSelection, it is removed again. This method returns whether the object is selected or not.


deselect

public void deselect(java.lang.Object o)
deselect Object o.


deselectAll

public void deselectAll()
deselect all objects.


elements

public java.util.Enumeration elements()
return an Enumeration of all objects in this GraphicalSelection.


print

public java.lang.String print()
return a String with all currently selected objects.


toString

public java.lang.String toString()
the usual info method. We also print the number of currently selected objects.