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

    Fields
    Modifier and Type
    Field
    Description
    protected 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    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 Type
    Method
    Description
    protected 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
    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
    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
    newButton(org.eclipse.swt.widgets.Composite parent, int style, String name, String tip)
    New button.
    org.eclipse.swt.widgets.Composite
    newButtonContainer(org.eclipse.swt.widgets.Composite parent)
    New button container.
    protected org.eclipse.swt.custom.CCombo
    newCCombo(org.eclipse.swt.widgets.Composite parent, String tip)
    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_SELECTION
    protected org.eclipse.swt.widgets.Text
    newText(org.eclipse.swt.widgets.Composite parent, int style, String tip)
    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
    Sets the error message.
    void
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • editor

      protected MultiPageEditor editor
      The editor.
    • section

      protected AbstractSection section
      The section.
    • okButton

      protected org.eclipse.swt.widgets.Button okButton
      The ok button.
    • errorMessageUI

      protected org.eclipse.swt.widgets.Label errorMessageUI
      The error message UI.
    • title

      protected String title
      The title.
    • dialogDescription

      protected String dialogDescription
      The dialog description.
    • stringArray0

      public static final String[] stringArray0
      The Constant stringArray0.
  • Constructor Details

    • AbstractDialog

      protected AbstractDialog(AbstractSection section, String title, String description)
      Instantiates a new abstract dialog.
      Parameters:
      section - the section
      title - the title
      description - the description
    • AbstractDialog

      protected AbstractDialog(org.eclipse.swt.widgets.Shell shell, String title, String description)
      Instantiates a new abstract dialog.
      Parameters:
      shell - the shell
      title - the title
      description - the description
  • Method Details

    • setTitle

      public void setTitle(String title)
      Sets the title.
      Parameters:
      title - the new title
    • setMessage

      public void setMessage(String msg)
      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 class org.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 parent
      existing - the existing
      Returns:
      the control
    • configureShell

      protected void configureShell(org.eclipse.swt.widgets.Shell shell)
      Overrides:
      configureShell in class org.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 parent
      message - the message
      Returns:
      the label
    • createButtonsForButtonBar

      protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
      Overrides:
      createButtonsForButtonBar in class org.eclipse.jface.dialogs.Dialog
    • setTextAndTip

      protected void setTextAndTip(org.eclipse.swt.widgets.Button c, String label, String tip)
      Sets the text and tip.
      Parameters:
      c - the c
      label - the label
      tip - the tip
    • setTextAndTip

      protected void setTextAndTip(org.eclipse.swt.custom.CCombo c, String label, String tip)
      Sets the text and tip.
      Parameters:
      c - the c
      label - the label
      tip - the tip
    • setTextAndTip

      protected void setTextAndTip(org.eclipse.swt.widgets.Label c, String label, String tip)
      Sets the text and tip.
      Parameters:
      c - the c
      label - the label
      tip - 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 c
      label - the label
      tip - the tip
      horizStyle - the horiz style
      horizGrab - 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 col
      tip - 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 parent
      label - the label
      tip - 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 parent
      tip - 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 parent
      style - the style
      name - the name
      tip - 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 parent
      style - the style
      tip - 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 parent
      style - the style
      label - the label
      tip - 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 parent
      style - 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 parent
      style - 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 item
      p - 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 parent
      label - the label
      tip - 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 col
      span - the span
    • setErrorMessage

      protected void setErrorMessage(String msg)
      Sets the error message.
      Parameters:
      msg - the new error message
    • handleEvent

      public void handleEvent(org.eclipse.swt.widgets.Event event)
      Specified by:
      handleEvent in interface org.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 class org.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 class org.eclipse.jface.dialogs.Dialog
    • enableOK

      public abstract void enableOK()
      Enable OK.
    • useQualifiedTypes

      public boolean useQualifiedTypes()
      Use qualified types.
      Returns:
      true, if successful
    • getAllTypesAsSortedArray

      protected String[] 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 section
      parent - the parent
      label - the label
      tip - 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 section
      twoCol - the two col
      Returns:
      the text
    • textModifyCallback

      public void textModifyCallback(org.eclipse.swt.widgets.Event e)
      Text modify callback.
      Parameters:
      e - the e
    • getTypeSystemInfoList

      public TypesWithNameSpaces getTypeSystemInfoList()
      Gets the type system info list.
      Returns:
      the type system info list
    • typeContainedInTypeSystemInfoList

      protected boolean typeContainedInTypeSystemInfoList(String fullTypeName, TypesWithNameSpaces types)
      Type contained in type system info list.
      Parameters:
      fullTypeName - the full type name
      types - the types
      Returns:
      true, if successful
    • nullIf0lengthString

      public static String nullIf0lengthString(String v)
      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

      public static String convertNull(String v)
      Convert null.
      Parameters:
      v - the v
      Returns:
      the string