Class DialogMarkerProperties
- All Implemented Interfaces:
IShellProvider
- Direct Known Subclasses:
DialogTaskProperties
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
-
Field Summary
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
-
Constructor Summary
ConstructorDescriptionDialogMarkerProperties
(Shell parentShell) Creates the dialog.DialogMarkerProperties
(Shell parentShell, String title) Creates the dialog.DialogMarkerProperties
(Shell parentShell, String title, String markerName) Creates the dialog. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureShell
(Shell newShell) Method declared on Window.protected void
createAttributesArea
(Composite parent) This method is intended to be overridden by subclasses.protected void
createButtonsForButtonBar
(Composite parent) Creates the OK and Cancel buttons.protected Control
createDialogArea
(Composite parent) Method declared on Dialog.protected void
createSeperator
(Composite parent) Creates a seperator.protected String
Return the string that describes a create marker operation.protected IDialogSettings
Gets the dialog settings that should be used for remembering the bounds of of the dialog, according to the dialog bounds strategy.Returns the initial attributes to use when creating a new task, ornull
if not set.protected IMarker
Returns the marker being created or modified.Returns the marker attributes to save back to the marker, based on the current dialog fields.protected String
Return the string that describes a modify marker operation.protected IResource
Returns the resource to use when creating a new task, ornull
if none has been set.protected boolean
isDirty()
protected boolean
protected boolean
Returns a boolean indicating whether the dialog should be considered resizable when the shell style is initially set.protected void
Sets the dialog's dirty flag totrue
protected void
Method declared on Dialogprotected void
setInitialAttributes
(Map<String, Object> initialAttributes) Sets initial attributes to use when creating a new task.void
Sets the marker to show or modify.void
setResource
(IResource resource) Sets the resource to use when creating a new task.protected void
Sets the marker type when creating a new marker.protected void
Updates the dialog from the predefined attributes.protected void
Updates the dialog from the marker state.protected void
Updates widget enablement for the dialog.Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Constructor Details
-
DialogMarkerProperties
Creates the dialog. By default this dialog creates a new marker. To set the resource and initial attributes for the new marker, usesetResource
andsetInitialAttributes
. To show or modify an existing marker, usesetMarker
.- Parameters:
parentShell
- the parent shell
-
DialogMarkerProperties
Creates the dialog. By default this dialog creates a new marker. To set the resource and initial attributes for the new marker, usesetResource
andsetInitialAttributes
. To show or modify an existing marker, usesetMarker
.- Parameters:
parentShell
- the parent shelltitle
- the title of the dialog
-
DialogMarkerProperties
Creates the dialog. By default this dialog creates a new marker. To set the resource and initial attributes for the new marker, usesetResource
andsetInitialAttributes
. To show or modify an existing marker, usesetMarker
.- Parameters:
parentShell
- the parent shelltitle
- the title of the dialogmarkerName
- the name used to describe the specific kind of marker shown- Since:
- 3.3
-
-
Method Details
-
setMarker
Sets the marker to show or modify.IMPORTANT: Although this class is internal, there are public subclasses that expose this method as API. Changes in this implementation should be treated as API changes.
- Parameters:
marker
- the marker, ornull
to create a new marker- Since:
- 3.3
-
getMarker
Returns the marker being created or modified. For a new marker, this returnsnull
until the dialog returns, but is non-null after.IMPORTANT: Although this method is protected and the class is internal, there are public subclasses that expose this method as API. Changes in this implementation should be treated as API changes.
- Returns:
- the marker
- Since:
- 3.3
-
setResource
Sets the resource to use when creating a new task. If not set, the new task is created on the workspace root.IMPORTANT: Although this class is internal, there are public subclasses that expose this method as API. Changes in this implementation should be treated as API changes.
- Parameters:
resource
- the resource
-
getResource
Returns the resource to use when creating a new task, ornull
if none has been set. If not set, the new task is created on the workspace root.IMPORTANT: Although this method is protected and the class is internal, there are public subclasses that expose this method as API. Changes in this implementation should be treated as API changes.
- Returns:
- the resource
- Since:
- 3.3
-
setInitialAttributes
Sets initial attributes to use when creating a new task. If not set, the new task is created with default attributes.IMPORTANT: Although this method is protected and the class is internal, there are public subclasses that expose this method as API. Changes in this implementation should be treated as API changes.
- Parameters:
initialAttributes
- the initial attributes- Since:
- 3.3
-
getInitialAttributes
Returns the initial attributes to use when creating a new task, ornull
if not set. If not set, the new task is created with default attributes.IMPORTANT: Although this method is protected and the class is internal, there are public subclasses that expose this method as API. Changes in this implementation should be treated as API changes.
- Returns:
- the initial attributes
- Since:
- 3.3
-
configureShell
Method declared on Window.- Overrides:
configureShell
in classWindow
- Parameters:
newShell
- the shell
-
createDialogArea
Method declared on Dialog.- Overrides:
createDialogArea
in classDialog
- Parameters:
parent
- the parent composite to contain the dialog area- Returns:
- the dialog area control
-
createSeperator
Creates a seperator. -
createButtonsForButtonBar
Creates the OK and Cancel buttons.- Overrides:
createButtonsForButtonBar
in classDialog
- Parameters:
parent
- the button bar composite
-
createAttributesArea
This method is intended to be overridden by subclasses. The attributes area is created between the creation time area and the resource area.- Parameters:
parent
- the parent composite
-
updateDialogFromMarker
protected void updateDialogFromMarker()Updates the dialog from the marker state. -
updateDialogForNewMarker
protected void updateDialogForNewMarker()Updates the dialog from the predefined attributes. -
okPressed
protected void okPressed()Method declared on Dialog -
markDirty
protected void markDirty()Sets the dialog's dirty flag totrue
-
isDirty
protected boolean isDirty()- Returns:
true
if the dirty flag has been set to true.false
otherwise.
-
getMarkerAttributes
Returns the marker attributes to save back to the marker, based on the current dialog fields. -
updateEnablement
protected void updateEnablement()Updates widget enablement for the dialog. Should be overridden by subclasses. -
isEditable
protected boolean isEditable()- Returns:
true
if the marker is editable or the dialog is creating a new marker.false
if the marker is not editable.
-
setType
Sets the marker type when creating a new marker.- Parameters:
type
- the marker type- Since:
- 3.3 this method is protected.
-
getDialogBoundsSettings
Description copied from class:Dialog
Gets the dialog settings that should be used for remembering the bounds of of the dialog, according to the dialog bounds strategy.- Overrides:
getDialogBoundsSettings
in classDialog
- Returns:
- settings the dialog settings used to store the dialog's location
and/or size, or
null
if the dialog's bounds should never be stored. - See Also:
-
getModifyOperationTitle
Return the string that describes a modify marker operation. Subclasses may override to more specifically describe the marker.- Since:
- 3.3
-
getCreateOperationTitle
Return the string that describes a create marker operation. Subclasses may override to more specifically describe the marker.- Since:
- 3.3
-
isResizable
protected boolean isResizable()Description copied from class:Dialog
Returns a boolean indicating whether the dialog should be considered resizable when the shell style is initially set.This method is used to ensure that all style bits appropriate for resizable dialogs are added to the shell style. Individual dialogs may always set the shell style to ensure that a dialog is resizable, but using this method ensures that resizable dialogs will be created with the same set of style bits.
Style bits will never be removed based on the return value of this method. For example, if a dialog returns
false
, but also sets a style bit for a SWT.RESIZE border, the style bit will be honored.- Overrides:
isResizable
in classDialog
- Returns:
- a boolean indicating whether the dialog is resizable and should have the default style bits for resizable dialogs
-