Back to index

wims  3.65+svn20090927
Public Member Functions | Private Attributes
fr.ove.openmath.jome.ctrlview.bidim.selection.SelectionManager Class Reference

This class manages a list of selected elements. More...

Inheritance diagram for fr.ove.openmath.jome.ctrlview.bidim.selection.SelectionManager:
Inheritance graph
[legend]
Collaboration diagram for fr.ove.openmath.jome.ctrlview.bidim.selection.SelectionManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SelectionManager ()
 The constructor.
void consumeSelectionEvent (SelectionEvent selectionEvent)
 Consumes (i.e.

Private Attributes

Vector selected
 The list of selected elements.

Detailed Description

This class manages a list of selected elements.

Author:
1998 DIRAT Laurent
Version:
1.0 30/06/98

Definition at line 44 of file SelectionManager.java.


Constructor & Destructor Documentation

The constructor.

Definition at line 53 of file SelectionManager.java.

                              {
        selected = new Vector();
    }

Member Function Documentation

Consumes (i.e.

treats) the event received.

Parameters:
selectionEventthe event to consume.

Implements fr.ove.openmath.jome.ctrlview.bidim.selection.events.SelectionEventListener.

Definition at line 61 of file SelectionManager.java.

                                                                     {
        switch (selectionEvent.getAction()) {
            case SelectionEvent.PURGE :
                selected.setSize(0);
                selected.trimToSize();
                break;
            case SelectionEvent.REMOVE :
                selected.removeElement(selectionEvent.getArgument());
                break;
            case SelectionEvent.ADD :
                selected.addElement(selectionEvent.getArgument());
                break;
            case SelectionEvent.GET_SELECTION_SIZE :
                selectionEvent.setArgument(new Integer(selected.size()));
                break;
            case SelectionEvent.GET_SELECTION :
                selectionEvent.setArgument(selected.clone());
                break;
            case SelectionEvent.LIST :
            // For debugg only !!!
                System.out.println(" I've got "+ selected.size() + " selected elements");
                for (Enumeration e = selected.elements(); e.hasMoreElements(); )
                    ((Display) e.nextElement()).whoAmI();
                break;
        }
    }

Here is the call graph for this function:


Member Data Documentation

The list of selected elements.

Definition at line 48 of file SelectionManager.java.


The documentation for this class was generated from the following file: