|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.edu.swin.synergy.kernel.BPlugin | +--au.edu.swin.synergy.plugin.editmanager.BEditManager
The edit manager is responsible for dispatching cut, copy, paste and undo events to the component with the current focus. It is the responsibility of the current component to deal with these events as they see fit. This will provide backward compatability with the existing swing classes which handle control-c, x, p and z already.
Inner Class Summary | |
class |
BEditManager.BActionListener
This will handle program flow for the menu items |
Fields inherited from class au.edu.swin.synergy.kernel.BPlugin |
kernel |
Constructor Summary | |
BEditManager()
|
Method Summary | |
protected void |
dispatchEvent(JComponent focusedComponent,
int keyCode,
int modifierMask)
This will dispatch the appropriate key event to the currently focussed component. |
protected void |
doDialect()
This will set the text of the menus to the correct values for the current Locale |
protected void |
doUndoRedo(boolean undo)
This will be called when the user selects undo or redo from the menu or presses the appropriate hot keys. |
protected void |
doUndoRegistration(BRegisterUndoCE registerCE)
This will create an undo listener for the source of the event and return the listener in the event itself. |
void |
editOccured(BUndoManager undoManager)
When called, this will update the undo and redo menu items appropriate if the undo manager in which the edit occured is also the current edit manager. |
BStringList |
getDependancies()
Return a list of plugin dependancies |
void |
onBCommandEvent(Object source,
BCommandEvent event)
This is where all events are received through. |
void |
relinquishUndoManager(BUndoManager undoManager)
This will remove the current undo manager if it is this one |
protected void |
setCutCopyEnabled(boolean enabled)
Sets the enabled state of the cut and copy menu items to the state specified. |
protected void |
setPasteEnabled(boolean enabled)
Sets the enabled state of the paste menu items to the state specified. |
protected void |
setUndoItems()
This will set the appropriate text and enabled states on the undo and redo menu items as per the current undo manager. |
protected void |
setUndoManager(BUndoManager undoManager)
This will change the current undo manager to the one specified |
void |
setup(BStringList params)
This is called when the plugin is first loaded. |
protected void |
unregisterUndoManager(Object source)
This will remove the undo manager mapped to the given source |
Methods inherited from class au.edu.swin.synergy.kernel.BPlugin |
dispatchEvent,
dispatchEventAndWait,
dispatchEventServer,
dispatchEventServerAndWait,
dispatchEventTo,
dispatchEventToAndWait,
getKernel,
setKernel,
setup,
unload |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public BEditManager()
Method Detail |
public void onBCommandEvent(Object source, BCommandEvent event)
protected void doUndoRegistration(BRegisterUndoCE registerCE)
protected void unregisterUndoManager(Object source)
source
- The source of the undo managerpublic void editOccured(BUndoManager undoManager)
undoManager
- The undo manager that was updatedprotected void setUndoManager(BUndoManager undoManager)
undoManager
- The manager to make currentpublic void relinquishUndoManager(BUndoManager undoManager)
protected void setUndoItems()
protected void setPasteEnabled(boolean enabled)
enabled
- True to enable, false to disableprotected void setCutCopyEnabled(boolean enabled)
enabled
- True to enable, false to disablepublic void setup(BStringList params)
params
- The paramaters supplied by the configuration filepublic BStringList getDependancies()
protected void doDialect()
protected void dispatchEvent(JComponent focusedComponent, int keyCode, int modifierMask)
keyCode
- The key code to sendprotected void doUndoRedo(boolean undo)
undo
- True to undo, false to redo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |