C
- component typepublic class WebDockableFrameUI<C extends WebDockableFrame> extends WDockableFrameUI<C> implements PropertyChangeListener
WebDockableFrame
component.WebDockablePane
Modifier and Type | Field and Description |
---|---|
protected WebPanel |
buttonsPanel |
protected WebButton |
closeButton |
protected ComponentMoveBehavior |
dialogMoveBehavior |
protected WebButton |
dockButton |
protected WebButton |
floatButton |
protected DefaultFocusTracker |
focusTracker
Listeners.
|
protected WebButton |
maximizeButton |
protected WebButton |
minimizeButton |
protected SidebarButton |
sidebarButton
Additional components used be the UI.
|
protected WebStyledLabel |
titleLabel |
protected WebPanel |
titlePanel |
frame
Constructor and Description |
---|
WebDockableFrameUI() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(JComponent c,
int x,
int y) |
static ComponentUI |
createUI(JComponent c)
Returns an instance of the
WebDockableFrameUI for the specified component. |
int |
getBaseline(JComponent c,
int width,
int height) |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c) |
Dimension |
getMinimumDialogSize()
Returns minimum frame dialog size.
|
Dimension |
getPreferredSize(JComponent c) |
SidebarButton |
getSidebarButton()
Returns
SidebarButton for WebDockableFrame represented by this UI. |
protected void |
installActions()
Installs actions for UI elements.
|
protected void |
installComponents()
Installs frame decoration elements.
|
void |
installUI(JComponent c)
Configures the specified component appropriate for the look and feel.
|
void |
paint(Graphics g,
JComponent c) |
void |
propertyChange(PropertyChangeEvent evt) |
protected void |
requestFocusInFrame()
Requests focus for frame content if possible.
|
protected void |
uninstallActions()
Uninstalls actions from UI elements.
|
protected void |
uninstallComponents()
Uninstalls frame decoration elements.
|
void |
uninstallUI(JComponent c)
Reverses configuration which was done on the specified component during
installUI . |
protected void |
updateCloseButton()
Updates close button state.
|
protected void |
updateFloatButton()
Updates float button state.
|
protected void |
updateMaximizeButton()
Updates maximize button state.
|
getPropertyPrefix, installDefaults, installListeners, uninstallDefaults, uninstallListeners
getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, update
protected transient DefaultFocusTracker focusTracker
protected transient ComponentMoveBehavior dialogMoveBehavior
protected transient SidebarButton sidebarButton
protected transient WebPanel titlePanel
protected transient WebStyledLabel titleLabel
protected transient WebPanel buttonsPanel
protected transient WebButton dockButton
protected transient WebButton minimizeButton
protected transient WebButton floatButton
protected transient WebButton maximizeButton
protected transient WebButton closeButton
@NotNull public static ComponentUI createUI(@NotNull JComponent c)
WebDockableFrameUI
for the specified component.
This tricky method is used by UIManager
to create component UIs when needed.c
- component that will use UI instanceWebDockableFrameUI
public void installUI(@NotNull JComponent c)
WebUI
ComponentUI
instance is being installed as the UI delegate on the specified component.
This method should completely configure the component for the look and feel, including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in interface WebUI<C extends WebDockableFrame>
installUI
in class WDockableFrameUI<C extends WebDockableFrame>
c
- the component where this UI delegate is being installedComponentUI.installUI(JComponent)
,
WebUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(@NotNull JComponent c)
WebUI
installUI
.
This method is invoked when this UIComponent
instance is being removed as the UI delegate for the specified component.
This method should undo the configuration performed in installUI
, being careful to leave the JComponent
instance
in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in interface WebUI<C extends WebDockableFrame>
uninstallUI
in class WDockableFrameUI<C extends WebDockableFrame>
c
- the component from which this UI delegate is being removed;
this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsComponentUI.uninstallUI(JComponent)
,
WebUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installComponents()
protected void uninstallComponents()
protected void installActions()
protected void uninstallActions()
public void propertyChange(@NotNull PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
protected void updateFloatButton()
protected void updateMaximizeButton()
protected void updateCloseButton()
@NotNull public Dimension getMinimumDialogSize()
WDockableFrameUI
getMinimumDialogSize
in class WDockableFrameUI<C extends WebDockableFrame>
protected void requestFocusInFrame()
@NotNull public SidebarButton getSidebarButton()
WDockableFrameUI
SidebarButton
for WebDockableFrame
represented by this UI.getSidebarButton
in class WDockableFrameUI<C extends WebDockableFrame>
SidebarButton
for WebDockableFrame
represented by this UIpublic boolean contains(@NotNull JComponent c, int x, int y)
contains
in class ComponentUI
public int getBaseline(@NotNull JComponent c, int width, int height)
getBaseline
in class ComponentUI
@NotNull public Component.BaselineResizeBehavior getBaselineResizeBehavior(@NotNull JComponent c)
getBaselineResizeBehavior
in class ComponentUI
public void paint(@NotNull Graphics g, @NotNull JComponent c)
paint
in class ComponentUI
@Nullable public Dimension getPreferredSize(@NotNull JComponent c)
getPreferredSize
in class ComponentUI
Copyright © 2020. All rights reserved.