FreeHEP API
Version current

org.freehep.util.commanddispatcher
Interface CommandSource

All Known Implementing Classes:
CommandSourceAdapter

public interface CommandSource

A CommandSource represents a source of a command, such as a MenuItem or Toolbar Button. A CommandSource may have a CommandTarget associated with it. The CommandTarget represents the command that will be fired when the CommandSource is activated. Typically a CommandTargetManager is responsible for setting the CommandTarget. The CommandSource will typically be dimmed out if either there is no CommandTarget associated with it, or if the CommandTarget is not enabled.

Version:
$Id:
Author:
Tony Johnson (tonyj@slac.stanford.edu)
Source Code:
CommandSource.java

Method Summary
 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
 boolean setTarget(CommandTarget target)
          Sets a CommandTarget associated with the CommandSource
 

Method Detail

getCommand

public String getCommand()
Returns the command associated with the CommandSource


setTarget

public boolean setTarget(CommandTarget target)
Sets a CommandTarget associated with the CommandSource


getTarget

public CommandTarget getTarget()
Returns the current CommandTarget, or null of there isnt a current command target


clearTarget

public void clearTarget()
Clears the CommandTarget associated with the CommandSource


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.