Class InstantiatorConfigPage.TreeNodeInsertionSelectionAdapter

  • All Implemented Interfaces:
    java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener
    Enclosing class:
    InstantiatorConfigPage

    private abstract class InstantiatorConfigPage.TreeNodeInsertionSelectionAdapter
    extends org.eclipse.swt.events.SelectionAdapter
    A selection adapter checking for supported insertion first.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • TreeNodeInsertionSelectionAdapter

        private TreeNodeInsertionSelectionAdapter​(TreeNode.Insertable insertable)
        Creates the selection adapter.
        Parameters:
        insertable - the intended insertable
    • Method Detail

      • widgetSelected

        public void widgetSelected​(org.eclipse.swt.events.SelectionEvent evt)
        Specified by:
        widgetSelected in interface org.eclipse.swt.events.SelectionListener
        Overrides:
        widgetSelected in class org.eclipse.swt.events.SelectionAdapter
      • insert

        protected abstract void insert​(TreeNode selected)
        Is called if the insertion shall happen.
        Parameters:
        selected - the selected node
      • getSupportedInsertionPoint

        protected TreeNode.InsertionPoint getSupportedInsertionPoint​(TreeNode selected)
        Returns the supported insertion point for the given selected node.
        Parameters:
        selected - the selected node
        Returns:
        the insertion point