de.uni_paderborn.fujaba.gui.comp
Class FujabaDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended byde.uni_paderborn.fujaba.gui.comp.FujabaDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ComponentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
Direct Known Subclasses:
AddToPackageDiagramDialog, EditAssocDialog, EditClassDiagDialog, EditCollabStatDialog, EditCommentDialog, EditImportDialog, EditNameAndConstraintsDialog, FilterEditorDialog, ProjectDialog, RepairProjectDialog, SmallFilterEditorDialog, ViewDefinitionDialog, XSLTransformerDialog

public class FujabaDialog
extends javax.swing.JDialog
implements java.awt.event.ComponentListener

The FujabaDialog-class should be the main class for all dialogs, which are used in the fujaba-project. This class provides some usefull functions like unparseTo, parseTo, and so on.

Version:
$Revision: 1.24.2.2 $
Author:
$Author: fklar $
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
          the dialog was closed by the Cancel-button
static int CLOSE
          the dialog was closed by the Close-button
static int NO
          the dialog was closed by a not known button
static int OK
          the dialog was closed by the OK-button
 
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
FujabaDialog(java.awt.Dialog dialog, java.lang.String title, boolean modal)
           
FujabaDialog(javax.swing.JFrame frame)
           
FujabaDialog(javax.swing.JFrame frame, java.lang.String title, boolean modal)
           
 
Method Summary
 void actionCancelButton()
          this function is called if the cancel-button is pressed
 void actionCloseButton()
          this function is called if the close-button is pressed
 void actionHelpButton()
          this function is called if the help-button is pressed
 void actionOkButton()
          this function is called if the Ok-button is pressed
 void componentHidden(java.awt.event.ComponentEvent e)
          No comment provided by developer, please add a comment to improve documentation.
 void componentMoved(java.awt.event.ComponentEvent e)
          No comment provided by developer, please add a comment to improve documentation.
 void componentResized(java.awt.event.ComponentEvent e)
          No comment provided by developer, please add a comment to improve documentation.
 void componentShown(java.awt.event.ComponentEvent e)
          No comment provided by developer, please add a comment to improve documentation.
 javax.swing.JButton getButtonCancel()
          Get the buttonCancel attribute of the FujabaDialog object
 javax.swing.JButton getButtonClose()
          Get the buttonClose attribute of the FujabaDialog object
 javax.swing.JButton getButtonHelp()
          Get the buttonHelp attribute of the FujabaDialog object
 javax.swing.JButton getButtonOk()
          Get the buttonOk attribute of the FujabaDialog object
 javax.swing.JFrame getParentFrame()
           
 int getPressedButton()
          use this function to get the button which closed the dialog
 void guiBuild()
          this function builds the gui and should be called from the constructor
 javax.swing.JPanel guiPanelCloseHelp()
          this function returns a JPanel with the buttons close and help
 javax.swing.JPanel guiPanelOkCancelHelp()
          this function returns a JPanel with the buttons Ok, Cancel and Help.
 javax.swing.JPanel makeLabeledPanel(java.lang.String text, javax.swing.JComponent component, int alignment)
           
 void parse()
          parse the dialog data and update the UML-AST-Data
 void showCentered()
          call this function to show the dialog in the center of the current screen
 void unparse()
          parse the UML-AST-Data and filles this 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

NO

public static final int NO
the dialog was closed by a not known button

See Also:
Constant Field Values

OK

public static final int OK
the dialog was closed by the OK-button

See Also:
Constant Field Values

CANCEL

public static final int CANCEL
the dialog was closed by the Cancel-button

See Also:
Constant Field Values

CLOSE

public static final int CLOSE
the dialog was closed by the Close-button

See Also:
Constant Field Values
Constructor Detail

FujabaDialog

public FujabaDialog(javax.swing.JFrame frame)
Parameters:
frame - the frame of the parent window

FujabaDialog

public FujabaDialog(javax.swing.JFrame frame,
                    java.lang.String title,
                    boolean modal)
Parameters:
frame - the frame of the parent window
title - a string which should be the title of the dialog
modal - true for a modal dialog, false for one that allows others windows to be active at the same time

FujabaDialog

public FujabaDialog(java.awt.Dialog dialog,
                    java.lang.String title,
                    boolean modal)
Parameters:
dialog - the parent dialog
title - a string which should be the title of the dialog
modal - true for a modal dialog, false for one that allows others windows to be active at the same time
Method Detail

getPressedButton

public int getPressedButton()
use this function to get the button which closed the dialog

Returns:
the button number from the button which closes the dialog
See Also:
NO, OK, CANCEL, #pressedButton

getParentFrame

public javax.swing.JFrame getParentFrame()
Returns:
The parentFrame value
See Also:
#parentFrame

guiBuild

public void guiBuild()
this function builds the gui and should be called from the constructor


getButtonOk

public javax.swing.JButton getButtonOk()
Get the buttonOk attribute of the FujabaDialog object

Returns:
The buttonOk value

getButtonCancel

public javax.swing.JButton getButtonCancel()
Get the buttonCancel attribute of the FujabaDialog object

Returns:
The buttonCancel value

getButtonHelp

public javax.swing.JButton getButtonHelp()
Get the buttonHelp attribute of the FujabaDialog object

Returns:
The buttonHelp value

guiPanelOkCancelHelp

public final javax.swing.JPanel guiPanelOkCancelHelp()
this function returns a JPanel with the buttons Ok, Cancel and Help.

Returns:
No description provided

actionOkButton

public void actionOkButton()
this function is called if the Ok-button is pressed


actionCancelButton

public void actionCancelButton()
this function is called if the cancel-button is pressed


actionHelpButton

public void actionHelpButton()
this function is called if the help-button is pressed


getButtonClose

public javax.swing.JButton getButtonClose()
Get the buttonClose attribute of the FujabaDialog object

Returns:
The buttonClose value

guiPanelCloseHelp

public final javax.swing.JPanel guiPanelCloseHelp()
this function returns a JPanel with the buttons close and help

Returns:
No description provided

actionCloseButton

public void actionCloseButton()
this function is called if the close-button is pressed


showCentered

public void showCentered()
call this function to show the dialog in the center of the current screen


unparse

public void unparse()
parse the UML-AST-Data and filles this dialog


parse

public void parse()
parse the dialog data and update the UML-AST-Data


componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
componentHidden in interface java.awt.event.ComponentListener
Parameters:
e - No description provided

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
componentMoved in interface java.awt.event.ComponentListener
Parameters:
e - No description provided

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
componentResized in interface java.awt.event.ComponentListener
Parameters:
e - No description provided

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
No comment provided by developer, please add a comment to improve documentation.

Specified by:
componentShown in interface java.awt.event.ComponentListener
Parameters:
e - No description provided

makeLabeledPanel

public javax.swing.JPanel makeLabeledPanel(java.lang.String text,
                                           javax.swing.JComponent component,
                                           int alignment)
Parameters:
text - the text of the label
component - the compenete which should be labeled
alignment - where to put the label: SwingConstants.LEFT , SwingConstants.CENTER or SwingConstants.RIGHT
Returns:
a labeled JPanel