org.tentackle.ui
Class FormDialog

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 org.tentackle.ui.FormDialog
All Implemented Interfaces:
ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, FormContainer, FormWindow
Direct Known Subclasses:
AboutDialog, AppDbCursorProgressDialog, AppDbObjectDialog, AppDbObjectNaviDialog, AppDbObjectSearchDialog, CancelSaveDiscardDialog, FormCalendarDialog, FormError, FormInfo, FormQuestion, FormTelnoDialog, HistoryTableDialog, LoginDialog, PasswordDialog, SearchTextDialog, SecurityDialog, WorkerDialog

public class FormDialog
extends JDialog
implements FormWindow, ContainerListener

Extended JDialog implementing FormWindow (and FormContainer).

Author:
harald
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
FormDialog()
          Creates a modeless FormDialog without a title and without a specified owner.
FormDialog(boolean modal)
          Creates a FormDialog without a title and without owner with a given modality.
FormDialog(Window owner)
          Creates a modeless dialog with an owner Window but without a title.
FormDialog(Window owner, boolean modal)
          Creates a dialog without owner, with the specified title and modality.
FormDialog(Window owner, String title, boolean modal)
          Creates a dialog with the specified title, owner Window and modality.
FormDialog(Window owner, String title, Dialog.ModalityType modalityType)
          Creates a dialog with the specified title, owner Window and modality.
 
Method Summary
 void addFormWrapListener(FormWrapListener l)
          Adss a wrap listener which will be invoked whenever the focus wraps in this window, i.e.
 void alignLocation()
          Aligns the location of this window in order not to cover other windows (best as possible).
 boolean areValuesChanged()
          Checks whether the contents of some components in this or sub containers have changed since the last savepoint.
 boolean checkAutoClose()
          Checks if window should be autoclosed.
 void componentAdded(ContainerEvent e)
          Invoked when a component has been added to the container.
 void componentRemoved(ContainerEvent e)
          Invoked when a component has been removed from the container.
 void fireFormWrappedFocus(FormWrapEvent evt)
          Fires all form wrap listeners for this window.
 long getAutoClose()
          Gets the autoclose timeout.
 void getFormValues()
          Retrieves the values from all components in this container and all sub containers.
Used to update the data from the view according to the data binding.
 String getHelpURL()
          Gets the online-help URL.
 boolean getKeepChangedValues()
          Gets the behaviour for setFormValues().
 Window getParentWindow()
          Gets the parent window.
 FormWindow getRelatedWindow()
          Gets the related window.
Falls back to getOwner() if not set and owner is a formwindow.
 long getTimeOfLastValuesChanged()
          Gets the system-time of last setFormValues() or triggerValuesChanged() for this window in milliseconds.
 TooltipDisplay getTooltipDisplay()
          Gets the tooltip display for this window.
 int getUIVersion()
          Gets the look and feel version for this window.
 void invalidateParentInfo()
          Invalidates all container-relevant (cached) information for the hierarchy of this container's parents.
For optimization purposes.
 boolean isAllChangeable()
          Returns whether this container has the all-changeable attribute set.
 boolean isAutoCloseable()
          Returns whether this window is a candidate for autoClose-monitoring.
 boolean isAutoPosition()
          Returns whether auto position is enabled.
 boolean isHonourAllChangeable()
          Returns whether the container should honour the allChangeable attribute.
 void pack()
          Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
 void paint(Graphics g)
          Paints the container.
protected  void processWindowEvent(WindowEvent e)
          Handles window events depending on the state of the defaultCloseOperation property.
 void removeFormWrapListener(FormWrapListener l)
          Removes a form wrap listener.
 void saveValues()
          Sets a savepoint for all components in this container and all sub containers.
 void setAllChangeable(boolean allChangeable)
          Sets the changeable attribute of all components of this container and all sub containers.
 void setAutoClose(long autoClose)
          Set a timer to close the window automatically.
FormContainers use this feature to close after a certain time of inactivity and unchanged data.
Note: autoClosing must be set before displaying the window (just like setModal()).
 void setAutoPosition(boolean flag)
          Sets the autoposition feature.
Windows with this autoposition enabled will place themselves in a nice manner on the screen when displayed initially.
 void setFormValues()
          Sets the values in all form components in this container and all sub containers.
Used to update the view from the data according to the data binding.
 void setFormValuesKeepChanged()
          Sets the values in all unchanged form components in this container and all sub containers.
All changed components are left untouched.
 void setHelpURL(String helpURL)
          Sets the online-help URL.
If a help url is set for this container, a browser will be launched to show that url if there is no help url for the component the help was requested for.
 void setHonourAllChangeable(boolean flag)
          Sets whether the container should honour the allChangeable attribute.
 void setKeepChangedValues(boolean keepChanged)
          Sets the behaviour of setFormValues() of FormContainers in this FormWindow.
 void setRelatedWindow(FormWindow relatedWindow)
          Sets the related FormWindow.
