public class DefaultUserActionManagerCtrl extends Object implements UserActionManagerCtrl, UserActionManager
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultUserActionManagerCtrl.Category |
static class |
DefaultUserActionManagerCtrl.ClipboardImpl
Clipboard data object for copy/paste, internal use only
|
static class |
DefaultUserActionManagerCtrl.UserActionContextImpl
internal use only
|
| Modifier and Type | Field and Description |
|---|---|
protected static char |
SPLIT_CHAR |
| Constructor and Description |
|---|
DefaultUserActionManagerCtrl() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Spreadsheet sparedsheet)
Will be called when a handler assign to spreadsheet.
|
protected void |
clearClipboard() |
protected void |
clearUndoable() |
protected boolean |
dispatchAuxAction(UserActionContext ctx) |
protected boolean |
dispatchKeyAction(UserActionContext ctx) |
void |
doAfterLoadBook(Book book)
Will be called when a book set to sparedshet
|
protected boolean |
doRedo() |
protected boolean |
doUndo() |
protected String |
getAction(org.zkoss.zk.ui.event.KeyEvent event) |
protected UserActionContext.Clipboard |
getClipboard() |
String |
getCtrlKeys()
Returns the interested ctrlKeys of the spreadsheet
|
protected List<UserActionHandler> |
getHandlerList(String category,
String action) |
Set<String> |
getInterestedEvents()
Returns the interested events of the spreadsheet.
|
Set<String> |
getSupportedUserAction(Sheet sheet)
Returns the supported user action that should be disabled
|
void |
onEvent(org.zkoss.zk.ui.event.Event event) |
void |
registerHandler(String category,
String action,
UserActionHandler handler)
Register a handler to the handler list of category/action, append to the last handler of same category/action.
|
void |
setHandler(String category,
String action,
UserActionHandler handler)
set a handler to the handler list of category/action, it will remove all other handlers in same category/action
|
protected void |
updateClipboardEffect(Sheet sheet) |
protected static final char SPLIT_CHAR
public void bind(Spreadsheet sparedsheet)
UserActionManagerCtrlbind in interface UserActionManagerCtrlprotected boolean dispatchAuxAction(UserActionContext ctx)
public String getCtrlKeys()
UserActionManagerCtrlgetCtrlKeys in interface UserActionManagerCtrlSpreadsheet.setCtrlKeys(String)protected String getAction(org.zkoss.zk.ui.event.KeyEvent event)
protected boolean dispatchKeyAction(UserActionContext ctx)
public Set<String> getSupportedUserAction(Sheet sheet)
UserActionManagerCtrlgetSupportedUserAction in interface UserActionManagerCtrlsheet - the sheet for cheekingpublic Set<String> getInterestedEvents()
UserActionManagerCtrlgetInterestedEvents in interface UserActionManagerCtrlEventspublic void onEvent(org.zkoss.zk.ui.event.Event event)
throws Exception
onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>Exceptionprotected void updateClipboardEffect(Sheet sheet)
public void doAfterLoadBook(Book book)
UserActionManagerCtrldoAfterLoadBook in interface UserActionManagerCtrlbook - the book to load or null if close a bookprotected UserActionContext.Clipboard getClipboard()
protected void clearClipboard()
public void registerHandler(String category, String action, UserActionHandler handler)
UserActionManagerregisterHandler in interface UserActionManagercategory - the category of the handleraction - the action of the handlerhandler - the handlerpublic void setHandler(String category, String action, UserActionHandler handler)
UserActionManagersetHandler in interface UserActionManagercategory - the category of the handleraction - the action of the handlerhandler - the handlerprotected List<UserActionHandler> getHandlerList(String category, String action)
protected boolean doUndo()
protected boolean doRedo()
protected void clearUndoable()
Copyright © 2020. All rights reserved.