InfoDialog (SelekTOR Java Documentation)
Date: 2018-05-25

lib

## Class InfoDialog

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - java.awt.Window
      - - java.awt.Dialog
        - - javax.swing.JDialog
          - - lib.InfoDialog

- All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

      public class InfoDialog
      extends javax.swing.JDialog

  Author:
    Alistair Neil,
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.JDialog

      `javax.swing.JDialog.AccessibleJDialog`

    - ### Nested classes/interfaces inherited from class java.awt.Dialog

      `java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType`

    - ### Nested classes/interfaces inherited from class java.awt.Window

      `java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CANCEL_BUTTON`
    `static int` | `CANCEL_WINDOW`
    `static int` | `OK`

    - ### Fields inherited from class javax.swing.JDialog

      `accessibleContext, rootPane, rootPaneCheckingEnabled`

    - ### Fields inherited from class java.awt.Dialog

      `DEFAULT_MODALITY_TYPE`

    - ### Fields inherited from class java.awt.Component

      `BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface javax.swing.WindowConstants

      `DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfoDialog(java.awt.Frame parent)` Creates new InfoDialog, for parent frame with modality modal

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendInfoText(java.lang.String text)` Append text to the information area, Scrolling should be enabled
    `void` | `createError(java.lang.String title)` Create error dialog
    `void` | `createError(java.lang.String title, java.lang.String info)` Create error dialog
    `void` | `createInfo(java.lang.String title)` Convenience methods
    `void` | `createInfo(java.lang.String title, java.lang.String info)`
    `void` | `createProgress(java.lang.String title, java.lang.String info)` Create progress bar dialog
    `void` | `createWarn(java.lang.String title)`
    `void` | `createWarn(java.lang.String title, java.lang.String info)` Create warning dialog
    `java.awt.Font` | `getFont()`
    `int` | `getReturnStatus()`
    `javax.swing.JTextArea` | `getTextArea()`
    `boolean` | `isCheckBoxSelected()` Test to see if checkbox is selected
    `void` | `progressTask(int status, javax.swing.JProgressBar jpb)` Overridable handle for a progress based task
    `void` | `setAckEnabled(boolean enabled)` Set whether Ok button is enabled
    `void` | `setAckVisible(boolean visible)` Set whether OK button is visible
    `void` | `setAutoClose(int millis)` Set the form auto close period in milliseconds
    `void` | `setAutoScrollEnabled(boolean enabled)` Enable/Disable Autoscrolling
    `void` | `setCancelButtonText(java.lang.String text)`
    `void` | `setCancelEnabled(boolean enabled)` Set whether Cancel button is enabled
    `void` | `setCancelVisible(boolean visible)` Set whether Cancel button is visible
    `void` | `setCheckBoxEnabled(boolean checked)` Set check box selection status
    `void` | `setCheckBoxText(java.lang.String text)`
    `void` | `setCheckBoxVisible(boolean enabled)` Set whether the forms checkbox is enabled
    `void` | `setCloseButtonText(java.lang.String text)`
    `void` | `setContinueButtonText(java.lang.String text)`
    `void` | `setFont(java.lang.String font, int sizeoffset)` Set info font
    `void` | `setInfoText(java.lang.String text)` Set dialog message body
    `void` | `setInfoText(java.lang.String text, java.awt.Color fgcolor)` Set dialog message body, and font colour
    `void` | `setTimeLock(int secs)`
    `void` | `setTitle(java.lang.String title)` Set dialog title
    `void` | `setVisibleWithFocus(boolean visible)`

    - ### Methods inherited from class javax.swing.JDialog

      `addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update`

    - ### Methods inherited from class java.awt.Dialog

      `addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setUndecorated, setVisible, show, toBack`

    - ### Methods inherited from class java.awt.Window

      `addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront`

    - ### Methods inherited from class java.awt.Container

      `add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree`

    - ### Methods inherited from class java.awt.Component

      `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### CANCEL_BUTTON

          public static final int CANCEL_BUTTON

      See Also:
        Constant Field Values

    - #### CANCEL_WINDOW

          public static final int CANCEL_WINDOW

      See Also:
        Constant Field Values

    - #### OK

          public static final int OK

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### InfoDialog

          public InfoDialog(java.awt.Frame parent)

      Creates new InfoDialog, for parent frame with modality modal
      Parameters:
        `parent` -

  - ### Method Detail

    - #### getFont

          public final java.awt.Font getFont()

      Specified by:
        `getFont` in interface `java.awt.MenuContainer`
      Overrides:
        `getFont` in class `java.awt.Component`

    - #### createInfo

          public final void createInfo(java.lang.String title)

      Convenience methods
      Parameters:
        `title` -

    - #### createInfo

          public final void createInfo(java.lang.String title,
                                       java.lang.String info)

      Parameters:
        `title` -
        `info` -

    - #### setTitle

          public final void setTitle(java.lang.String title)

      Set dialog title
      Overrides:
        `setTitle` in class `java.awt.Dialog`
      Parameters:
        `title` -

    - #### createWarn

          public final void createWarn(java.lang.String title)

      Parameters:
        `title` -

    - #### createWarn

          public final void createWarn(java.lang.String title,
                                       java.lang.String info)

      Create warning dialog
      Parameters:
        `title` -
        `info` -

    - #### createProgress

          public final void createProgress(java.lang.String title,
                                           java.lang.String info)

      Create progress bar dialog
      Parameters:
        `title` -
        `info` -

    - #### progressTask

          public void progressTask(int status,
                                   javax.swing.JProgressBar jpb)

      Overridable handle for a progress based task
      Parameters:
        `status` -
        `jpb` -

    - #### createError

          public final void createError(java.lang.String title)

      Create error dialog
      Parameters:
        `title` -

    - #### createError

          public final void createError(java.lang.String title,
                                        java.lang.String info)

      Create error dialog
      Parameters:
        `title` -
        `info` -

    - #### setTimeLock

          public final void setTimeLock(int secs)

    - #### setCloseButtonText

          public final void setCloseButtonText(java.lang.String text)

    - #### setCancelButtonText

          public final void setCancelButtonText(java.lang.String text)

    - #### setContinueButtonText

          public final void setContinueButtonText(java.lang.String text)

    - #### setCheckBoxText

          public final void setCheckBoxText(java.lang.String text)

    - #### setAutoScrollEnabled

          public final void setAutoScrollEnabled(boolean enabled)

      Enable/Disable Autoscrolling
      Parameters:
        `enabled` -

    - #### appendInfoText

          public final void appendInfoText(java.lang.String text)

      Append text to the information area, Scrolling should be enabled
      Parameters:
        `text` -

    - #### setCheckBoxVisible

          public final void setCheckBoxVisible(boolean enabled)

      Set whether the forms checkbox is enabled
      Parameters:
        `enabled` -

    - #### setCheckBoxEnabled

          public final void setCheckBoxEnabled(boolean checked)

      Set check box selection status
      Parameters:
        `checked` -

    - #### isCheckBoxSelected

          public final boolean isCheckBoxSelected()

      Test to see if checkbox is selected
      Returns:
        boolean True if selected

    - #### setFont

          public final void setFont(java.lang.String font,
                                    int sizeoffset)

      Set info font
      Parameters:
        `font` -
        `sizeoffset` -

    - #### setAutoClose

          public final void setAutoClose(int millis)

      Set the form auto close period in milliseconds
      Parameters:
        `millis` -

    - #### getTextArea

          public final javax.swing.JTextArea getTextArea()

    - #### getReturnStatus

          public final int getReturnStatus()

      Returns:
        the return status of this dialog - one of RET_OK or RET_CANCEL

    - #### setInfoText

          public final void setInfoText(java.lang.String text)

      Set dialog message body
      Parameters:
        `text` -

    - #### setInfoText

          public final void setInfoText(java.lang.String text,
                                        java.awt.Color fgcolor)

      Set dialog message body, and font colour
      Parameters:
        `text` -
        `fgcolor` -

    - #### setCancelEnabled

          public final void setCancelEnabled(boolean enabled)

      Set whether Cancel button is enabled
      Parameters:
        `enabled` -

    - #### setCancelVisible

          public final void setCancelVisible(boolean visible)

      Set whether Cancel button is visible
      Parameters:
        `visible` -

    - #### setAckEnabled

          public final void setAckEnabled(boolean enabled)

      Set whether Ok button is enabled
      Parameters:
        `enabled` -

    - #### setAckVisible

          public final void setAckVisible(boolean visible)

      Set whether OK button is visible
      Parameters:
        `visible` -

    - #### setVisibleWithFocus

          public void setVisibleWithFocus(boolean visible)