JLayer
's view component
javax.swing.JLayer
's UI delegates.
paint(java.
method performs the
painting of the JLayer
and eventDispatched(AWTEvent, JLayer)
method is notified
about any AWTEvent
s which have been generated by a JLayer
or any of its subcomponents.
The LayerUI
differs from the UI delegates of the other components,
because it is LookAndFeel independent and is not updated by default when
the system LookAndFeel is changed.
The subclasses of LayerUI
can either be stateless and shareable
by multiple JLayer
s or not shareable.
JLayer#setUI(LayerUI)
, JLayer#setView(Component)
, JLayer#getView()
Modifier and Type | Field and Description |
---|---|
private final PropertyChangeSupport |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | addPropertyChangeListener(PropertyChangeListener
the property change listener to be added listener)Adds a PropertyChangeListener to the listener list. |
public void | addPropertyChangeListener(String
one of the property names listed above propertyName, PropertyChangeListener the property change listener to be added listener)Adds a PropertyChangeListener to the listener list for a specific property. |
public void | applyPropertyChange(PropertyChangeEvent
the PropertyChangeEvent generated by this evt, JLayer<? extends V> LayerUI the l)JLayer this LayerUI is set toNotifies the |
public void | |
public void | eventDispatched(AWTEvent
the event to be dispatched e, JLayer<? extends V> the layer this LayerUI is set to l)Processes |
protected void | firePropertyChange(String
the property whose value has changed propertyName, Object the property's previous value oldValue, Object the property's new value newValue)Support for reporting bound property changes for Object properties. |
public int | Returns: baseline or a value < 0 indicating there is no reasonable baselineJLayer to return baseline resize behavior forthe width to get the baseline for width, int the height to get the baseline for height)Overrides javax. JLayer 's view component is not null ,
this calls the view's getBaseline() method.
|
public Component. | Returns: an enum indicating how the baseline changes as the component size changesJLayer to return baseline resize behavior forOverrides javax. JLayer 's view component is not null ,
this returns the result of the view's getBaselineResizeBehavior() method.
|
public Dimension | Returns: maximum size for the passedJLayer JLayer to return preferred size forOverrides javax. JLayer 's view component is not null ,
this returns the result of the view's getMaximumSize() method.
|
public Dimension | Returns: minimal size for the passedJLayer JLayer to return preferred size forOverrides javax. JLayer 's view component is not null ,
this returns the result of the view's getMinimalSize() method.
|
public Dimension | Returns: preferred size for the passedJLayer JLayer to return preferred size forOverrides javax. JLayer 's view component is not null ,
this returns the result of the view's getPreferredSize() method.
|
public PropertyChangeListener[] | Returns: all of this ui'sPropertyChangeListener s
or an empty array if no property change
listeners are currently registeredReturns an array of all the property change listeners registered on this component. |
public PropertyChangeListener[] | Returns: all of thePropertyChangeListener s associated with
the named property; if no such listeners have been added or
if propertyName is null , an empty
array is returnedThe name of the property being listened to propertyName)Returns an array of all the listeners which have been associated with the named property. |
public boolean | Returns: false if the infoflags indicate that the image is completely loaded; true otherwisethe image being observed img, int see imageUpdate for information infoflags, int the x coordinate x, int the y coordinate y, int the width w, int the height h, JLayer<? extends V> a l)JLayer componentDelegates its functionality to the default implementation of the |
public void | installUI(JComponent
the c)JLayer component where this UI delegate is being installedOverrides javax. JLayer this LayerUI is set to.
|
public void | paint(Graphics
the g, JComponent Graphics context in which to paintthe component being painted c)Overrides javax. |
public void | paintImmediately(int
the x value of the region to be painted x, int the y value of the region to be painted y, int the width of the region to be painted width, int the height of the region to be painted height, JLayer<? extends V> a l)JLayer componentPaints the specified region in the |
protected void | processComponentEvent(ComponentEvent
the e, JLayer<? extends V> ComponentEvent to be processedthe layer this l)LayerUI instance is set toProcesses component events occurring on the |
protected void | processFocusEvent(FocusEvent
the e, JLayer<? extends V> FocusEvent to be processedthe layer this l)LayerUI instance is set toProcesses focus events occurring on the |
protected void | processHierarchyBoundsEvent(HierarchyEvent
the e, JLayer<? extends V> HierarchyEvent to be processedthe layer this l)LayerUI instance is set toProcesses hierarchy bounds event occurring on the |
protected void | processHierarchyEvent(HierarchyEvent
the e, JLayer<? extends V> HierarchyEvent to be processedthe layer this l)LayerUI instance is set toProcesses hierarchy event occurring on the |
protected void | processInputMethodEvent(InputMethodEvent
the e, JLayer<? extends V> InputMethodEvent to be processedthe layer this l)LayerUI instance is set toProcesses input event occurring on the |
protected void | processKeyEvent(KeyEvent
the e, JLayer<? extends V> KeyEvent to be processedthe layer this l)LayerUI instance is set toProcesses key events occurring on the |
protected void | processMouseEvent(MouseEvent
the e, JLayer<? extends V> MouseEvent to be processedthe layer this l)LayerUI instance is set toProcesses mouse events occurring on the |
protected void | processMouseMotionEvent(MouseEvent
the e, JLayer<? extends V> MouseEvent to be processedthe layer this l)LayerUI instance is set toProcesses mouse motion event occurring on the |
protected void | processMouseWheelEvent(MouseWheelEvent
the e, JLayer<? extends V> MouseEvent to be processedthe layer this l)LayerUI instance is set toProcesses mouse wheel event occurring on the |
public void | removePropertyChangeListener(PropertyChangeListener
the PropertyChangeListener to be removed listener)Removes a PropertyChangeListener from the listener list. |
public void | removePropertyChangeListener(String
a valid property name propertyName, PropertyChangeListener the PropertyChangeListener to be removed listener)Removes a |
public void | uninstallUI(JComponent
the component from which this UI delegate is being removed. c)Overrides javax. installUI(JComponent) method.
|
public void | updateUI(JLayer<? extends V>
the l)JLayer which UI is updatedInvoked when |
propertyChangeSupport | back to summary |
---|---|
private final PropertyChangeSupport propertyChangeSupport |
LayerUI | back to summary |
---|---|
public LayerUI() Constructs a |
addPropertyChangeListener | back to summary |
---|---|
public void addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list. The listener is registered for all bound properties of this class.
If
|
addPropertyChangeListener | back to summary |
---|---|
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list for a specific property.
If
|
applyPropertyChange | back to summary |
---|---|
public void applyPropertyChange(PropertyChangeEvent evt, JLayer<? extends V> l) Notifies the
|
doLayout | back to summary |
---|---|
public void doLayout(JLayer<? extends V> l) Causes the passed instance of
|
eventDispatched | back to summary |
---|---|
public void eventDispatched(AWTEvent e, JLayer<? extends V> l) Processes
To enable the Note Events are processed only for displayable |
firePropertyChange | back to summary |
---|---|
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners. |
getBaseline | back to summary |
---|---|
public int getBaseline(JComponent c, int width, int height) Overrides javax. If the
|
getBaselineResizeBehavior | back to summary |
---|---|
public Component. Overrides javax. If the
|
getMaximumSize | back to summary |
---|---|
public Dimension getMaximumSize(JComponent c) Overrides javax. If the
|
getMinimumSize | back to summary |
---|---|
public Dimension getMinimumSize(JComponent c) Overrides javax. If the
|
getPreferredSize | back to summary |
---|---|
public Dimension getPreferredSize(JComponent c) Overrides javax. If the
|
getPropertyChangeListeners | back to summary |
---|---|
public PropertyChangeListener[] getPropertyChangeListeners() Returns an array of all the property change listeners registered on this component.
|
getPropertyChangeListeners | back to summary |
---|---|
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) Returns an array of all the listeners which have been associated with the named property.
|
imageUpdate | back to summary |
---|---|
public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h, JLayer<? extends V> l) Delegates its functionality to the default implementation of the
This method is to be overridden instead of Note This method is usually called not on the Event Dispatching Thread.
|
installUI | back to summary |
---|---|
public void installUI(JComponent c) Overrides javax. Configures the
|
paint | back to summary |
---|---|
public void paint(Graphics g, JComponent c) Overrides javax. Paints the specified component.
Subclasses should override this method and use
the specified The default implementation paints the passed component as is.
|
paintImmediately | back to summary |
---|---|
public void paintImmediately(int x, int y, int width, int height, JLayer<? extends V> l) Paints the specified region in the
This method is to be overridden when the dirty region needs to be changed.
The default implementation delegates its functionality to
|
processComponentEvent | back to summary |
---|---|
protected void processComponentEvent(ComponentEvent e, JLayer<? extends V> l) Processes component events occurring on the
This method is not called unless component events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.COMPONENT_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processFocusEvent | back to summary |
---|---|
protected void processFocusEvent(FocusEvent e, JLayer<? extends V> l) Processes focus events occurring on the
This method is not called unless focus events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.FOCUS_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processHierarchyBoundsEvent | back to summary |
---|---|
protected void processHierarchyBoundsEvent(HierarchyEvent e, JLayer<? extends V> l) Processes hierarchy bounds event occurring on the
This method is not called unless hierarchy bounds events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processHierarchyEvent | back to summary |
---|---|
protected void processHierarchyEvent(HierarchyEvent e, JLayer<? extends V> l) Processes hierarchy event occurring on the
This method is not called unless hierarchy events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.HIERARCHY_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processInputMethodEvent | back to summary |
---|---|
protected void processInputMethodEvent(InputMethodEvent e, JLayer<? extends V> l) Processes input event occurring on the
This method is not called unless input events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.INPUT_METHOD_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processKeyEvent | back to summary |
---|---|
protected void processKeyEvent(KeyEvent e, JLayer<? extends V> l) Processes key events occurring on the
This method is not called unless key events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.KEY_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); } |
processMouseEvent | back to summary |
---|---|
protected void processMouseEvent(MouseEvent e, JLayer<? extends V> l) Processes mouse events occurring on the
This method is not called unless mouse events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.MOUSE_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processMouseMotionEvent | back to summary |
---|---|
protected void processMouseMotionEvent(MouseEvent e, JLayer<? extends V> l) Processes mouse motion event occurring on the
This method is not called unless mouse motion events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.MOUSE_MOTION_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
processMouseWheelEvent | back to summary |
---|---|
protected void processMouseWheelEvent(MouseWheelEvent e, JLayer<? extends V> l) Processes mouse wheel event occurring on the
This method is not called unless mouse wheel events are
enabled for the public void installUI(JComponent c) { super.installUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(AWTEvent.MOUSE_WHEEL_EVENT_MASK); } public void uninstallUI(JComponent c) { super.uninstallUI(c); JLayer l = (JLayer) c; l.setLayerEventMask(0); }
|
removePropertyChangeListener | back to summary |
---|---|
public void removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.
If
|
removePropertyChangeListener | back to summary |
---|---|
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a
If
|
uninstallUI | back to summary |
---|---|
public void uninstallUI(JComponent c) Overrides javax. Reverses the configuration which was previously set
in the
|
updateUI | back to summary |
---|---|
public void updateUI(JLayer<? extends V> l) Invoked when
|