|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.freehep.util.commanddispatcher.CommandSourceAdapter
public class CommandSourceAdapter
A class which implements CommandSource and can be used to associate any AbstractButton with a command
| Constructor Summary | |
|---|---|
CommandSourceAdapter(AbstractButton button)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent evt)
|
void |
clearTarget()
Clears the CommandTarget associated with the CommandSource |
String |
getCommand()
Returns the command associated with the CommandSource |
CommandTarget |
getTarget()
Returns the current CommandTarget, or null of there isnt a current command target |
void |
setEnabled(boolean state)
|
void |
setSelected(boolean selected)
|
boolean |
setTarget(CommandTarget target)
Sets a CommandTarget associated with the CommandSource |
void |
setText(String text)
|
void |
setToolTipText(String text)
|
void |
update(Observable o,
Object arg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandSourceAdapter(AbstractButton button)
| Method Detail |
|---|
public String getCommand()
CommandSource
getCommand in interface CommandSourcepublic void setEnabled(boolean state)
setEnabled in interface CommandStatepublic void setSelected(boolean selected)
setSelected in interface BooleanCommandStatepublic boolean setTarget(CommandTarget target)
CommandSource
setTarget in interface CommandSourcepublic CommandTarget getTarget()
CommandSource
getTarget in interface CommandSourcepublic void setText(String text)
setText in interface CommandStatepublic void setToolTipText(String text)
setToolTipText in interface CommandStatepublic void actionPerformed(ActionEvent evt)
actionPerformed in interface ActionListenerpublic void clearTarget()
CommandSource
clearTarget in interface CommandSource
public void update(Observable o,
Object arg)
update in interface Observer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||