Class SelectPropDialog

java.lang.Object
org.eclipse.swt.widgets.Dialog
com.iizigo.prop.editor.dialog.SelectPropDialog
All Implemented Interfaces:
EventListener, IDoubleClickListener, ISelectionChangedListener, ModifyListener

public class SelectPropDialog extends Dialog implements ISelectionChangedListener, ModifyListener, IDoubleClickListener
Dialog used to display Extends Name selection.
Author:
Christopher Mindus
  • Constructor Details

    • SelectPropDialog

      public SelectPropDialog(Shell parent, String dialogTitle, Image dialogImage, ModuleModel model, Object root, ViewerFilter viewerFilter, Class<?>[] possibleClasses, String currentRef, int expandLevel)
      Create the dialog.
      Parameters:
      parent - The parent shell.
      dialogTitle - The dialog window title; it is also the key under which the window position and size are remembered.
      dialogImage - The image shown in the dialog's title bar.
      model - The module model that references are resolved against, and whose project references narrow a SelectPropViewerFilter. It must not be null when currentRef names a property.
      root - The object to show as the root of the tree, or null for the workspace root.
      viewerFilter - Filter restricting what the tree shows, or null for no filter.
      possibleClasses - The classes a referenced property must be an instance of for the reference to be accepted; an empty array accepts nothing.
      currentRef - The reference to preselect in the tree, or to place in the text field when it does not resolve, or null for none.
      expandLevel - Number of tree levels to expand initially.
    • SelectPropDialog

      public SelectPropDialog(Shell parent, String dialogTitle, Image dialogImage, ModuleModel model, Object root, ViewerFilter viewerFilter, Class<?>[] possibleClasses, String currentRef, int expandLevel, IExpandFilter expandFilter)
      Create the dialog.
      Parameters:
      parent - The parent shell.
      dialogTitle - The dialog window title; it is also the key under which the window position and size are remembered.
      dialogImage - The image shown in the dialog's title bar.
      model - The module model that references are resolved against, and whose project references narrow a SelectPropViewerFilter. It must not be null when currentRef names a property.
      root - The object to show as the root of the tree, or null for the workspace root.
      viewerFilter - Filter restricting what the tree shows, or null for no filter.
      possibleClasses - The classes a referenced property must be an instance of for the reference to be accepted; an empty array accepts nothing.
      currentRef - The reference to preselect in the tree, or to place in the text field when it does not resolve, or null for none.
      expandLevel - Number of tree levels to expand initially.
      expandFilter - Filter consulted for every expanded DesignerProp node, collapsing the ones it rejects, or null to leave the initial expansion alone.
  • Method Details

    • forNoReferenceSelectAndExpand

      public void forNoReferenceSelectAndExpand(Object object, int expansionLevel)
      If no reference is defined, try selecting this object if possible instead, with another expansion level.
    • open

      public String open()
      Open the dialog.
      Returns:
      The selected reference, or null if the dialog was cancelled.
    • selectionChanged

      public void selectionChanged(SelectionChangedEvent event)
      Selection changes.
      Specified by:
      selectionChanged in interface ISelectionChangedListener
      Parameters:
      event - The selection event.
    • modifyText

      public void modifyText(ModifyEvent e)
      Entry field modification.
      Specified by:
      modifyText in interface ModifyListener
      Parameters:
      e - The modification event.
    • doubleClick

      public void doubleClick(DoubleClickEvent event)
      Double-click.
      Specified by:
      doubleClick in interface IDoubleClickListener