com.intel.gui.dialogs
Class GenericDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by com.intel.gui.dialogs.GenericDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
Direct Known Subclasses:
TextfieldDialog

Deprecated. Since 1.4.2

public abstract class GenericDialog
extends javax.swing.JDialog

Abstract dialog that places ok, apply, reset and cancel buttons and a status bar in the south part of BorderLayout. You can choose different dialog types with different buttons from the constructor.

Version:
$Id$
Author:
Ralf Ratering
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
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected static int APPLY_CLOSE
          Deprecated. define different modi
static int APPLY_OPTION
          Deprecated. Return value from class method if APPLY is chosen.
protected static int APPLY_RESET_CLOSE
          Deprecated. define different modi
protected  javax.swing.JButton applyButton
          Deprecated. different dialog buttons are protected to allow e.g.
protected  com.intel.gui.dialogs.GenericDialog.ButtonListener buttonListener
          Deprecated.  
static int CANCEL_OPTION
          Deprecated. Return value from class method if CANCEL is chosen.
protected  javax.swing.JButton cancelButton
          Deprecated. different dialog buttons are protected to allow e.g.
static int CLOSE_OPTION
          Deprecated. Return value from class method if CLOSE is chosen.
protected  javax.swing.JButton closeButton
          Deprecated. different dialog buttons are protected to allow e.g.
protected static java.util.logging.Logger logger
          Deprecated.  
protected static int NONE
          Deprecated. define different modi
protected static int OK
          Deprecated. define different modi
protected static int OK_CANCEL
          Deprecated. define different modi
static int OK_OPTION
          Deprecated. Return value from class method if OK is chosen.
protected static int OK_PREVIEW_CANCEL
          Deprecated. define different modi
protected  javax.swing.JButton okButton
          Deprecated. different dialog buttons are protected to allow e.g.
static int PREVIEW_OPTION
          Deprecated. Return value from class method if PREVIEW is chosen.
protected  javax.swing.JButton previewButton
          Deprecated. different dialog buttons are protected to allow e.g.
static int RESET_OPTION
          Deprecated. Return value from class method if RESET is chosen.
protected  javax.swing.JButton resetButton
          Deprecated. different dialog buttons are protected to allow e.g.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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
GenericDialog(javax.swing.JDialog parent, java.lang.String title, boolean modal, int type)
          Deprecated.  
GenericDialog(javax.swing.JFrame parent, java.lang.String title, boolean modal, int type)
          Deprecated. Constructor builds the components
 
Method Summary
protected abstract  boolean applyValues()
          Deprecated. Abstract method that is called each time the okButton is pressed, before the dialog is closed.
protected abstract  boolean cancelValues()
          Deprecated. Abstract method that is called each time the cancelButton is pressed, or the dialog is closed using the window handle.
protected  void resetValues()
          Deprecated. Method that is called each time the resetButton is pressed, before the dialog is closed.
 void setStatusMessage(java.lang.String text)
          Deprecated. Modify text in status bar from outside
 void setStatusMessage(java.lang.String text, java.awt.Color foregnColor)
          Deprecated. Modify text in status bar from outside
 void setVisible(boolean visible)
          Deprecated. Overwrite show method to make okButton the default one and to position dialog relative to main frame.
 int showDialog()
          Deprecated. Makes the Dialog visible.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, isOpaque, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESET_OPTION

public static final int RESET_OPTION
Deprecated. 
Return value from class method if RESET is chosen.

See Also:
Constant Field Values

CANCEL_OPTION

public static final int CANCEL_OPTION
Deprecated. 
Return value from class method if CANCEL is chosen.

See Also:
Constant Field Values

CLOSE_OPTION

public static final int CLOSE_OPTION
Deprecated. 
Return value from class method if CLOSE is chosen.

See Also:
Constant Field Values

OK_OPTION

public static final int OK_OPTION
Deprecated. 
Return value from class method if OK is chosen.

See Also:
Constant Field Values

APPLY_OPTION

