C
- component typepublic class WebToggleButtonUI<C extends JToggleButton> extends WToggleButtonUI<C> implements SwingConstants
JToggleButton
component.button, inputListener
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
WebToggleButtonUI() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(JComponent c,
int x,
int y) |
static ComponentUI |
createUI(JComponent c)
Returns an instance of the
WebToggleButtonUI for the specified component. |
int |
getBaseline(JComponent c,
int width,
int height) |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c) |
Dimension |
getPreferredSize(JComponent c) |
void |
installUI(JComponent c)
Configures the specified component appropriate for the look and feel.
|
void |
paint(Graphics g,
JComponent c) |
void |
uninstallUI(JComponent c)
Reverses configuration which was done on the specified component during
installUI . |
getPropertyPrefix
createButtonInputListener, installDefaults, installListeners, uninstallDefaults, uninstallListeners
getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, update
@NotNull public static ComponentUI createUI(@NotNull JComponent c)
WebToggleButtonUI
for the specified component.
This tricky method is used by UIManager
to create component UIs when needed.c
- component that will use UI instanceWebToggleButtonUI
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 JToggleButton>
installUI
in class WButtonUI<C extends JToggleButton>
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 JToggleButton>
uninstallUI
in class WButtonUI<C extends JToggleButton>
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()
public 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.