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 Summary
ConstructorsConstructorDescriptionSelectPropDialog(Shell parent, String dialogTitle, Image dialogImage, ModuleModel model, Object root, ViewerFilter viewerFilter, Class<?>[] possibleClasses, String currentRef, int expandLevel) Create the dialog.SelectPropDialog(Shell parent, String dialogTitle, Image dialogImage, ModuleModel model, Object root, ViewerFilter viewerFilter, Class<?>[] possibleClasses, String currentRef, int expandLevel, IExpandFilter expandFilter) Create the dialog.Method Summary
Modifier and TypeMethodDescriptionvoiddoubleClick(DoubleClickEvent event) Double-click.voidforNoReferenceSelectAndExpand(Object object, int expansionLevel) If no reference is defined, try selecting this object if possible instead, with another expansion level.voidEntry field modification.open()Open the dialog.voidSelection changes.
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
If no reference is defined, try selecting this object if possible instead, with another expansion level.open
Open the dialog.- Returns:
- The selected reference, or null if the dialog was cancelled.
selectionChanged
Selection changes.- Specified by:
selectionChangedin interfaceISelectionChangedListener- Parameters:
event- The selection event.
modifyText
Entry field modification.- Specified by:
modifyTextin interfaceModifyListener- Parameters:
e- The modification event.
doubleClick
Double-click.- Specified by:
doubleClickin interfaceIDoubleClickListener