public static final int APPLY_OPTION
Deprecated. 
Return value from class method if APPLY is chosen.

See Also:
Constant Field Values

PREVIEW_OPTION

public static final int PREVIEW_OPTION
Deprecated. 
Return value from class method if PREVIEW is chosen.

See Also:
Constant Field Values

logger

protected static java.util.logging.Logger logger
Deprecated. 

NONE

protected static final int NONE
Deprecated. 
define different modi

See Also:
Constant Field Values

OK

protected static final int OK
Deprecated. 
define different modi

See Also:
Constant Field Values

OK_CANCEL

protected static final int OK_CANCEL
Deprecated. 
define different modi

See Also:
Constant Field Values

APPLY_CLOSE

protected static final int APPLY_CLOSE
Deprecated. 
define different modi

See Also:
Constant Field Values

APPLY_RESET_CLOSE

protected static final int APPLY_RESET_CLOSE
Deprecated. 
define different modi

See Also:
Constant Field Values

OK_PREVIEW_CANCEL

protected static final int OK_PREVIEW_CANCEL
Deprecated. 
define different modi

See Also:
Constant Field Values

buttonListener

protected com.intel.gui.dialogs.GenericDialog.ButtonListener buttonListener
Deprecated. 

okButton

protected javax.swing.JButton okButton
Deprecated. 
different dialog buttons are protected to allow e.g. tooltip setting from sub classes


cancelButton

protected javax.swing.JButton cancelButton
Deprecated. 
different dialog buttons are protected to allow e.g. tooltip setting from sub classes


applyButton

protected javax.swing.JButton applyButton
Deprecated. 
different dialog buttons are protected to allow e.g. tooltip setting from sub classes


resetButton

protected javax.swing.JButton resetButton
Deprecated. 
different dialog buttons are protected to allow e.g. tooltip setting from sub classes


closeButton

protected javax.swing.JButton closeButton
Deprecated. 
different dialog buttons are protected to allow e.g. tooltip setting from sub classes


previewButton

protected javax.swing.JButton previewButton
Deprecated. 
different dialog buttons are protected to allow e.g. tooltip setting from sub classes

Constructor Detail

GenericDialog

public GenericDialog(javax.swing.JFrame parent,
                     java.lang.String title,
                     boolean modal,
                     int type)
Deprecated. 
Constructor builds the components

Parameters:
title - dialog title
parent - dialog parent - important for modal dialogs
modal - true if dialog is modal
type - NONE, OK, OK_CANCEL, OK_APPLY_CANCEL, OK_RESET_CANCEL or OK_APPLY_RESET_CANCEL

GenericDialog

public GenericDialog(javax.swing.JDialog parent,
                     java.lang.String title,
                     boolean modal,
                     int type)
Deprecated. 
Method Detail

applyValues

protected abstract boolean applyValues()
Deprecated. 
Abstract method that is called each time the okButton is pressed, before the dialog is closed.

Returns:
true if dialog can be disposed

cancelValues

protected abstract boolean cancelValues()
Deprecated. 
Abstract method that is called each time the cancelButton is pressed, or the dialog is closed using the window handle.

Returns:
true if dialog can be disposed

resetValues

protected void resetValues()
Deprecated. 
Method that is called each time the resetButton is pressed, before the dialog is closed. This one is not declared as abstract, because only some dialogs use it.


setStatusMessage

public void setStatusMessage(java.lang.String text)
Deprecated. 
Modify text in status bar from outside

Parameters:
text - new status message

setStatusMessage

public void setStatusMessage(java.lang.String text,
                             java.awt.Color foregnColor)
Deprecated. 
Modify text in status bar from outside

Parameters:
text - new status message
color - color of the message

setVisible

public void setVisible(boolean visible)
Deprecated. 
Overwrite show method to make okButton the default one and to position dialog relative to main frame.

Overrides:
setVisible in class java.awt.Component

showDialog

public int showDialog()
Deprecated. 
Makes the Dialog visible.

Returns:
an integer indicating the option chosen by the user


Copyright © 2008. All Rights Reserved.