com.alee.laf.rootpane
Class WebDialog

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 com.alee.laf.rootpane.WebDialog
All Implemented Interfaces:
LanguageContainerMethods, LanguageMethods, SettingsMethods, SwingMethods, WindowMethods<WebDialog>, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
Direct Known Subclasses:
WebColorChooserDialog, WebDirectoryChooser, WebExtendedOptionPane, WebFadeDialog, WebPopOver, WebProgressDialog

public class WebDialog
extends javax.swing.JDialog
implements LanguageMethods, LanguageContainerMethods, SettingsMethods, WindowMethods<WebDialog>

This JDialog extenstion class provides some additional methods and options to manipulate dialog behavior.

Author:
Mikle Garin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean closeOnFocusLoss
          Whether should close dialog on focus loss or not.
protected  DefaultFocusTracker focusTracker
          Window focus tracker.
 
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
WebDialog()
           
WebDialog(java.awt.Component owner)
           
WebDialog(java.awt.Component owner, java.lang.String title)
           
WebDialog(java.awt.Dialog owner)
           
WebDialog(java.awt.Dialog owner, boolean modal)
           
WebDialog(java.awt.Dialog owner, java.lang.String title)
           
WebDialog(java.awt.Dialog owner, java.lang.String title, boolean modal)
           
WebDialog(java.awt.Dialog owner, java.lang.String title, boolean modal, java.awt.GraphicsConfiguration gc)
           
WebDialog(java.awt.Frame owner)
           
WebDialog(java.awt.Frame owner, boolean modal)
           
WebDialog(java.awt.Frame owner, java.lang.String title)
           
WebDialog(java.awt.Frame owner, java.lang.String title, boolean modal)
           
WebDialog(java.awt.Frame owner, java.lang.String title, boolean modal, java.awt.GraphicsConfiguration gc)
           
WebDialog(java.awt.Window owner)
           
WebDialog(java.awt.Window owner, java.awt.Dialog.ModalityType modalityType)
           
WebDialog(java.awt.Window owner, java.lang.String title)
           
WebDialog(java.awt.Window owner, java.lang.String title, java.awt.Dialog.ModalityType modalityType)
           
WebDialog(java.awt.Window owner, java.lang.String title, java.awt.Dialog.ModalityType modalityType, java.awt.GraphicsConfiguration gc)
           
 
Method Summary
 WebDialog center()
          Centers window relative to screen center.
 WebDialog center(java.awt.Component relativeTo)
          Centers window relative to the specified component center.
 WebDialog center(java.awt.Component relativeTo, int width, int height)
          Changes window size and centers it relative to the specified component center.
 WebDialog center(int width, int height)
          Changes window size and centers it relative to screen center.
 java.lang.String getEmptyTitleText()
           
 int getInactiveShadeWidth()
           
 java.lang.String getLanguageContainerKey()
          Returns language container key for container which implements this interface.
 int getMaxTitleWidth()
           
 java.awt.Color getMiddleBg()
           
 WebResizeCorner getResizeCorner()
           
 int getRound()
           
 int getShadeWidth()
           
 javax.swing.JComponent getTitleComponent()
           
 java.awt.Color getTopBg()
           
 javax.swing.ImageIcon getWatermark()
           
 WebRootPaneUI getWebRootPaneUI()
           
 WebButtonGroup getWindowButtons()
           
 float getWindowOpacity()
          Returns window opacity.
protected  void initialize()
          Additional initializtion of WebDialog settings.
 boolean isAttachButtons()
           
 boolean isCloseOnFocusLoss()
          Returns whether should close dialog on focus loss or not.
 boolean isDrawWatermark()
           
 boolean isGroupButtons()
           
 boolean isLanguageSet()
          Returns whether this component registered in LanguageManager or not.
 boolean isShowCloseButton()
           
 boolean isShowMaximizeButton()
           
 boolean isShowMenuBar()
           
 boolean isShowMinimizeButton()
           
 boolean isShowResizeCorner()
           
 boolean isShowTitleComponent()
           
 boolean isShowWindowButtons()
           
 boolean isWindowOpaque()
          Returns whether window is opaque or not.
 void loadSettings()
          Loads saved settings into the component if it is registered.
 WebDialog packAndCenter()
          Packs and centers window relative to old position.
 WebDialog packAndCenter(boolean animate)
          Packs and centers window relative to old position.
 WebDialog packToHeight(int height)
          Packs window to its preffered width and specified height.
 WebDialog packToWidth(int width)
          Packs window to its preffered height and specified width.
 void registerSettings(SettingsProcessor settingsProcessor)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String key)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String key, boolean loadInitialSettings, boolean applySettingsChanges)
          Registers component for settings auto-save.
