Class CommonEditActionHandler<T extends java.awt.Component>

    • Constructor Detail

      • CommonEditActionHandler

        public CommonEditActionHandler​(T component)
                                throws java.lang.NullPointerException
        Constructor for injecting the Component extension
        Parameters:
        component - The Component extension to inject
        Throws:
        java.lang.NullPointerException - if the component is null
    • Method Detail

      • getComponent

        public T getComponent()
        Getter for the Component extension which was injected during construction
        Returns:
        The Component extension which was injected during construction
      • canDelete

        public boolean canDelete()
        Description copied from interface: EditActionHandler
        Can this edit action handler handle the delete action, given its current selection? Note that if this and EditActionHandler.canCopy() both return true, the cut action will also be enabled.
      • canCopy

        public boolean canCopy()
        Description copied from interface: EditActionHandler
        Can this edit action handler handle the copy action, given its current selection? Note that if this and EditActionHandler.canDelete() both return true, the cut action will also be enabled.
      • canPaste

        public boolean canPaste​(java.awt.datatransfer.Clipboard clipboard)
        Description copied from interface: EditActionHandler
        Can this action handler handle a paste given the data flavors currently available in the clipboard?
      • doCut

        public java.awt.datatransfer.Transferable doCut()
        Description copied from interface: EditActionHandler
        Called when the cut action is performed.
        Returns:
        the current selection as a Transferable, or null if the cut failed. Will be added to the system clipboard.