public abstract class DebugPopup extends PopupDialog
PopupDialog that is automatically positioned relative
to a specified anchor point. The popup can be dismissed in the same
manor as all popup dialogs, but additionally allows clients the option
of specifying a command id that can be used to persist the contents of
the dialog.
Clients may subclass this.
Note: This class subclasses PopupDialog
which is currently marked as experimental API. Users should therefore consider
this class to be experimental as well.
Window.IExceptionHandlerHOVER_SHELLSTYLE, INFOPOPUP_SHELLSTYLE, INFOPOPUPRESIZE_SHELLSTYLE, POPUP_HORIZONTALSPACING, POPUP_MARGINHEIGHT, POPUP_MARGINWIDTH, POPUP_VERTICALSPACING| Constructor and Description |
|---|
DebugPopup(Shell parent,
Point anchor,
String commandId)
Constructs a new popup dialog of type
PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
Closes this window, disposes its shell, and removes this window from its
window manager (if it has one).
|
protected abstract Control |
createDialogArea(Composite parent)
Creates and returns the contents of the dialog (the area below the title
area and above the info text area.
|
protected String |
getActionText()
Returns the text to be shown as the action performed when this dialog's
persist command is invoked, or
null. |
protected String |
getCommandId()
Returns the command id to be used for persisting the contents of the
dialog.
|
protected IDialogSettings |
getDialogSettings()
Gets the dialog settings that should be used for remembering the bounds
of the dialog.
|
protected String |
getInfoText()
Returns the text to be shown in the popups's information area.
|
protected Point |
getInitialLocation(Point initialSize)
Returns the initial location to use for the shell based upon the
current selection in the viewer.
|
int |
open()
Opens this window, creating it first if it has not yet been created.
|
protected void |
persist()
Persists the contents of the dialog.
|
protected boolean |
wasPersisted()
Returns whether the command handler was invoked to persist this popup's result.
|
adjustBounds, applyBackgroundColor, applyForegroundColor, configureShell, createContents, createInfoTextArea, createTitleControl, createTitleMenuArea, fillDialogMenu, getBackgroundColorExclusions, getFocusControl, getForegroundColorExclusions, getInitialSize, getPersistBounds, hasInfoArea, hasTitleArea, saveDialogBounds, setInfoText, setTabOrder, setTitleText, showDialogMenucanHandleShellCloseEvent, constrainShellSize, create, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManagerpublic DebugPopup(Shell parent, Point anchor, String commandId)
PopupDialog.INFOPOPUPRESIZE_SHELLSTYLEparent - The parent shellanchor - point at which to anchor the popup dialog in Display coordinate spacecommandId - The command id to be used for persistence of
the dialog, or nullprotected String getInfoText()
null.
By default, if this dialog has a persistence command associated with it,
the text displayed is of the form "Press {key-sequence} to {action}". The
action text is specified by the method getActionText().
nullprotected String getActionText()
null.
Subclasses should override as necessary.
protected String getCommandId()
nullprotected void persist()
protected boolean wasPersisted()
protected abstract Control createDialogArea(Composite parent)
PopupDialog
The PopupDialog implementation of this framework method
creates and returns a new Composite with standard margins
and spacing.
The returned control's layout data must be an instance of
GridData. This method must not modify the parent's
layout.
Subclasses must override this method but may call super as
in the following example:
Composite composite = (Composite) super.createDialogArea(parent); //add controls to composite as necessary return composite;
createDialogArea in class PopupDialogparent - the parent composite to contain the dialog areaprotected Point getInitialLocation(Point initialSize)
getInitialLocation in class PopupDialoginitialSize - the initial size of the shell, as returned by
getInitialSize.Window.getInitialLocation(org.eclipse.swt.graphics.Point)protected IDialogSettings getDialogSettings()
PopupDialoggetDialogSettings in class PopupDialognull if the dialog's bounds should
never be stored.public int open()
PopupDialog
This method is reimplemented for special configuration of PopupDialogs.
It never blocks on open, immediately returning OK if the
open is successful, or CANCEL if it is not. It provides
framework hooks that allow subclasses to set the focus and tab order, and
avoids the use of shell.open() in cases where the focus
should not be given to the shell initially.
open in class PopupDialogWindow.open()public boolean close()
PopupDialog
This method is extended to save the dialog bounds and initialize widget
state so that the widgets can be recreated if the dialog is reopened.
This method may be extended (super.close must be called).
close in class PopupDialogtrue if the window is (or was already) closed, and
false if it is still openGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.