<T extends DefaultValue>
void
registerSettings(java.lang.String key, java.lang.Class<T> defaultValueClass)
          Registers component for settings auto-save.
<T extends DefaultValue>
void
registerSettings(java.lang.String key, java.lang.Class<T> defaultValueClass, boolean loadInitialSettings, boolean applySettingsChanges)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String key, java.lang.Object defaultValue)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String key, java.lang.Object defaultValue, boolean loadInitialSettings, boolean applySettingsChanges)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String group, java.lang.String key)
          Registers component for settings auto-save.
<T extends DefaultValue>
void
registerSettings(java.lang.String group, java.lang.String key, java.lang.Class<T> defaultValueClass)
          Registers component for settings auto-save.
<T extends DefaultValue>
void
registerSettings(java.lang.String group, java.lang.String key, java.lang.Class<T> defaultValueClass, boolean loadInitialSettings, boolean applySettingsChanges)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String group, java.lang.String key, java.lang.Object defaultValue)
          Registers component for settings auto-save.
 void registerSettings(java.lang.String group, java.lang.String key, java.lang.Object defaultValue, boolean loadInitialSettings, boolean applySettingsChanges)
          Registers component for settings auto-save.
 void removeLanguage()
          Unregisters component from LanguageManager.
 void removeLanguageContainerKey()
          Removes language container key for container which implements this interface.
 void removeLanguageUpdater()
          Unregisters any custom language updater set for this component.
 void saveSettings()
          Saves component settings.
 void setAttachButtons(boolean attachButtons)
           
 void setCloseOnFocusLoss(boolean closeOnFocusLoss)
          Sets whether should close dialog on focus loss or not.
 void setDrawWatermark(boolean drawWatermark)
           
 void setEmptyTitleText(java.lang.String text)
           
 void setGroupButtons(boolean groupButtons)
           
 void setInactiveShadeWidth(int inactiveShadeWidth)
           
 void setLanguage(java.lang.String key, java.lang.Object... data)
          Registers component in LanguageManager under specified key and with specified formatting data.
 void setLanguageContainerKey(java.lang.String key)
          Sets language container key for container which implements this interface.
 void setLanguageUpdater(LanguageUpdater updater)
          Registers custom language updater for this component.
 void setMaxTitleWidth(int width)
           
 void setMiddleBg(java.awt.Color middleBg)
           
 void setRound(int round)
           
 void setShadeWidth(int shadeWidth)
           
 void setShowCloseButton(boolean showCloseButton)
           
 void setShowMaximizeButton(boolean showMaximizeButton)
           
 void setShowMenuBar(boolean showMenuBar)
           
 void setShowMinimizeButton(boolean showMinimizeButton)
           
 void setShowResizeCorner(boolean showResizeCorner)
           
 void setShowTitleComponent(boolean showTitleComponent)
           
 void setShowWindowButtons(boolean showWindowButtons)
           
 void setTitleComponent(javax.swing.JComponent titleComponent)
           
 void setTopBg(java.awt.Color topBg)
           
 void setWatermark(javax.swing.ImageIcon watermark)
           
 WebDialog setWindowOpacity(float opacity)
          Sets window opacity if that option is supported by the underlying system.
 WebDialog setWindowOpaque(boolean opaque)
          Sets window opaque if that option is supported by the underlying system.
 void unregisterSettings()
          Unregisters component from settings auto-save.
 void updateLanguage(java.lang.Object... data)
          Updates component language and formatting data.
 void updateLanguage(java.lang.String key, java.lang.Object... data)
          Changes component language key and updates its language and formatting data.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, 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, pack, paint, 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
 

Field Detail

closeOnFocusLoss

protected boolean closeOnFocusLoss
Whether should close dialog on focus loss or not.


focusTracker

protected DefaultFocusTracker focusTracker
Window focus tracker.

Constructor Detail

WebDialog

public WebDialog()

WebDialog

public WebDialog(java.awt.Frame owner)

WebDialog

public WebDialog(java.awt.Frame owner,
                 boolean modal)

WebDialog

public WebDialog(java.awt.Frame owner,
                 java.lang.String title)

WebDialog

public WebDialog(java.awt.Frame owner,
                 java.lang.String title,
                 boolean modal)

WebDialog

