public class WebWindow extends javax.swing.JWindow implements Styleable, Skinnable, Paintable, PaddingSupport, WindowEventMethods, com.alee.managers.language.LanguageContainerMethods, com.alee.managers.settings.SettingsMethods, WindowMethods<WebWindow>
javax.swing.JWindow.AccessibleJWindowjava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closeOnFocusLoss
Whether should close window on focus loss or not.
|
protected DefaultFocusTracker |
focusTracker
Window focus tracker.
|
accessibleContext, rootPane, rootPaneCheckingEnabledBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTEMPTY| Constructor and Description |
|---|
WebWindow()
Creates a window with no specified owner.
|
WebWindow(java.awt.Component owner)
Creates a window with the owner window from the specified component.
|
WebWindow(java.awt.Frame owner)
Creates a window with the specified owner frame.
|
WebWindow(java.awt.GraphicsConfiguration gc)
Creates a window with the specified
GraphicsConfiguration of a screen device. |
WebWindow(StyleId id)
Creates a window with no specified owner.
|
WebWindow(StyleId id,
java.awt.Component owner)
Creates a window with the owner window from the specified component.
|
WebWindow(StyleId id,
java.awt.Frame owner)
Creates a window with the specified owner frame.
|
WebWindow(StyleId id,
java.awt.GraphicsConfiguration gc)
Creates a window with the specified
GraphicsConfiguration of a screen device. |
WebWindow(StyleId id,
java.awt.Window owner)
Creates a window with the specified owner window.
|
WebWindow(StyleId id,
java.awt.Window owner,
java.awt.GraphicsConfiguration gc)
Creates a window with the specified owner window and
GraphicsConfiguration of a screen device. |
WebWindow(java.awt.Window owner)
Creates a window with the specified owner window.
|
WebWindow(java.awt.Window owner,
java.awt.GraphicsConfiguration gc)
Creates a window with the specified owner window and
GraphicsConfiguration of a screen device. |
| Modifier and Type | Method and Description |
|---|---|
void |
addFocusableChild(java.awt.Component child)
Adds focusable child that won't force window to close even if it set to close on focus loss.
|
void |
addStyleListener(StyleListener listener)
Adds style change listener.
|
WebWindow |
center()
Centers window relative to screen center.
|
WebWindow |
center(java.awt.Component relativeTo)
Centers window relative to the specified component center.
|
WebWindow |
center(java.awt.Component relativeTo,
int width,
int height)
Changes window size and centers it relative to the specified component center.
|
WebWindow |
center(int width,
int height)
Changes window size and centers it relative to screen center.
|
protected javax.swing.JRootPane |
createRootPane()
Called by the constructor methods to create the default
rootPane. |
Painter |
getCustomPainter()
Returns custom base painter for this component.
|
Painter |
getCustomPainter(java.lang.String id)
Returns custom painter for this component.
|
java.util.Map<java.lang.String,Painter> |
getCustomPainters()
Returns all custom painters for this component.
|
java.util.List<java.awt.Component> |
getFocusableChildren()
Returns focusable children that don't force window to close even if it set to close on focus loss.
|
java.lang.String |
getLanguageContainerKey() |
java.awt.Insets |
getPadding()
Returns current padding.
|
protected WebRootPaneUI |
getRootPaneWebUI()
Returns Web-UI applied to root pane used by this window.
|
Skin |
getSkin()
Returns skin currently applied to this component.
|
StyleId |
getStyleId()
Returns component style ID.
|
protected WebRootPaneUI |
getWebUI()
Returns Web-UI applied to this class.
|
float |
getWindowOpacity()
Returns window opacity.
|
protected void |
initialize(StyleId id)
Additional initializtion of WebWindow settings.
|
boolean |
isCloseOnFocusLoss()
Returns whether should close window on focus loss or not.
|
boolean |
isWindowOpaque()
Returns whether window is opaque or not.
|
void |
loadSettings() |
WindowCloseAdapter |
onClose(ComponentEventRunnable runnable)
Shortcut method for window close event.
|
java.awt.event.WindowAdapter |
onClosing(WindowEventRunnable runnable)
Shortcut method for window closing event.
|
WebWindow |
packAndCenter()
Packs and centers window relative to old position.
|
WebWindow |
packAndCenter(boolean animate)
Packs and centers window relative to old position.
|
WebWindow |
packToHeight(int height)
Packs window to its preffered width and specified height.
|
WebWindow |
packToWidth(int width)
Packs window to its preffered height and specified width.
|
void |
registerSettings(com.alee.managers.settings.SettingsProcessor settingsProcessor) |
void |
registerSettings(java.lang.String key) |
void |
registerSettings(java.lang.String key,
boolean loadInitialSettings,
boolean applySettingsChanges) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
registerSettings(java.lang.String key,
java.lang.Object defaultValue) |
void |
registerSettings(java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
registerSettings(java.lang.String group,
java.lang.String key) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue) |
void |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
removeFocusableChild(java.awt.Component child)
Removes focusable child that doesn't force window to close even if it set to close on focus loss.
|
void |
removeLanguageContainerKey() |
void |
removeStyleListener(StyleListener listener)
Removes style change listener.
|
boolean |
restoreDefaultPainters()
Restores default painters for this component.
|
Skin |
restoreSkin()
Restores global skin for this component and all of its children linked via
StyleId. |
void |
saveSettings() |
void |
setCloseOnFocusLoss(boolean closeOnFocusLoss)
Sets whether should close window on focus loss or not.
|
Painter |
setCustomPainter(Painter painter)
Sets custom base painter for this component.
|
Painter |
setCustomPainter(java.lang.String id,
Painter painter)
Sets custom painter for this component under the specified painter ID.
|
void |
setLanguageContainerKey(java.lang.String key) |
void |
setPadding(java.awt.Insets padding)
Sets new padding.
|
void |
setPadding(int padding)
Sets new padding.
|
void |
setPadding(int top,
int left,
int bottom,
int right)
Sets new padding.
|
Skin |
setSkin(Skin skin)
Applies specified skin to the specified component and all of its children linked via
StyleId. |
Skin |
setSkin(Skin skin,
boolean recursively)
Applies specified skin to the specified component and all of its children linked via
StyleId. |
StyleId |
setStyleId(StyleId id)
Sets new component style ID.
|
WebWindow |
setWindowOpacity(float opacity)
Sets window opacity if that option is supported by the underlying system.
|
WebWindow |
setWindowOpaque(boolean opaque)
Sets window opaque if that option is supported by the underlying system.
|
void |
unregisterSettings() |
addImpl, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update, windowInitaddNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBackground, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setOpacity, setShape, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, 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, transferFocusDownCycle, validate, validateTreeaction, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected boolean closeOnFocusLoss
protected DefaultFocusTracker focusTracker
public WebWindow()
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
public WebWindow(java.awt.GraphicsConfiguration gc)
GraphicsConfiguration of a screen device. This window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
gc - the GraphicsConfiguration that is used to construct the new window with; if gc is null,
the system default GraphicsConfiguration is assumedpublic WebWindow(java.awt.Component owner)
owner is null, the shared owner will be used and this window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
owner - the componnt from which parent window this window is displayedpublic WebWindow(java.awt.Window owner)
owner is null, the shared owner will be used and this window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
owner - the window from which the window is displayedpublic WebWindow(java.awt.Window owner,
java.awt.GraphicsConfiguration gc)
GraphicsConfiguration of a screen device.
If owner is null, the shared owner will be used and this window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
owner - the window from which the window is displayedgc - the GraphicsConfiguration that is used to construct the new window with; if gc is null,
the system default GraphicsConfiguration is assumed, unless owner is also null, in which
case the GraphicsConfiguration from the shared owner frame will be usedpublic WebWindow(java.awt.Frame owner)
owner is null, the shared owner will be used and this window will not be focusable.
Also, this window will not be focusable unless its owner is showing on the screen.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
owner - the frame from which the window is displayedpublic WebWindow(StyleId id)
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
id - style IDpublic WebWindow(StyleId id, java.awt.GraphicsConfiguration gc)
GraphicsConfiguration of a screen device. This window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
id - style IDgc - the GraphicsConfiguration that is used to construct the new window with; if gc is null,
the system default GraphicsConfiguration is assumedpublic WebWindow(StyleId id, java.awt.Component owner)
owner is null, the shared owner will be used and this window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
id - style IDowner - the componnt from which parent window this window is displayedpublic WebWindow(StyleId id, java.awt.Window owner)
owner is null, the shared owner will be used and this window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
id - style IDowner - the window from which the window is displayedpublic WebWindow(StyleId id, java.awt.Window owner, java.awt.GraphicsConfiguration gc)
GraphicsConfiguration of a screen device.
If owner is null, the shared owner will be used and this window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
id - style IDowner - the window from which the window is displayedgc - the GraphicsConfiguration that is used to construct the new window with; if gc is null,
the system default GraphicsConfiguration is assumed, unless owner is also null, in which
case the GraphicsConfiguration from the shared owner frame will be usedpublic WebWindow(StyleId id, java.awt.Frame owner)
owner is null, the shared owner will be used and this window will not be focusable.
Also, this window will not be focusable unless its owner is showing on the screen.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
id - style IDowner - the frame from which the window is displayedprotected void initialize(StyleId id)
id - initial style IDprotected javax.swing.JRootPane createRootPane()
rootPane.createRootPane in class javax.swing.JWindowpublic boolean isCloseOnFocusLoss()
public void setCloseOnFocusLoss(boolean closeOnFocusLoss)
closeOnFocusLoss - whether should close window on focus loss or notpublic java.util.List<java.awt.Component> getFocusableChildren()
public void addFocusableChild(java.awt.Component child)
child - focusable child that won't force window to close even if it set to close on focus losspublic void removeFocusableChild(java.awt.Component child)
child - focusable child that doesn't force window to close even if it set to close on focus losspublic StyleId getStyleId()
StyleablegetStyleId in interface Styleablepublic StyleId setStyleId(StyleId id)
StyleablesetStyleId in interface Styleableid - custom component style IDpublic Skin getSkin()
Skinnablepublic Skin setSkin(Skin skin, boolean recursively)
Skinnablepublic Skin restoreSkin()
SkinnableStyleId.
Actual linked children information is stored within StyleData data objects.
Restoring component skin will also include it back into the skin update cycle in case global skin will be changed.restoreSkin in interface Skinnablepublic void addStyleListener(StyleListener listener)
SkinnableaddStyleListener in interface Skinnablelistener - style change listener to addpublic void removeStyleListener(StyleListener listener)
SkinnableremoveStyleListener in interface Skinnablelistener - style change listener to removepublic java.util.Map<java.lang.String,Painter> getCustomPainters()
PaintablegetCustomPainters in interface Paintablepublic Painter getCustomPainter()
PaintablegetCustomPainter in interface Paintablepublic Painter getCustomPainter(java.lang.String id)
PaintablegetCustomPainter in interface Paintableid - painter IDpublic Painter setCustomPainter(Painter painter)
PaintablesetCustomPainter in interface Paintablepainter - custom base painterpublic Painter setCustomPainter(java.lang.String id, Painter painter)
PaintablesetCustomPainter in interface Paintableid - painter IDpainter - painterpublic boolean restoreDefaultPainters()
PaintablerestoreDefaultPainters in interface Paintablepublic java.awt.Insets getPadding()
PaddingSupportgetPadding in interface PaddingSupportpublic void setPadding(int padding)
padding - new paddingpublic void setPadding(int top,
int left,
int bottom,
int right)
top - new top paddingleft - new left paddingbottom - new bottom paddingright - new right paddingpublic void setPadding(java.awt.Insets padding)
PaddingSupportnull can be provided to set an empty [0,0,0,0] padding.setPadding in interface PaddingSupportpadding - new paddingprotected WebRootPaneUI getWebUI()
protected WebRootPaneUI getRootPaneWebUI()
public java.awt.event.WindowAdapter onClosing(WindowEventRunnable runnable)
WindowEventMethodsonClosing in interface WindowEventMethodsrunnable - window event runnablepublic WindowCloseAdapter onClose(ComponentEventRunnable runnable)
WindowEventMethodsonClose in interface WindowEventMethodsrunnable - component event runnablepublic void setLanguageContainerKey(java.lang.String key)
setLanguageContainerKey in interface com.alee.managers.language.LanguageContainerMethodspublic void removeLanguageContainerKey()
removeLanguageContainerKey in interface com.alee.managers.language.LanguageContainerMethodspublic java.lang.String getLanguageContainerKey()
getLanguageContainerKey in interface com.alee.managers.language.LanguageContainerMethodspublic void registerSettings(java.lang.String key)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String key,
java.lang.Object defaultValue)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String group,
java.lang.String key)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String key,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(com.alee.managers.settings.SettingsProcessor settingsProcessor)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void unregisterSettings()
unregisterSettings in interface com.alee.managers.settings.SettingsMethodspublic void loadSettings()
loadSettings in interface com.alee.managers.settings.SettingsMethodspublic void saveSettings()
saveSettings in interface com.alee.managers.settings.SettingsMethodspublic WebWindow setWindowOpaque(boolean opaque)
WindowMethodssetWindowOpaque in interface WindowMethods<WebWindow>opaque - whether should make window opaque or notpublic boolean isWindowOpaque()
WindowMethodsisWindowOpaque in interface WindowMethods<WebWindow>public WebWindow setWindowOpacity(float opacity)
WindowMethodssetWindowOpacity in interface WindowMethods<WebWindow>opacity - new window opacitypublic float getWindowOpacity()
WindowMethodsgetWindowOpacity in interface WindowMethods<WebWindow>public WebWindow center()
WindowMethodscenter in interface WindowMethods<WebWindow>public WebWindow center(java.awt.Component relativeTo)
WindowMethodscenter in interface WindowMethods<WebWindow>relativeTo - component used to center windowpublic WebWindow center(int width, int height)
WindowMethodscenter in interface WindowMethods<WebWindow>width - new window widthheight - new window heightpublic WebWindow center(java.awt.Component relativeTo, int width, int height)
WindowMethodscenter in interface WindowMethods<WebWindow>relativeTo - component used to center windowwidth - new window widthheight - new window heightpublic WebWindow packToWidth(int width)
WindowMethodspackToWidth in interface WindowMethods<WebWindow>width - new window widthpublic WebWindow packToHeight(int height)
WindowMethodspackToHeight in interface WindowMethods<WebWindow>height - new window heightpublic WebWindow packAndCenter()
WindowMethodspackAndCenter in interface WindowMethods<WebWindow>public WebWindow packAndCenter(boolean animate)
WindowMethodspackAndCenter in interface WindowMethods<WebWindow>animate - whether should animate window size changes or not