Related windows are somewhat similar to Owners, but they don't change fg/bg-behaviour of the window-manager.
 void setTimeOfLastValuesChanged(long millis)
          Sets the system-time of last setFormValues() or triggerValuesChanged() for this window in milliseconds.
 void setTooltipDisplay(TooltipDisplay display)
          Sets the tooltip display for this window.
If a tooltip display is set the component's tooltips will be displayed for each component receiving the keyboard focus (instead of popping up on mouse hover).
 void setUIVersion(int version)
          Sets a version number for the current look and feel of this window.
 void showHelp()
          Displays online help for this container.
 void triggerValuesChanged()
          Signals that values in the components of the container may have changed.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, 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, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tentackle.ui.FormContainer
getTitle, setTitle
 

Constructor Detail

FormDialog

public FormDialog(Window owner,
                  String title,
                  Dialog.ModalityType modalityType)
Creates a dialog with the specified title, owner Window and modality.

Parameters:
owner - the Window from which the dialog is displayed or null if this dialog has no owner
title - the String to display in the dialog's title bar or null if the dialog has no title
modalityType - specifies whether dialog blocks input to other windows when shown. null value and unsupported modality types are equivalent to MODELESS
See Also:
JDialog.JDialog(java.awt.Window, java.lang.String, java.awt.Dialog.ModalityType)

FormDialog

public FormDialog(Window owner,
                  String title,
                  boolean modal)
Creates a dialog with the specified title, owner Window and modality.

Parameters:
owner - the Window from which the dialog is displayed or null if this dialog has no owner
title - the String to display in the dialog's title bar or null if the dialog has no title
modal - specifies whether dialog blocks user input to other top-level windows when shown. If true, the modality type property is set to DEFAULT_MODALITY_TYPE otherwise the dialog is modeless

FormDialog

public FormDialog(Window owner,
                  boolean modal)
Creates a dialog without owner, with the specified title and modality.

Parameters:
owner - the Window from which the dialog is displayed or null if this dialog has no owner
modal - specifies whether dialog blocks user input to other top-level windows when shown. If true, the modality type property is set to DEFAULT_MODALITY_TYPE otherwise the dialog is modeless

FormDialog

public FormDialog(Window owner)
Creates a modeless dialog with an owner Window but without a title.

Parameters:
owner - the Window from which the dialog is displayed or null if this dialog has no owner

FormDialog

public FormDialog(boolean modal)
Creates a FormDialog without a title and without owner with a given modality.

Parameters:
modal - specifies whether dialog blocks user input to other top-level windows when shown. If true, the modality type property is set to DEFAULT_MODALITY_TYPE otherwise the dialog is modeless
See Also:
JDialog.JDialog()

FormDialog

public FormDialog()
Creates a modeless FormDialog without a title and without a specified owner.

See Also:
JDialog.JDialog()
Method Detail

processWindowEvent

protected void processWindowEvent(WindowEvent e)
Handles window events depending on the state of the defaultCloseOperation property.

Overridden to allow FormHelper keeping track of windows

Overrides:
processWindowEvent in class JDialog
Parameters:
e - the window event
See Also:
JDialog.setDefaultCloseOperation(int)

pack

public void pack()
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the window and/or its owner are not yet displayable, both are made displayable before calculating the preferred size. The Window will be validated after the preferredSize is calculated.

Overridden to autolocate window if possible.

Overrides:
pack in class Window
See Also:
Component.isDisplayable()

paint

public void paint(Graphics g)
Paints the container. This forwards the paint to any lightweight components that are children of this container. If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.

Overridden in order to bring modal windows to front in case accidently covered by another window. This is the case whenever a modal dialog is not owned by the window covering it. It solves the problem of visually "freezing" an application because the user clicked on another window.

Overrides:
paint in class Container
Parameters:
g - the specified Graphics window
See Also:
Component.update(Graphics)

componentAdded

public void componentAdded(ContainerEvent e)
Description copied from interface: java.awt.event.ContainerListener
Invoked when a component has been added to the container.

Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Description copied from interface: java.awt.event.ContainerListener
Invoked when a component has been removed from the container.

Specified by:
componentRemoved in interface ContainerListener

getParentWindow

public Window getParentWindow()
Description copied from interface: FormContainer
Gets the parent window.

Specified by:
getParentWindow in interface FormContainer
Returns:
the parent window, null if none

invalidateParentInfo

public void invalidateParentInfo()
Description copied from interface: FormContainer
Invalidates all container-relevant (cached) information for the hierarchy of this container's parents.
For optimization purposes.