public WebDialog(java.awt.Frame owner,
                 java.lang.String title,
                 boolean modal,
                 java.awt.GraphicsConfiguration gc)

WebDialog

public WebDialog(java.awt.Dialog owner)

WebDialog

public WebDialog(java.awt.Dialog owner,
                 boolean modal)

WebDialog

public WebDialog(java.awt.Dialog owner,
                 java.lang.String title)

WebDialog

public WebDialog(java.awt.Dialog owner,
                 java.lang.String title,
                 boolean modal)

WebDialog

public WebDialog(java.awt.Dialog owner,
                 java.lang.String title,
                 boolean modal,
                 java.awt.GraphicsConfiguration gc)

WebDialog

public WebDialog(java.awt.Component owner)

WebDialog

public WebDialog(java.awt.Component owner,
                 java.lang.String title)

WebDialog

public WebDialog(java.awt.Window owner)

WebDialog

public WebDialog(java.awt.Window owner,
                 java.awt.Dialog.ModalityType modalityType)

WebDialog

public WebDialog(java.awt.Window owner,
                 java.lang.String title)

WebDialog

public WebDialog(java.awt.Window owner,
                 java.lang.String title,
                 java.awt.Dialog.ModalityType modalityType)

WebDialog

public WebDialog(java.awt.Window owner,
                 java.lang.String title,
                 java.awt.Dialog.ModalityType modalityType,
                 java.awt.GraphicsConfiguration gc)
Method Detail

initialize

protected void initialize()
Additional initializtion of WebDialog settings.


isCloseOnFocusLoss

public boolean isCloseOnFocusLoss()
Returns whether should close dialog on focus loss or not.

Returns:
true if should close dialog on focus loss, false otherwise

setCloseOnFocusLoss

public void setCloseOnFocusLoss(boolean closeOnFocusLoss)
Sets whether should close dialog on focus loss or not.

Parameters:
closeOnFocusLoss - whether should close dialog on focus loss or not

getTopBg

public java.awt.Color getTopBg()

setTopBg

public void setTopBg(java.awt.Color topBg)

getMiddleBg

public java.awt.Color getMiddleBg()

setMiddleBg

public void setMiddleBg(java.awt.Color middleBg)

getShadeWidth

public int getShadeWidth()

setShadeWidth

public void setShadeWidth(int shadeWidth)

getInactiveShadeWidth

public int getInactiveShadeWidth()

setInactiveShadeWidth

public void setInactiveShadeWidth(int inactiveShadeWidth)

getRound

public int getRound()

setRound

public void setRound(int round)

isDrawWatermark

public boolean isDrawWatermark()

setDrawWatermark

public void setDrawWatermark(boolean drawWatermark)

getWatermark

public javax.swing.ImageIcon getWatermark()

setWatermark

public void setWatermark(javax.swing.ImageIcon watermark)

getMaxTitleWidth

public int getMaxTitleWidth()

setMaxTitleWidth

public void setMaxTitleWidth(int width)

getEmptyTitleText

public java.lang.String getEmptyTitleText()

setEmptyTitleText

public void setEmptyTitleText(java.lang.String text)

getTitleComponent

public javax.swing.JComponent getTitleComponent()

setTitleComponent

public void setTitleComponent(javax.swing.JComponent titleComponent)

getWindowButtons

public WebButtonGroup getWindowButtons()

getResizeCorner

public WebResizeCorner getResizeCorner()

isShowResizeCorner

public boolean isShowResizeCorner()

setShowResizeCorner

public void setShowResizeCorner(boolean showResizeCorner)

isShowTitleComponent

public boolean isShowTitleComponent()

setShowTitleComponent

public void setShowTitleComponent(boolean showTitleComponent)

isShowWindowButtons

public boolean isShowWindowButtons()

setShowWindowButtons

public void setShowWindowButtons(boolean showWindowButtons)

isShowMinimizeButton

public boolean isShowMinimizeButton()

setShowMinimizeButton

public void setShowMinimizeButton(boolean showMinimizeButton)

isShowMaximizeButton

public boolean isShowMaximizeButton()

setShowMaximizeButton

public void setShowMaximizeButton(boolean showMaximizeButton)

isShowCloseButton

public boolean isShowCloseButton()

setShowCloseButton

public void setShowCloseButton(boolean showCloseButton)

isGroupButtons

public boolean isGroupButtons()

setGroupButtons

public void setGroupButtons(boolean groupButtons)

isAttachButtons

public boolean isAttachButtons()

