reservation
Class CustomDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended byreservation.CustomDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, Mode, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class CustomDialog
extends javax.swing.JDialog
implements Mode

This class hold CustomDialog structure. This object analyse the instruction written by the user and determine according to the first element the command to execute. Then it instancie a new object which depends to the command and which will execute the instruction of the user. The new object instantiated create a new window corresponding to the command to execute.

Author:
Texier Mathieu and Frederic Bidon
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int CANCEL
          Integer defining the command CANCEL.
static int CREATE
          Integer defining the command CREATE.
static int FLIGHTS
          Integer defining the command FLIGHTS.
static int READ_COMMAND
          Integer defining the command READ_COMMAND.
static int RELOAD
          Integer defining the command RELOAD.
static int RESERVE
          Integer defining the command RESERVE.
static int SELECT
          Integer defining the command SELECT.
static int STORE
          Integer defining the command STORE.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface reservation.Mode
DEBUG, HIGH, NORMAL, QUIET
 
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
CustomDialog()
          Create a new instance with the level of verbosity QUIET
CustomDialog(CustomDialog owner, boolean modal, java.lang.String title, int command)
          This method determine the number of element of the user's instruction and analyse the first element of this one.
CustomDialog(int verboseMode)
          Create a new instance of CustomDialog
 
Method Summary
static void alert(java.lang.Exception exception)
          Open a new window to specify the produced error by the user.
static void alert(java.lang.String info)
          Open a new dialog window to give more informations to the user.
 java.lang.String getRetValue()
          This method allows to access the private string retValue.
 void process()
          This method create a new dialog window according to the selected command.
protected  void quit()
          Hide the dialog
 
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, dispose, 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, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, 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, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, 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, isOpaque, 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, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RELOAD

public static final int RELOAD
Integer defining the command RELOAD.

See Also:
Constant Field Values

READ_COMMAND

public static final int READ_COMMAND
Integer defining the command READ_COMMAND.

See Also:
Constant Field Values

CREATE

public static final int CREATE
Integer defining the command CREATE.

See Also:
Constant Field Values

STORE

public static final int STORE
Integer defining the command STORE.

See Also:
Constant Field Values

RESERVE

public static final int RESERVE
Integer defining the command RESERVE.

See Also:
Constant Field Values

FLIGHTS

public static final int FLIGHTS
Integer defining the command FLIGHTS.

See Also:
Constant Field Values

CANCEL

public static final int CANCEL
Integer defining the command CANCEL.

See Also:
Constant Field Values

SELECT

public static final int SELECT
Integer defining the command SELECT.

See Also:
Constant Field Values
Constructor Detail

CustomDialog

public CustomDialog()
Create a new instance with the level of verbosity QUIET


CustomDialog

public CustomDialog(int verboseMode)
Create a new instance of CustomDialog

Parameters:
verboseMode - Integer defining the level of verbosity to execute the program.

CustomDialog

public CustomDialog(CustomDialog owner,
                    boolean modal,
                    java.lang.String title,
                    int command)
This method determine the number of element of the user's instruction and analyse the first element of this one. If it corresponds to an available command of the system, it create a new object depending of the command. This new object will execute the instruction with the other elements of the command.

Parameters:
owner - Dilog or frame from which the CustomDialog is issue
modal - Modal mode
title - The title of the window
command - The identifier of the command (RELOAD, CREATE, CANCEL ...)
Method Detail

process

public void process()
This method create a new dialog window according to the selected command.

Specified by:
process in interface Mode

getRetValue

public java.lang.String getRetValue()
This method allows to access the private string retValue.

Returns:
the string retValue.

alert

public static void alert(java.lang.Exception exception)
Open a new window to specify the produced error by the user.

Parameters:
exception - The message that will be displayed in the message box

alert

public static void alert(java.lang.String info)
Open a new dialog window to give more informations to the user.

Parameters:
info - The message that will be displayed in the message box

quit

protected void quit()
Hide the dialog