Specified by:
invalidateParentInfo in interface FormContainer

setFormValues

public void setFormValues()
Description copied from interface: FormContainer
Sets the values in all form components in this container and all sub containers.
Used to update the view from the data according to the data binding.

Specified by:
setFormValues in interface FormContainer

setFormValuesKeepChanged

public void setFormValuesKeepChanged()
Description copied from interface: FormContainer
Sets the values in all unchanged form components in this container and all sub containers.
All changed components are left untouched.

Specified by:
setFormValuesKeepChanged in interface FormContainer
See Also:
FormComponent.isValueChanged()

getFormValues

public void getFormValues()
Description copied from interface: FormContainer
Retrieves the values from all components in this container and all sub containers.
Used to update the data from the view according to the data binding.

Specified by:
getFormValues in interface FormContainer

saveValues

public void saveValues()
Description copied from interface: FormContainer
Sets a savepoint for all components in this container and all sub containers.

Specified by:
saveValues in interface FormContainer
See Also:
FormComponent.saveValue()

areValuesChanged

public boolean areValuesChanged()
Description copied from interface: FormContainer
Checks whether the contents of some components in this or sub containers have changed since the last savepoint.

Specified by:
areValuesChanged in interface FormContainer
Returns:
true if changed

triggerValuesChanged

public void triggerValuesChanged()
Description copied from interface: FormContainer
Signals that values in the components of the container may have changed. The container typically uses that to invoke areValuesChanged() and enabling/disabling a button (e.g. "save", see AppDbObjectDialog).

Specified by:
triggerValuesChanged in interface FormContainer

getTimeOfLastValuesChanged

public long getTimeOfLastValuesChanged()
Description copied from interface: FormWindow
Gets the system-time of last setFormValues() or triggerValuesChanged() for this window in milliseconds.

Specified by:
getTimeOfLastValuesChanged in interface FormWindow
Returns:
the time of last values changed

setTimeOfLastValuesChanged

public void setTimeOfLastValuesChanged(long millis)
Description copied from interface: FormWindow
Sets the system-time of last setFormValues() or triggerValuesChanged() for this window in milliseconds.

Specified by:
setTimeOfLastValuesChanged in interface FormWindow
Parameters:
millis - the time of last values changed

setAllChangeable

public void setAllChangeable(boolean allChangeable)
Description copied from interface: FormContainer
Sets the changeable attribute of all components of this container and all sub containers.

Specified by:
setAllChangeable in interface FormContainer
Parameters:
allChangeable - true if all changeable (default)

isAllChangeable

public boolean isAllChangeable()
Description copied from interface: FormContainer
Returns whether this container has the all-changeable attribute set.

Specified by:
isAllChangeable in interface FormContainer
Returns:
true if all changeable (default)

setHelpURL

public void setHelpURL(String helpURL)
Description copied from interface: FormContainer
Sets the online-help URL.
If a help url is set for this container, a browser will be launched to show that url if there is no help url for the component the help was requested for.

Specified by:
setHelpURL in interface FormContainer
Parameters:
helpURL - the help url
See Also:
FormHelper.openHelpURL(Component)

getHelpURL

public String getHelpURL()
Description copied from interface: FormContainer
Gets the online-help URL.

Specified by:
getHelpURL in interface FormContainer
Returns:
the help url, default is null

showHelp

public void showHelp()
Description copied from interface: FormContainer
Displays online help for this container.

Specified by:
showHelp in interface FormContainer

setHonourAllChangeable

public void setHonourAllChangeable(boolean flag)
Description copied from interface: FormContainer
Sets whether the container should honour the allChangeable attribute.

Specified by:
setHonourAllChangeable in interface FormContainer
Parameters:
flag - true to honour allchangeable (default)

isHonourAllChangeable

public boolean isHonourAllChangeable()
Description copied from interface: FormContainer
Returns whether the container should honour the allChangeable attribute.

Specified by:
isHonourAllChangeable in interface FormContainer
Returns:
true if honour allchangeable (default)

setRelatedWindow

public void setRelatedWindow(FormWindow relatedWindow)
Description copied from interface: FormWindow
Sets the related FormWindow.
Related windows are somewhat similar to Owners, but they don't change fg/bg-behaviour of the window-manager. In Swing you can't assign an Owner without forcing its childs to always stay in front of the owning window. Furthermore, some windows don't support Owners, such as Frames. The related window is just a link that will default to the owner but can be set to any other window.

Specified by:
setRelatedWindow in interface FormWindow
Parameters:
relatedWindow - the related FormWindow

getRelatedWindow

public FormWindow getRelatedWindow()
Description copied from interface: FormWindow
Gets the related window.
Falls back to getOwner() if not set and owner is a formwindow.