setAttachButtons

public void setAttachButtons(boolean attachButtons)

isShowMenuBar

public boolean isShowMenuBar()

setShowMenuBar

public void setShowMenuBar(boolean showMenuBar)

getWebRootPaneUI

public WebRootPaneUI getWebRootPaneUI()

setLanguage

public void setLanguage(java.lang.String key,
                        java.lang.Object... data)
Registers component in LanguageManager under specified key and with specified formatting data.

Specified by:
setLanguage in interface LanguageMethods
Parameters:
key - language record key
data - formatting data

updateLanguage

public void updateLanguage(java.lang.Object... data)
Updates component language and formatting data.

Specified by:
updateLanguage in interface LanguageMethods
Parameters:
data - new formatting data

updateLanguage

public void updateLanguage(java.lang.String key,
                           java.lang.Object... data)
Changes component language key and updates its language and formatting data.

Specified by:
updateLanguage in interface LanguageMethods
Parameters:
key - new language key
data - new formatting data

removeLanguage

public void removeLanguage()
Unregisters component from LanguageManager.

Specified by:
removeLanguage in interface LanguageMethods

isLanguageSet

public boolean isLanguageSet()
Returns whether this component registered in LanguageManager or not.

Specified by:
isLanguageSet in interface LanguageMethods
Returns:
true if component is registered in LanguageManager, false otherwise

setLanguageUpdater

public void setLanguageUpdater(LanguageUpdater updater)
Registers custom language updater for this component.

Specified by:
setLanguageUpdater in interface LanguageMethods
Parameters:
updater - component language updater

removeLanguageUpdater

public void removeLanguageUpdater()
Unregisters any custom language updater set for this component.

Specified by:
removeLanguageUpdater in interface LanguageMethods

setLanguageContainerKey

public void setLanguageContainerKey(java.lang.String key)
Sets language container key for container which implements this interface.

Specified by:
setLanguageContainerKey in interface LanguageContainerMethods
Parameters:
key - language container key

removeLanguageContainerKey

public void removeLanguageContainerKey()
Removes language container key for container which implements this interface.

Specified by:
removeLanguageContainerKey in interface LanguageContainerMethods

getLanguageContainerKey

public java.lang.String getLanguageContainerKey()
Returns language container key for container which implements this interface.

Specified by:
getLanguageContainerKey in interface LanguageContainerMethods
Returns:
language container key for container which implements this interface

registerSettings

public void registerSettings(java.lang.String key)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
key - component settings key

registerSettings

public <T extends DefaultValue> void registerSettings(java.lang.String key,
                                                      java.lang.Class<T> defaultValueClass)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Type Parameters:
T - default value type
Parameters:
key - component settings key
defaultValueClass - component default value class
See Also:
DefaultValue

registerSettings

public void registerSettings(java.lang.String key,
                             java.lang.Object defaultValue)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
key - component settings key
defaultValue - component default value

registerSettings

public void registerSettings(java.lang.String group,
                             java.lang.String key)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
group - component settings group
key - component settings key

registerSettings

public <T extends DefaultValue> void registerSettings(java.lang.String group,
                                                      java.lang.String key,
                                                      java.lang.Class<T> defaultValueClass)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Type Parameters:
T - default value type
Parameters:
group - component settings group
key - component settings key
defaultValueClass - component default value class
See Also:
DefaultValue

registerSettings

public void registerSettings(java.lang.String group,
                             java.lang.String key,
                             java.lang.Object defaultValue)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
group - component settings group
key - component settings key
defaultValue - component default value

registerSettings

public void registerSettings(java.lang.String key,
                             boolean loadInitialSettings,
                             boolean applySettingsChanges)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
key - component settings key
loadInitialSettings - whether to load initial available settings into the component or not
applySettingsChanges - whether to apply settings changes to the component or not

registerSettings

public <T extends DefaultValue> void registerSettings(java.lang.String key,
                                                      java.lang.Class<T> defaultValueClass,
                                                      boolean loadInitialSettings,
                                                      boolean applySettingsChanges)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Type Parameters:
T - default value type
Parameters:
key - component settings key
defaultValueClass - component default value class
loadInitialSettings - whether to load initial available settings into the component or not
applySettingsChanges - whether to apply settings changes to the component or not
See Also:
DefaultValue

registerSettings

public void registerSettings(java.lang.String key,
                             java.lang.Object defaultValue,
                             boolean loadInitialSettings,
                             boolean applySettingsChanges)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
