Back to index

moin  1.9.0~rc2
Public Member Functions | Private Attributes
CH.ifa.draw.util.CommandChoice Class Reference

A Command enabled choice. More...

Inheritance diagram for CH.ifa.draw.util.CommandChoice:
Inheritance graph
[legend]
Collaboration diagram for CH.ifa.draw.util.CommandChoice:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CommandChoice ()
synchronized void addItem (Command command)
 Adds a command to the menu.
void itemStateChanged (ItemEvent e)
 Executes the command.

Private Attributes

Vector fCommands

Detailed Description

A Command enabled choice.

Selecting a choice executes the corresponding command.

See also:
Command

Definition at line 21 of file CommandChoice.java.


Constructor & Destructor Documentation

Definition at line 26 of file CommandChoice.java.

                           {
        fCommands = new Vector(10);
        addItemListener(this);
    }

Member Function Documentation

synchronized void CH.ifa.draw.util.CommandChoice.addItem ( Command  command) [inline]

Adds a command to the menu.

Definition at line 34 of file CommandChoice.java.

                                                      {
        addItem(command.name());
        fCommands.addElement(command);
    }

Here is the call graph for this function:

void CH.ifa.draw.util.CommandChoice.itemStateChanged ( ItemEvent  e) [inline]

Executes the command.

Definition at line 42 of file CommandChoice.java.

                                              {
        Command command = (Command)fCommands.elementAt(getSelectedIndex());
        command.execute();
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 24 of file CommandChoice.java.


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