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, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred -
Constructor Summary
ConstructorsConstructorDescriptionDialogMarkerProperties(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 voidconfigureShell(Shell newShell) Method declared on Window.protected voidcreateAttributesArea(Composite parent) This method is intended to be overridden by subclasses.protected voidcreateButtonsForButtonBar(Composite parent) Creates the OK and Cancel buttons.protected ControlcreateDialogArea(Composite parent) Method declared on Dialog.protected voidcreateSeperator(Composite parent) Creates a seperator.protected StringReturn the string that describes a create marker operation.protected IDialogSettingsGets 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, ornullif not set.protected IMarkerReturns the marker being created or modified.Returns the marker attributes to save back to the marker, based on the current dialog fields.protected StringReturn the string that describes a modify marker operation.protected IResourceReturns the resource to use when creating a new task, ornullif none has been set.protected booleanisDirty()protected booleanprotected booleanReturns a boolean indicating whether the dialog should be considered resizable when the shell style is initially set.protected voidSets the dialog's dirty flag totrueprotected voidMethod declared on Dialogprotected voidsetInitialAttributes(Map<String, Object> initialAttributes) Sets initial attributes to use when creating a new task.voidSets the marker to show or modify.voidsetResource(IResource resource) Sets the resource to use when creating a new task.protected voidSets the marker type when creating a new marker.protected voidUpdates the dialog from the predefined attributes.protected voidUpdates the dialog from the marker state.protected voidUpdates widget enablement for the dialog.Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableMethods 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, shortenTextMethods 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, usesetResourceandsetInitialAttributes. 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, usesetResourceandsetInitialAttributes. 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, usesetResourceandsetInitialAttributes. 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, ornullto create a new marker- Since:
- 3.3
-
getMarker
Returns the marker being created or modified. For a new marker, this returnsnulluntil 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, ornullif 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, ornullif 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:
configureShellin classWindow- Parameters:
newShell- the shell
-
createDialogArea
Method declared on Dialog.- Overrides:
createDialogAreain 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:
createButtonsForButtonBarin 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:
trueif the dirty flag has been set to true.falseotherwise.
-
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:
trueif the marker is editable or the dialog is creating a new marker.falseif 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:DialogGets the dialog settings that should be used for remembering the bounds of of the dialog, according to the dialog bounds strategy.- Overrides:
getDialogBoundsSettingsin classDialog- Returns:
- settings the dialog settings used to store the dialog's location
and/or size, or
nullif 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:DialogReturns 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:
isResizablein classDialog- Returns:
- a boolean indicating whether the dialog is resizable and should have the default style bits for resizable dialogs
-