key - component settings key
defaultValue - component default value
loadInitialSettings - whether to load initial available settings into the component or not
applySettingsChanges - whether to apply settings changes to the component or not

registerSettings

public <T extends DefaultValue> void registerSettings(java.lang.String group,
                                                      java.lang.String key,
                                                      java.lang.Class<T> defaultValueClass,
                                                      boolean loadInitialSettings,
                                                      boolean applySettingsChanges)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Type Parameters:
T - default value type
Parameters:
group - component settings group
key - component settings key
defaultValueClass - component default value class
loadInitialSettings - whether to load initial available settings into the component or not
applySettingsChanges - whether to apply settings changes to the component or not
See Also:
DefaultValue

registerSettings

public void registerSettings(java.lang.String group,
                             java.lang.String key,
                             java.lang.Object defaultValue,
                             boolean loadInitialSettings,
                             boolean applySettingsChanges)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
group - component settings group
key - component settings key
defaultValue - component default value
loadInitialSettings - whether to load initial available settings into the component or not
applySettingsChanges - whether to apply settings changes to the component or not

registerSettings

public void registerSettings(SettingsProcessor settingsProcessor)
Registers component for settings auto-save.

Also registered component will be: - listened for settings changes to save them when requested - automatically updated with any loaded settings for that key if requested - automatically updated with any changes made in its settings if requested

Specified by:
registerSettings in interface SettingsMethods
Parameters:
settingsProcessor - component settings processor

unregisterSettings

public void unregisterSettings()
Unregisters component from settings auto-save.

Specified by:
unregisterSettings in interface SettingsMethods

loadSettings

public void loadSettings()
Loads saved settings into the component if it is registered.

Specified by:
loadSettings in interface SettingsMethods

saveSettings

public void saveSettings()
Saves component settings.

Specified by:
saveSettings in interface SettingsMethods

setWindowOpaque

public WebDialog setWindowOpaque(boolean opaque)
Sets window opaque if that option is supported by the underlying system.

Specified by:
setWindowOpaque in interface WindowMethods<WebDialog>
Parameters:
opaque - whether should make window opaque or not

isWindowOpaque

public boolean isWindowOpaque()
Returns whether window is opaque or not.

Specified by:
isWindowOpaque in interface WindowMethods<WebDialog>
Returns:
true if window is opaque, false otherwise

setWindowOpacity

public WebDialog setWindowOpacity(float opacity)
Sets window opacity if that option is supported by the underlying system.

Specified by:
setWindowOpacity in interface WindowMethods<WebDialog>
Parameters:
opacity - new window opacity

getWindowOpacity

public float getWindowOpacity()
Returns window opacity.

Specified by:
getWindowOpacity in interface WindowMethods<WebDialog>
Returns:
window opacity

center

public WebDialog center()
Centers window relative to screen center.

Specified by:
center in interface WindowMethods<WebDialog>
Returns:
processed window

center

public WebDialog center(java.awt.Component relativeTo)
Centers window relative to the specified component center.

Specified by:
center in interface WindowMethods<WebDialog>
Parameters:
relativeTo - component used to center window
Returns:
processed window

center

public WebDialog center(int width,
                        int height)
Changes window size and centers it relative to screen center.

Specified by:
center in interface WindowMethods<WebDialog>
Parameters:
width - new window width
height - new window height
Returns:
processed window

center

public WebDialog center(java.awt.Component relativeTo,
                        int width,
                        int height)
Changes window size and centers it relative to the specified component center.

Specified by:
center in interface WindowMethods<WebDialog>
Parameters:
relativeTo - component used to center window
width - new window width
height - new window height
Returns:
processed window

packToWidth

public WebDialog packToWidth(int width)
Packs window to its preffered height and specified width.

Specified by:
packToWidth in interface WindowMethods<WebDialog>
Parameters:
width - new window width
Returns:
processed window

packToHeight

public WebDialog packToHeight(int height)
Packs window to its preffered width and specified height.

Specified by:
packToHeight in interface WindowMethods<WebDialog>
Parameters:
height - new window height
Returns:
processed window

packAndCenter

public WebDialog packAndCenter()
Packs and centers window relative to old position.

Specified by:
packAndCenter in interface WindowMethods<WebDialog>
Returns:
processed window

packAndCenter

public WebDialog packAndCenter(boolean animate)
Packs and centers window relative to old position.

Specified by:
packAndCenter in interface WindowMethods<WebDialog>
Parameters:
animate - whether should animate window size changes or not
Returns:
processed window