Specified by:
getRelatedWindow in interface FormWindow
Returns:
the related window, the owner of null if not a FormWindow.

getUIVersion

public int getUIVersion()
Description copied from interface: FormWindow
Gets the look and feel version for this window.

Specified by:
getUIVersion in interface FormWindow
Returns:
the look and feel version

setUIVersion

public void setUIVersion(int version)
Description copied from interface: FormWindow
Sets a version number for the current look and feel of this window. Allows to track LookAndFeel changes and automatically update UI if changed.

Specified by:
setUIVersion in interface FormWindow
Parameters:
version - the n-th look and feel version

setTooltipDisplay

public void setTooltipDisplay(TooltipDisplay display)
Description copied from interface: FormWindow
Sets the tooltip display for this window.
If a tooltip display is set the component's tooltips will be displayed for each component receiving the keyboard focus (instead of popping up on mouse hover).

Specified by:
setTooltipDisplay in interface FormWindow
Parameters:
display - the tooltip display, null = none (default)

getTooltipDisplay

public TooltipDisplay getTooltipDisplay()
Description copied from interface: FormWindow
Gets the tooltip display for this window.

Specified by:
getTooltipDisplay in interface FormWindow
Returns:
the tooltip display, null = none (default)

addFormWrapListener

public void addFormWrapListener(FormWrapListener l)
Description copied from interface: FormWindow
Adss a wrap listener which will be invoked whenever the focus wraps in this window, i.e. from the logically last field to the logically first.

Specified by:
addFormWrapListener in interface FormWindow
Parameters:
l - the form wrap listener
See Also:
FormFocusTraversalPolicy

removeFormWrapListener

public void removeFormWrapListener(FormWrapListener l)
Description copied from interface: FormWindow
Removes a form wrap listener.

Specified by:
removeFormWrapListener in interface FormWindow
Parameters:
l - the listener to remove

fireFormWrappedFocus

public void fireFormWrappedFocus(FormWrapEvent evt)
Description copied from interface: FormWindow
Fires all form wrap listeners for this window.

Specified by:
fireFormWrappedFocus in interface FormWindow
Parameters:
evt - the form wrap event

setAutoPosition

public void setAutoPosition(boolean flag)
Description copied from interface: FormWindow
Sets the autoposition feature.
Windows with this autoposition enabled will place themselves in a nice manner on the screen when displayed initially.

Specified by:
setAutoPosition in interface FormWindow
Parameters:
flag - true to enable autoposition, false if not (default)

isAutoPosition

public boolean isAutoPosition()
Description copied from interface: FormWindow
Returns whether auto position is enabled.

Specified by:
isAutoPosition in interface FormWindow
Returns:
true if autoposition is enabled

alignLocation

public void alignLocation()
Description copied from interface: FormWindow
Aligns the location of this window in order not to cover other windows (best as possible).

Specified by:
alignLocation in interface FormWindow

setAutoClose

public void setAutoClose(long autoClose)
Description copied from interface: FormWindow
Set a timer to close the window automatically.
FormContainers use this feature to close after a certain time of inactivity and unchanged data.
Note: autoClosing must be set before displaying the window (just like setModal()).

Specified by:
setAutoClose in interface FormWindow
Parameters:
autoClose - the time in milliseconds, 0 = no autoclose

getAutoClose

public long getAutoClose()
Description copied from interface: FormWindow
Gets the autoclose timeout.

Specified by:
getAutoClose in interface FormWindow
Returns:
the time in milliseconds, 0 = no autoclose

isAutoCloseable

public boolean isAutoCloseable()
Returns whether this window is a candidate for autoClose-monitoring. The method is invoked when displaying the window.

Modal dialogs are not autoCloseable().

Specified by:
isAutoCloseable in interface FormWindow
Returns:
true if window should be monitored by the autoclose-thread

checkAutoClose

public boolean checkAutoClose()
Checks if window should be autoclosed.

The default implementation returns true if the window is isAutoCloseable(), isVisible(), the time since the last change has elapsed and the formvalues were not changed.

Specified by:
checkAutoClose in interface FormWindow
Returns:
true if window can safely be closed due to autoclosing-rules.

setKeepChangedValues

public void setKeepChangedValues(boolean keepChanged)
Description copied from interface: FormWindow
Sets the behaviour of setFormValues() of FormContainers in this FormWindow.

Specified by:
setKeepChangedValues in interface FormWindow
Parameters:
keepChanged - true if setFormValues() should NOT override values changed by the user. The default is false.

getKeepChangedValues

public boolean getKeepChangedValues()
Description copied from interface: FormWindow
Gets the behaviour for setFormValues().

Specified by:
getKeepChangedValues in interface FormWindow
Returns:
true if keep changed values


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de