Class AbstractDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.apache.uima.taeconfigurator.editors.ui.dialogs.AbstractDialog
- All Implemented Interfaces:
StandardStrings
,org.eclipse.jface.window.IShellProvider
,org.eclipse.swt.widgets.Listener
- Direct Known Subclasses:
AbstractDialogKeyVerify
,AbstractDialogMultiColTable
,AddIndexKeyDialog
,AddRemoteServiceDialog
,AddTypeToPriorityListDialog
,EditSofaBindingsDialog
,ExportImportablePartDialog
,FindComponentDialog
,PickOverrideKeysAndParmName
,PickTaeForTypesDialog
,ResourcePickerDialog
,SelectTypeDialog
public abstract class AbstractDialog
extends org.eclipse.jface.dialogs.Dialog
implements org.eclipse.swt.widgets.Listener, StandardStrings
The Class AbstractDialog.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The dialog description.protected MultiPageEditor
The editor.protected org.eclipse.swt.widgets.Label
The error message UI.protected org.eclipse.swt.widgets.Button
The ok button.protected AbstractSection
The section.static final String[]
The Constant stringArray0.protected String
The title.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
Fields inherited from interface org.apache.uima.taeconfigurator.StandardStrings
S_, S_ADD, S_DESCRIPTION, S_DOWN, S_DOWN_TIP, S_EDIT, S_EDIT_TIP, S_EXPORT, S_EXPORT_TIP, S_REMOVE, S_REMOVE_TIP, S_UP, S_UP_TIP
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDialog
(AbstractSection section, String title, String description) Instantiates a new abstract dialog.protected
AbstractDialog
(org.eclipse.swt.widgets.Shell shell, String title, String description) Instantiates a new abstract dialog. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buttonPressed
(int buttonId) protected void
configureShell
(org.eclipse.swt.widgets.Shell shell) static String
Convert null.abstract void
Copy values from GUI.protected org.eclipse.swt.widgets.Control
createButtonBar
(org.eclipse.swt.widgets.Composite c) protected void
createButtonsForButtonBar
(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.Control
createDialogArea
(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.Control
createDialogArea
(org.eclipse.swt.widgets.Composite parent, Object existing) Creates the dialog area.protected org.eclipse.swt.widgets.Label
createWideLabel
(org.eclipse.swt.widgets.Composite parent, String message) Creates the wide label.abstract void
enableOK()
Enable OK.protected String[]
Gets the all types as sorted array.int
getHitColumn
(org.eclipse.swt.widgets.TreeItem item, org.eclipse.swt.graphics.Point p) Gets the hit column.Gets the type system info list.void
handleEvent
(org.eclipse.swt.widgets.Event event) abstract boolean
isValid()
Checks if is valid.protected org.eclipse.swt.widgets.Composite
new2ColumnComposite
(org.eclipse.swt.widgets.Composite parent) New 2 column composite.protected org.eclipse.swt.widgets.Button
New button.org.eclipse.swt.widgets.Composite
newButtonContainer
(org.eclipse.swt.widgets.Composite parent) New button container.protected org.eclipse.swt.custom.CCombo
New C combo.protected org.eclipse.swt.widgets.Text
newDescription
(org.eclipse.swt.widgets.Composite twoCol, String tip) New description.protected void
newErrorMessage
(org.eclipse.swt.widgets.Composite c) New error message.protected void
newErrorMessage
(org.eclipse.swt.widgets.Composite twoCol, int span) New error message.protected org.eclipse.swt.custom.CCombo
newLabeledCCombo
(org.eclipse.swt.widgets.Composite parent, String label, String tip) New labeled C combo.protected org.eclipse.swt.widgets.Text
newLabeledText
(org.eclipse.swt.widgets.Composite parent, int style, String label, String tip) New labeled text.protected org.eclipse.swt.widgets.Text
newLabeledTypeInput
(AbstractSection aSection, org.eclipse.swt.widgets.Composite parent, String label, String tip) New labeled type input.org.eclipse.swt.widgets.Button
newPushButton
(org.eclipse.swt.widgets.Composite parent, String label, String tip) New push button.protected org.eclipse.swt.widgets.Table
newTable
(org.eclipse.swt.widgets.Composite parent, int style) Styles = SWT.SINGLE / MULTI / CHECK / FULL_SELECTION / HIDE_SELECTIONprotected org.eclipse.swt.widgets.Text
New text.protected org.eclipse.swt.widgets.Tree
newTree
(org.eclipse.swt.widgets.Composite parent, int style) New tree.protected org.eclipse.swt.widgets.Text
newTypeInput
(AbstractSection aSection, org.eclipse.swt.widgets.Composite twoCol) New type input.static String
In XML, a 0 - length string is represented as <xxx/>, while a null value causes the element to be omitted.protected void
setErrorMessage
(String msg) Sets the error message.void
setMessage
(String msg) Sets the message.protected void
setTextAndTip
(org.eclipse.swt.custom.CCombo c, String label, String tip) Sets the text and tip.protected void
setTextAndTip
(org.eclipse.swt.widgets.Button c, String label, String tip) Sets the text and tip.protected void
setTextAndTip
(org.eclipse.swt.widgets.Label c, String label, String tip) Sets the text and tip.protected void
setTextAndTip
(org.eclipse.swt.widgets.Label c, String label, String tip, int horizStyle, boolean horizGrab) Sets the text and tip.void
Sets the title.protected void
superButtonPressed
(int buttonId) Super button pressed.void
textModifyCallback
(org.eclipse.swt.widgets.Event e) Text modify callback.protected boolean
typeContainedInTypeSystemInfoList
(String fullTypeName, TypesWithNameSpaces types) Type contained in type system info list.boolean
Use qualified types.Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Field Details
-
editor
The editor. -
section
The section. -
okButton
protected org.eclipse.swt.widgets.Button okButtonThe ok button. -
errorMessageUI
protected org.eclipse.swt.widgets.Label errorMessageUIThe error message UI. -
title
The title. -
dialogDescription
The dialog description. -
stringArray0
The Constant stringArray0.
-
-
Constructor Details
-
AbstractDialog
Instantiates a new abstract dialog.- Parameters:
section
- the sectiontitle
- the titledescription
- the description
-
AbstractDialog
Instantiates a new abstract dialog.- Parameters:
shell
- the shelltitle
- the titledescription
- the description
-
-
Method Details
-
setTitle
Sets the title.- Parameters:
title
- the new title
-
setMessage
Sets the message.- Parameters:
msg
- the new message
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent) - Overrides:
createDialogArea
in classorg.eclipse.jface.dialogs.Dialog
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent, Object existing) Creates the dialog area.- Parameters:
parent
- the parentexisting
- the existing- Returns:
- the control
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell) - Overrides:
configureShell
in classorg.eclipse.jface.window.Window
-
createWideLabel
protected org.eclipse.swt.widgets.Label createWideLabel(org.eclipse.swt.widgets.Composite parent, String message) Creates the wide label.- Parameters:
parent
- the parentmessage
- the message- Returns:
- the label
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) - Overrides:
createButtonsForButtonBar
in classorg.eclipse.jface.dialogs.Dialog
-
setTextAndTip
Sets the text and tip.- Parameters:
c
- the clabel
- the labeltip
- the tip
-
setTextAndTip
Sets the text and tip.- Parameters:
c
- the clabel
- the labeltip
- the tip
-
setTextAndTip
Sets the text and tip.- Parameters:
c
- the clabel
- the labeltip
- the tip
-
setTextAndTip
protected void setTextAndTip(org.eclipse.swt.widgets.Label c, String label, String tip, int horizStyle, boolean horizGrab) Sets the text and tip.- Parameters:
c
- the clabel
- the labeltip
- the tiphorizStyle
- the horiz stylehorizGrab
- the horiz grab
-
new2ColumnComposite
protected org.eclipse.swt.widgets.Composite new2ColumnComposite(org.eclipse.swt.widgets.Composite parent) New 2 column composite.- Parameters:
parent
- the parent- Returns:
- the composite
-
newDescription
protected org.eclipse.swt.widgets.Text newDescription(org.eclipse.swt.widgets.Composite twoCol, String tip) New description.- Parameters:
twoCol
- the two coltip
- the tip- Returns:
- the text
-
newLabeledCCombo
protected org.eclipse.swt.custom.CCombo newLabeledCCombo(org.eclipse.swt.widgets.Composite parent, String label, String tip) New labeled C combo.- Parameters:
parent
- the parentlabel
- the labeltip
- the tip- Returns:
- the c combo
-
newCCombo
protected org.eclipse.swt.custom.CCombo newCCombo(org.eclipse.swt.widgets.Composite parent, String tip) New C combo.- Parameters:
parent
- the parenttip
- the tip- Returns:
- the c combo
-
newButton
protected org.eclipse.swt.widgets.Button newButton(org.eclipse.swt.widgets.Composite parent, int style, String name, String tip) New button.- Parameters:
parent
- the parentstyle
- the stylename
- the nametip
- the tip- Returns:
- the button
-
newText
protected org.eclipse.swt.widgets.Text newText(org.eclipse.swt.widgets.Composite parent, int style, String tip) New text.- Parameters:
parent
- the parentstyle
- the styletip
- the tip- Returns:
- the text
-
newLabeledText
protected org.eclipse.swt.widgets.Text newLabeledText(org.eclipse.swt.widgets.Composite parent, int style, String label, String tip) New labeled text.- Parameters:
parent
- the parentstyle
- the stylelabel
- the labeltip
- the tip- Returns:
- the text
-
newTree
protected org.eclipse.swt.widgets.Tree newTree(org.eclipse.swt.widgets.Composite parent, int style) New tree.- Parameters:
parent
- the parentstyle
- the style- Returns:
- the tree
-
newTable
protected org.eclipse.swt.widgets.Table newTable(org.eclipse.swt.widgets.Composite parent, int style) Styles = SWT.SINGLE / MULTI / CHECK / FULL_SELECTION / HIDE_SELECTION- Parameters:
parent
- the parentstyle
- the style- Returns:
- the new table widget
-
getHitColumn
public int getHitColumn(org.eclipse.swt.widgets.TreeItem item, org.eclipse.swt.graphics.Point p) Gets the hit column.- Parameters:
item
- the itemp
- the p- Returns:
- the hit column
-
newButtonContainer
public org.eclipse.swt.widgets.Composite newButtonContainer(org.eclipse.swt.widgets.Composite parent) New button container.- Parameters:
parent
- the parent- Returns:
- the composite
-
newPushButton
public org.eclipse.swt.widgets.Button newPushButton(org.eclipse.swt.widgets.Composite parent, String label, String tip) New push button.- Parameters:
parent
- the parentlabel
- the labeltip
- the tip- Returns:
- the button
-
newErrorMessage
protected void newErrorMessage(org.eclipse.swt.widgets.Composite c) New error message.- Parameters:
c
- the c
-
newErrorMessage
protected void newErrorMessage(org.eclipse.swt.widgets.Composite twoCol, int span) New error message.- Parameters:
twoCol
- the two colspan
- the span
-
setErrorMessage
Sets the error message.- Parameters:
msg
- the new error message
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event) - Specified by:
handleEvent
in interfaceorg.eclipse.swt.widgets.Listener
-
superButtonPressed
protected void superButtonPressed(int buttonId) Super button pressed.- Parameters:
buttonId
- the button id
-
buttonPressed
protected void buttonPressed(int buttonId) - Overrides:
buttonPressed
in classorg.eclipse.jface.dialogs.Dialog
-
copyValuesFromGUI
public abstract void copyValuesFromGUI()Copy values from GUI. -
isValid
public abstract boolean isValid()Checks if is valid.- Returns:
- true, if is valid
-
createButtonBar
protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite c) - Overrides:
createButtonBar
in classorg.eclipse.jface.dialogs.Dialog
-
enableOK
public abstract void enableOK()Enable OK. -
useQualifiedTypes
public boolean useQualifiedTypes()Use qualified types.- Returns:
- true, if successful
-
getAllTypesAsSortedArray
Gets the all types as sorted array.- Returns:
- the all types as sorted array
-
newLabeledTypeInput
protected org.eclipse.swt.widgets.Text newLabeledTypeInput(AbstractSection aSection, org.eclipse.swt.widgets.Composite parent, String label, String tip) New labeled type input.- Parameters:
aSection
- the a sectionparent
- the parentlabel
- the labeltip
- the tip- Returns:
- the text
-
newTypeInput
protected org.eclipse.swt.widgets.Text newTypeInput(AbstractSection aSection, org.eclipse.swt.widgets.Composite twoCol) New type input.- Parameters:
aSection
- the a sectiontwoCol
- the two col- Returns:
- the text
-
textModifyCallback
public void textModifyCallback(org.eclipse.swt.widgets.Event e) Text modify callback.- Parameters:
e
- the e
-
getTypeSystemInfoList
Gets the type system info list.- Returns:
- the type system info list
-
typeContainedInTypeSystemInfoList
Type contained in type system info list.- Parameters:
fullTypeName
- the full type nametypes
- the types- Returns:
- true, if successful
-
nullIf0lengthString
In XML, a 0 - length string is represented as <xxx/>, while a null value causes the element to be omitted. Fix up values to be null if empty.- Parameters:
v
- the v- Returns:
- null for 0 length string
-
convertNull
Convert null.- Parameters:
v
- the v- Returns:
- the string
-