|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
org.jdesktop.jxlayer.plaf.LayerUI<V>
public abstract class LayerUI<V extends javax.swing.JComponent>
The base class for all JXLayer's UI delegates.
paint(java.awt.Graphics, javax.swing.JComponent) method performes the
painting of the JXLayer
and eventDispatched(AWTEvent, JXLayer) method is notified
about any input or focus events which have been generated by a JXLayer
or any of its subcomponents.
The LayerUI is different from 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 JXLayers or not shareable.
JXLayer.setUI(LayerUI),
AbstractLayerUI| Constructor Summary | |
|---|---|
LayerUI()
|
|
| Method Summary | |
|---|---|
void |
eventDispatched(java.awt.AWTEvent event,
JXLayer<V> l)
Dispatches all input and focus events from the JXLayer
and all it subcomponents to this LayerUI,
when LayerItem.isEnabled() returns true. |
javax.accessibility.Accessible |
getAccessibleChild(javax.swing.JComponent c,
int i)
|
int |
getAccessibleChildrenCount(javax.swing.JComponent c)
|
long |
getLayerEventMask()
Returns the bitmap of event mask to receive by this LayerUI
and all its JXLayers
It means that eventDispatched(AWTEvent, JXLayer) method
will only receive events that match the event mask. |
java.awt.Dimension |
getPreferredScrollableViewportSize(JXLayer<V> l)
Returns the preferred size of the viewport for a view component. |
int |
getScrollableBlockIncrement(JXLayer<V> l,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation. |
boolean |
getScrollableTracksViewportHeight(JXLayer<V> l)
Returns false to indicate that the height of the viewport does not determine the height of the layer, unless the preferred height of the layer is smaller than the viewports height. |
boolean |
getScrollableTracksViewportWidth(JXLayer<V> l)
Returns false to indicate that the width of the viewport does not determine the width of the layer, unless the preferred width of the layer is smaller than the viewports width. |
int |
getScrollableUnitIncrement(JXLayer<V> l,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation. |
boolean |
isEventEnabled(int id)
Returns true if the events with the passed id
are enabled for this LayerUI |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Paints the specified component. |
void |
update(java.awt.Graphics g,
javax.swing.JComponent c)
JXLayer manages its painting in a different way
so this method doesn't call the paint(Graphics, JComponent) method
after background is filled for the opaque JXLayers. |
void |
updateUI(JXLayer<V> l)
Invoked when JXLayer.updateUI() is called
from the JXLayer this LayerUI is set to. |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, createUI, getMaximumSize, getMinimumSize, getPreferredSize, installUI, uninstallUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jdesktop.jxlayer.plaf.item.LayerItem |
|---|
addLayerItemListener, getLayerItemListeners, isEnabled, removeLayerItemListener |
| Constructor Detail |
|---|
public LayerUI()
| Method Detail |
|---|
public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
Graphics object to
render the content of the component.
Note: Subclasses can safely cast the passed component
to the JXLayer<V> Graphics
to the Graphics2D instance.
paint in class javax.swing.plaf.ComponentUIg - the Graphics context in which to paint;
this object can be safely cast to the Graphics2D instance.c - the component being painted;
it can be safely cast to the JXLayer<V>
public void eventDispatched(java.awt.AWTEvent event,
JXLayer<V> l)
JXLayer
and all it subcomponents to this LayerUI,
when LayerItem.isEnabled() returns true.
event - the event to be dispatchedl - the layer this LayerUI is set topublic long getLayerEventMask()
LayerUI
and all its JXLayers
It means that eventDispatched(AWTEvent, JXLayer) method
will only receive events that match the event mask. By default the mask
includes mouse, mouse motion, mouse wheel, keyboard and focus events.
LayerUIpublic boolean isEventEnabled(int id)
true if the events with the passed id
are enabled for this LayerUI
id - id of the event to be checked
true if the events with the the passed id
are enabled for this JXLayer, otherwise returns falsepublic void updateUI(JXLayer<V> l)
JXLayer.updateUI() is called
from the JXLayer this LayerUI is set to.
l - the JXLayer which UI is updated
public final void update(java.awt.Graphics g,
javax.swing.JComponent c)
JXLayer manages its painting in a different way
so this method doesn't call the paint(Graphics, JComponent) method
after background is filled for the opaque JXLayers.
update in class javax.swing.plaf.ComponentUI
public final javax.accessibility.Accessible getAccessibleChild(javax.swing.JComponent c,
int i)
getAccessibleChild in class javax.swing.plaf.ComponentUIpublic final int getAccessibleChildrenCount(javax.swing.JComponent c)
getAccessibleChildrenCount in class javax.swing.plaf.ComponentUIpublic java.awt.Dimension getPreferredScrollableViewportSize(JXLayer<V> l)
Scrollable.getPreferredScrollableViewportSize()
public int getScrollableBlockIncrement(JXLayer<V> l,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Scrollable.getScrollableBlockIncrement(Rectangle, int, int)public boolean getScrollableTracksViewportHeight(JXLayer<V> l)
Scrollable.getScrollableTracksViewportHeight()public boolean getScrollableTracksViewportWidth(JXLayer<V> l)
Scrollable,
getScrollableTracksViewportWidth(JXLayer)
public int getScrollableUnitIncrement(JXLayer<V> l,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Scrolling containers, like JScrollPane, will use this method each time the user requests a unit scroll.
Scrollable.getScrollableUnitIncrement(Rectangle, int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||