|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.window.Window | +--org.eclipse.jface.dialogs.Dialog | +--org.eclipse.ui.views.tasklist.TaskPropertiesDialog
Shows the properties of a new or existing task, or a problem.
Nested Class Summary |
Nested classes inherited from class org.eclipse.jface.window.Window |
Window.IExceptionHandler |
Field Summary |
Fields inherited from class org.eclipse.jface.dialogs.Dialog |
DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING |
Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
Constructor Summary | |
TaskPropertiesDialog(Shell parentShell)
Creates the dialog. |
Method Summary | |
protected void |
configureShell(Shell newShell)
Configures the given shell in preparation for opening this window in it. |
protected void |
createButtonsForButtonBar(Composite parent)
Creates only the OK button if showing problem properties, otherwise creates both OK and Cancel buttons. |
protected Control |
createDialogArea(Composite parent)
Creates and returns the contents of the upper part of this dialog (above the button bar). |
Map |
getInitialAttributes()
Returns the initial attributes to use when creating a new task, or null if not set. |
IMarker |
getMarker()
Returns the marker being created or modified. |
IResource |
getResource()
Returns the resource to use when creating a new task, or null if none has been set. |
protected void |
okPressed()
Notifies that the ok button of this dialog has been pressed. |
void |
setInitialAttributes(Map initialAttributes)
Sets initial attributes to use when creating a new task. |
void |
setMarker(IMarker marker)
Sets the marker to show or modify. |
void |
setResource(IResource resource)
Sets the resource to use when creating a new task. |
Methods inherited from class org.eclipse.jface.window.Window |
close, create, createShell, getContents, getDefaultImage, getInitialLocation, getInitialSize, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, open, setBlockOnOpen, setDefaultImage, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TaskPropertiesDialog(Shell parentShell)
setResource
and setInitialAttributes
.
To show or modify an existing task, use setMarker
.
Method Detail |
public void setMarker(IMarker marker)
marker
- the marker, or null
to create a new markerpublic IMarker getMarker()
null
until
the dialog returns, but is non-null after.
public void setResource(IResource resource)
public IResource getResource()
null
if none has been set.
If not set, the new task is created on the workspace root.
public void setInitialAttributes(Map initialAttributes)
public Map getInitialAttributes()
null
if not set.
If not set, the new task is created with default attributes.
protected void configureShell(Shell newShell)
Window
The default implementation of this framework method sets the shell's image and gives it a grid layout. Subclasses may extend or reimplement.
configureShell
in class Window
newShell
- the shellprotected Control createDialogArea(Composite parent)
Dialog
The Dialog
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
.
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 Dialog
parent
- the parent composite to contain the dialog area
protected void createButtonsForButtonBar(Composite parent)
createButtonsForButtonBar
in class Dialog
parent
- the button bar compositeprotected void okPressed()
Dialog
The Dialog
implementation of this framework method sets
this dialog's return code to Window.OK
and closes the dialog. Subclasses may override.
okPressed
in class Dialog
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |