Class SelectCNDialog

java.lang.Object
org.eclipse.swt.widgets.Dialog
com.iizigo.prop.editor.dialog.SelectCNDialog

public class SelectCNDialog extends Dialog
Dialog used to display an Object in a tree.
Author:
Christopher Mindus
  • Constructor Details

    • SelectCNDialog

      public SelectCNDialog(Shell parent, String dialogTitle, Image dialogImage, Object root, ViewerFilter viewerFilter, Object currentObject, int expandLevel, IExpandFilterObject expandFilter, IValidateSelection acceptor, TreeItemNavigatorPresentation currentClass)
      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.
      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.
      currentObject - The object to select initially, or null for none; it is only selected if acceptor accepts it, and it is cleared again before the dialog opens so that a cancelled dialog returns null.
      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.
      acceptor - Decides which selected objects are acceptable; it enables and disables the OK button. Must not be null.
      currentClass - Tree item to select once the dialog is built, overriding any initial selection, or null for none.
  • Method Details

    • open

      public Object open()
      Open the dialog.
      Returns:
      The selected object, or null if the dialog was cancelled or nothing was selected.