|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
ch.elexis.actions.RestrictedAction
public abstract class RestrictedAction
Special class for actiosn requiring special access rights. The run() method of this class checks the required access rights and runs doRun() if access is granted. Classes extending this class must implement the method doRun() instead of run(). Users of this class may register a listener to get informed about missing rights during execution of the action. (Usually, this is not required, because the action is disabled if the user has not the required rights. See setEnabled())
Nested Class Summary | |
---|---|
static class |
RestrictedAction.RestrictionEvent
Event containing the required right. |
static interface |
RestrictedAction.RestrictionListener
Users of this class can register a RestrictionListener to get informed about missing rights during execution of the action. |
Field Summary | |
---|---|
protected ACE |
necessaryRight
|
Fields inherited from interface org.eclipse.jface.action.IAction |
---|
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT |
Constructor Summary | |
---|---|
RestrictedAction(ACE necessaryRight)
|
|
RestrictedAction(ACE necessaryRight,
java.lang.String text)
|
|
RestrictedAction(ACE necessaryRight,
java.lang.String text,
int style)
|
Method Summary | |
---|---|
void |
addRestrictionListener(RestrictedAction.RestrictionListener listener)
Register a listener to get informed about missing rights. |
void |
disableAutoAdapt()
Remove this RestrcitedAction from the AutoAdapt queue |
abstract void |
doRun()
Called by RestrictedAction.run() after access rights check. |
void |
enableAutoAdapt()
If AutoAdapt is enabled, the Action will reflect is visual representation according to the current user's rights automatically. |
void |
reflectRight()
Sets the enabled status of this action according to the required right. |
void |
removeRestrictionListener(RestrictedAction.RestrictionListener listener)
Remove a previously registered listener. |
void |
run()
Checks the required access rights and then calls doRun(). |
Methods inherited from class org.eclipse.jface.action.Action |
---|
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
Methods inherited from class org.eclipse.jface.action.AbstractAction |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.action.IAction |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
protected ACE necessaryRight
Constructor Detail |
---|
public RestrictedAction(ACE necessaryRight)
public RestrictedAction(ACE necessaryRight, java.lang.String text, int style)
public RestrictedAction(ACE necessaryRight, java.lang.String text)
Method Detail |
---|
public void enableAutoAdapt()
public void disableAutoAdapt()
public void reflectRight()
public void run()
run
in interface org.eclipse.jface.action.IAction
run
in class org.eclipse.jface.action.Action
public abstract void doRun()
public void addRestrictionListener(RestrictedAction.RestrictionListener listener)
listener
- the listener to register.public void removeRestrictionListener(RestrictedAction.RestrictionListener listener)
listener
- the listener to remove.
|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |