Constructor and Description |
---|
WebCanvasUI() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(JComponent c,
int x,
int y) |
static ComponentUI |
createUI(JComponent c)
Returns an instance of the
WebCanvasUI 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, installDefaults, installListeners, uninstallDefaults, uninstallListeners
getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, update
@NotNull public static ComponentUI createUI(@NotNull JComponent c)
WebCanvasUI
for the specified component.
This tricky method is used by UIManager
to create component UIs when needed.c
- component that will use UI instanceWebCanvasUI
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 WebCanvas>
installUI
in class WCanvasUI<C extends WebCanvas>
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 WebCanvas>
uninstallUI
in class WCanvasUI<C extends WebCanvas>
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
public Dimension getPreferredSize(@NotNull JComponent c)
getPreferredSize
in class ComponentUI
Copyright © 2020. All rights reserved.