HEADER

com.developmentontheedge.application.dialog
Class OkCancelDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--com.developmentontheedge.application.dialog.OkCancelDialog
Direct Known Subclasses:
AskIDDialog, CreateReactionDialog, MatlabErrorDialog, ModuleExportDialog, ModuleInfoDialog, ModuleReplaceDialog, ModulesActivatingDialog, StatusInfoDialog, NewDiagramDialog, NewDiagramElementDialog, GenerateHTMLDialog, GeneNetModuleSetupDialog, TranspathModuleSetupDialog

public class OkCancelDialog
extends JDialog

Use this class for dialog with "Ok" and "Cancel" buttons


Inner classes inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog

Inner classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog

Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent

Field Summary
 static intERROR
           
 static intSUCCESS
           

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
OkCancelDialog(JFrame frame, String title)
          Constructs dialog with parent frame,title and user component
OkCancelDialog(JFrame frame, String title, boolean modal)
           
OkCancelDialog(JDialog dialog, String title)
           
OkCancelDialog(JFrame frame, String title, Component userPane, String cancelText, String okText)
           
OkCancelDialog(JFrame frame, String title, Component userPane)
           
OkCancelDialog(JDialog dialog, String title, Component userPane)
          Constructs dialog with parent dialog, title and user component
OkCancelDialog(JFrame frame, String title, Component userPane, boolean modal)
          Constructs dialog with parent frame,title and user component

Method Summary
 booleandoModal()
          Displays modal dialog on screen.
 JButtongetCancelButton()
           
 JButtongetOkButton()
           
 voidsetContent(Component comp)
          Sets user Component in work area.

Methods inherited from class javax.swing.JDialog
setDefaultCloseOperation, getDefaultCloseOperation, update, setJMenuBar, getJMenuBar, remove, setLayout, getRootPane, getContentPane, setContentPane, getLayeredPane, setLayeredPane, getGlassPane, setGlassPane, setLocationRelativeTo, getAccessibleContext

Methods inherited from class java.awt.Dialog
addNotify, isModal, setModal, getTitle, setTitle, show, hide, dispose, isResizable, setResizable

Methods inherited from class java.awt.Window
pack, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, removeAll, getLayout, doLayout, layout, invalidate, validate, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, print, paintComponents, printComponents, addContainerListener, removeContainerListener, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, removeNotify, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, remove, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Field Detail

ERROR

public static int ERROR

SUCCESS

public static int SUCCESS
Constructor Detail

OkCancelDialog

public OkCancelDialog(JFrame frame, String title)
Constructs dialog with parent frame,title and user component
Parameters:
frame - the JFrame from which the dialog is displayed
title - the String to display in the dialog's title bar

OkCancelDialog

public OkCancelDialog(JFrame frame, String title, boolean modal)

OkCancelDialog

public OkCancelDialog(JDialog dialog, String title)

OkCancelDialog

public OkCancelDialog(JFrame frame, String title, Component userPane, String cancelText, String okText)

OkCancelDialog

public OkCancelDialog(JFrame frame, String title, Component userPane)

OkCancelDialog

public OkCancelDialog(JDialog dialog, String title, Component userPane)
Constructs dialog with parent dialog, title and user component
Parameters:
dialog - the JDialog from which the dialog is displayed
title - the String to display in the dialog's title bar
userPane - user Component in work area of OkCancelDialog

OkCancelDialog

public OkCancelDialog(JFrame frame, String title, Component userPane, boolean modal)
Constructs dialog with parent frame,title and user component
Parameters:
frame - the JFrame from which the dialog is displayed
title - the String to display in the dialog's title bar
userPane - user Component in work area of OkCancelDialog
Method Detail

doModal

public boolean doModal()
Displays modal dialog on screen.
Returns: true if "Ok" button is pressed

getCancelButton

public JButton getCancelButton()

getOkButton

public JButton getOkButton()

setContent

public void setContent(Component comp)
Sets user Component in work area.
Parameters:
comp - user Component

Association Links

to Class javax.swing.JPanel

to Class javax.swing.JPanel

to Class javax.swing.JButton

"Ok" button

to Class javax.swing.JButton

"Cancel" button

FOOTER

BOTTOM