Class DefaultUserActionManagerCtrl

java.lang.Object
io.keikai.ui.impl.DefaultUserActionManagerCtrl
All Implemented Interfaces:
UserActionManagerCtrl, UserActionManager, Serializable, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.event.SerializableEventListener<org.zkoss.zk.ui.event.Event>
Direct Known Subclasses:
UserActionManagerCtrlImpl

public class DefaultUserActionManagerCtrl extends Object implements UserActionManagerCtrl, UserActionManager
The user action handler which provide default spreadsheet operation handling.
Since:
3.0.0
Author:
dennis
See Also:
  • Field Details

  • Constructor Details

    • DefaultUserActionManagerCtrl

      public DefaultUserActionManagerCtrl()
  • Method Details

    • bind

      public void bind(Spreadsheet sparedsheet)
      Description copied from interface: UserActionManagerCtrl
      Will be called when a handler assign to spreadsheet.
      Specified by:
      bind in interface UserActionManagerCtrl
    • dispatchAuxAction

      protected boolean dispatchAuxAction(UserActionContext ctx)
    • getCtrlKeys

      public String getCtrlKeys()
      Description copied from interface: UserActionManagerCtrl
      Returns the interested ctrlKeys of the spreadsheet
      Specified by:
      getCtrlKeys in interface UserActionManagerCtrl
      Returns:
      ctrlKeys that you want to set to spreadsheet, or null to set nothing to spreadsheet.
      See Also:
    • getAction

      protected String getAction(org.zkoss.zk.ui.event.KeyEvent event)
    • dispatchKeyAction

      protected boolean dispatchKeyAction(UserActionContext ctx)
    • getSupportedUserAction

      public Set<String> getSupportedUserAction(Sheet sheet)
      Description copied from interface: UserActionManagerCtrl
      Returns the supported user action that should be disabled
      Specified by:
      getSupportedUserAction in interface UserActionManagerCtrl
      Parameters:
      sheet - the sheet for cheeking
      Returns:
      a disabled user action array
    • getInterestedEvents

      public Set<String> getInterestedEvents()
      Description copied from interface: UserActionManagerCtrl
      Returns the interested events of the spreadsheet.
      Specified by:
      getInterestedEvents in interface UserActionManagerCtrl
      Returns:
      event name list if you have any interested event of spreadsheet.
      See Also:
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
      Throws:
      Exception
    • updateClipboardEffect

      protected void updateClipboardEffect(Sheet sheet)
    • doAfterLoadBook

      public void doAfterLoadBook(Book book)
      Description copied from interface: UserActionManagerCtrl
      Will be called when a book set to sparedshet
      Specified by:
      doAfterLoadBook in interface UserActionManagerCtrl
      Parameters:
      book - the book to load or null if close a book
    • getClipboard

      protected UserActionContext.Clipboard getClipboard()
    • clearClipboard

      protected void clearClipboard()
    • registerHandler

      public void registerHandler(String category, String action, UserActionHandler handler)
      Description copied from interface: UserActionManager
      Register a handler to the handler list of category/action, append to the last handler of same category/action.
      Specified by:
      registerHandler in interface UserActionManager
      Parameters:
      category - the category of the handler
      action - the action of the handler
      handler - the handler
    • setHandler

      public void setHandler(String category, String action, UserActionHandler handler)
      Description copied from interface: UserActionManager
      set a handler to the handler list of category/action, it will remove all other handlers in same category/action
      Specified by:
      setHandler in interface UserActionManager
      Parameters:
      category - the category of the handler
      action - the action of the handler
      handler - the handler
    • getHandlerList

      protected List<UserActionHandler> getHandlerList(String category, String action)
    • doUndo

      protected boolean doUndo()
    • doRedo

      protected boolean doRedo()
    • clearUndoable

      protected void clearUndoable()