|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swt.repository.ActionSwtRepositoryItem.ClickActionProvider
This class allows, by mean of inheritance, to customize the application
behaviour when a left or right mouse click is performed upon repository
items. By default right clicking over a repository item has the same effect
as left clicking on it, but sub-classes simply need to override the
method in order, for instance, to display a context menu instead.
rightClicked(ActionSwtRepositoryItem, MouseEvent)
| Constructor Summary | |
ActionSwtRepositoryItem.ClickActionProvider()
Default constructor. |
|
| Method Summary | |
boolean |
actionEnabled(ActionSwtRepositoryItem item)
Returns true if the Command associated
to item is enabled, false otherwise.
|
void |
leftClicked(ActionSwtRepositoryItem item,
org.eclipse.swt.events.MouseEvent e)
Called when a mouse left click has been performed on the repository item associated to item.
|
void |
rightClicked(ActionSwtRepositoryItem item,
org.eclipse.swt.events.MouseEvent e)
Called when a mouse right click has been performed on the repository item associated to item.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ActionSwtRepositoryItem.ClickActionProvider()
Default constructor.
| Method Detail |
public void leftClicked(ActionSwtRepositoryItem item,
org.eclipse.swt.events.MouseEvent e)
item.
By default, forwards its call to ActionSwtRepositoryItem.performAction().
item - the ActionSwtRepositoryItem reacting on the
passed MouseEvente - the left click MouseEvent which has to be
processed.
public void rightClicked(ActionSwtRepositoryItem item,
org.eclipse.swt.events.MouseEvent e)
item.
By default, forwards its call to ActionSwtRepositoryItem.invokeLeftClickAction(MouseEvent).
item - the ActionSwtRepositoryItem reacting on the
passed MouseEvente - the right click MouseEvent which has to be
processed.public boolean actionEnabled(ActionSwtRepositoryItem item)
true if the Command associated
to item is enabled, false otherwise.
Subclasses can override this to disable item according
to the state of the application, document, etc.
item - the ActionSwtRepositoryItem associated with
this ClickActionProvider
true if the Command associated
to item is enabled, false
otherwise
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||