org.tentackle.ui
Interface FormWindow

All Superinterfaces:
FormContainer
All Known Implementing Classes:
AboutDialog, AppDbCursorProgressDialog, AppDbObjectDialog, AppDbObjectNaviDialog, AppDbObjectSearchDialog, CancelSaveDiscardDialog, FormCalendarDialog, FormDialog, FormError, FormFrame, FormInfo, FormQuestion, FormTelnoDialog, HistoryTableDialog, LoginDialog, PasswordDialog, SearchTextDialog, SecurityDialog, WorkerDialog

public interface FormWindow
extends FormContainer

All Tentackle windows (top level container) must implement this interface.
Adds features like auto positioning, related window, form wrapping, autoclose, etc...

Author:
harald

Method Summary
 void addFormWrapListener(FormWrapListener listener)
          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 checkAutoClose()
          Checks if window should be autoclosed.
 void fireFormWrappedFocus(FormWrapEvent evt)
          Fires all form wrap listeners for this window.
 long getAutoClose()
          Gets the autoclose timeout.
 boolean getKeepChangedValues()
          Gets the behaviour for setFormValues().
 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.
 boolean isAutoCloseable()
          Returns whether this window is a candidate for autoClose-monitoring.
 boolean isAutoPosition()
          Returns whether auto position is enabled.
 void removeFormWrapListener(FormWrapListener listener)
          Removes a form wrap listener.
 void setAutoClose(long timeout)
          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 autoPosition)
          Sets the autoposition feature.
Windows with this autoposition enabled will place themselves in a nice manner on the screen when displayed initially.
 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 tooltipDisplay)
          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.
 
Methods inherited from interface org.tentackle.ui.FormContainer
areValuesChanged, getFormValues, getHelpURL, getParentWindow, getTitle, invalidateParentInfo, isAllChangeable, isHonourAllChangeable, saveValues, setAllChangeable, setFormValues, setFormValuesKeepChanged, setHelpURL, setHonourAllChangeable, setTitle, showHelp, triggerValuesChanged
 

Method Detail

setRelatedWindow

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. 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.

Parameters:
relatedWindow - the related FormWindow

getRelatedWindow

FormWindow getRelatedWindow()
Gets the related window.
Falls back to getOwner() if not set and owner is a formwindow.

Returns:
the related window, the owner of null if not a FormWindow.

setAutoPosition

void setAutoPosition(boolean autoPosition)
Sets the autoposition feature.
Windows with this autoposition enabled will place themselves in a nice manner on the screen when displayed initially.

Parameters:
autoPosition - true to enable autoposition, false if not (default)

isAutoPosition

boolean isAutoPosition()
Returns whether auto position is enabled.

Returns:
true if autoposition is enabled

addFormWrapListener

void addFormWrapListener(FormWrapListener listener)
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.

Parameters:
listener - the form wrap listener
See Also:
FormFocusTraversalPolicy

removeFormWrapListener

void removeFormWrapListener(FormWrapListener listener)
Removes a form wrap listener.

Parameters:
listener - the listener to remove

fireFormWrappedFocus

void fireFormWrappedFocus(FormWrapEvent evt)
Fires all form wrap listeners for this window.

Parameters:
evt - the form wrap event

setUIVersion

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

Parameters:
version - the n-th look and feel version

getUIVersion

int getUIVersion()
Gets the look and feel version for this window.

Returns:
the look and feel version

setTooltipDisplay

void setTooltipDisplay(TooltipDisplay tooltipDisplay)
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).

Parameters:
tooltipDisplay - the tooltip display, null = none (default)

getTooltipDisplay

TooltipDisplay getTooltipDisplay()
Gets the tooltip display for this window.

Returns:
the tooltip display, null = none (default)

setKeepChangedValues

void setKeepChangedValues(boolean keepChanged)
Sets the behaviour of setFormValues() of FormContainers in this FormWindow.

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

getKeepChangedValues

boolean getKeepChangedValues()
Gets the behaviour for setFormValues().

Returns:
true if keep changed values

alignLocation

void alignLocation()
Aligns the location of this window in order not to cover other windows (best as possible).


setAutoClose

void setAutoClose(long timeout)
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()).

Parameters:
timeout - the time in milliseconds, 0 = no autoclose

getAutoClose

long getAutoClose()
Gets the autoclose timeout.

Returns:
the time in milliseconds, 0 = no autoclose

isAutoCloseable

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

Returns:
true if window should be monitored by the autoclose-thread

checkAutoClose

boolean checkAutoClose()
Checks if window should be autoclosed.

Returns:
true if window can safely be closed due to autoclosing-rules.

setTimeOfLastValuesChanged

void setTimeOfLastValuesChanged(long millis)
Sets the system-time of last setFormValues() or triggerValuesChanged() for this window in milliseconds.

Parameters:
millis - the time of last values changed

getTimeOfLastValuesChanged

long getTimeOfLastValuesChanged()
Gets the system-time of last setFormValues() or triggerValuesChanged() for this window in milliseconds.

Returns:
the time of last values changed


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