|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
org.icepdf.ri.util.jxlayer.plaf.LayerUI<V>
V - one of the super types of JXLayer's view componentpublic abstract class LayerUI<V extends java.awt.Component>
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 AWTEvents 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),
JXLayer.setView(Component),
JXLayer.getView(),
Serialized Form| Constructor Summary | |
|---|---|
LayerUI()
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property. |
void |
eventDispatched(java.awt.AWTEvent e,
JXLayer<? extends V> l)
Dispatches AWTEvents for JXLayer
and all it subcomponents to this LayerUI. |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Support for reporting bound property changes for Object properties. |
java.awt.Dimension |
getPreferredScrollableViewportSize(JXLayer<? extends V> l)
Returns the preferred size of the viewport for a view component. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns an array of all the listeners which have been associated with the named property. |
int |
getScrollableBlockIncrement(JXLayer<? extends 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<? extends 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<? extends 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<? extends 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. |
void |
handlePropertyChangeEvent(java.beans.PropertyChangeEvent evt,
JXLayer<? extends V> l)
Notifies the LayerUI when any of its property is changed
and allows to update every JXLayer this LayerUI is set to. |
void |
installUI(javax.swing.JComponent c)
Configures the JXLayer this LayerUI is set to. |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Paints the specified component. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener
list for a specific property. |
void |
uninstallUI(javax.swing.JComponent c)
|
void |
updateUI(JXLayer<? extends 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, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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.
paint in class javax.swing.plaf.ComponentUIg - the Graphics context in which to paint;c - the component being painted;
it can be safely cast to the JXLayer<V>
public void eventDispatched(java.awt.AWTEvent e,
JXLayer<? extends V> l)
AWTEvents for JXLayer
and all it subcomponents to this LayerUI.
To enable the AWTEvent of particular type,
you should call JXLayer.setLayerEventMask(long)
in installUI(javax.swing.JComponent)
and set the layer event mask to 0
in uninstallUI(javax.swing.JComponent) after that
e - the event to be dispatchedl - the layer this LayerUI is set toJXLayer.setLayerEventMask(long),
JXLayer.getLayerEventMask()public void updateUI(JXLayer<? extends V> l)
JXLayer.updateUI() is called
from the JXLayer this LayerUI is set to.
l - the JXLayer which UI is updatedpublic void installUI(javax.swing.JComponent c)
JXLayer this LayerUI is set to.
The default implementation registers the LayerUI
as a property change listener for the passed JXLayer
installUI in class javax.swing.plaf.ComponentUIc - the JXLayer where this UI delegate is being installedpublic void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.ComponentUIpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener is null,
no exception is thrown and no action is performed.
listener - the property change listener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener),
getPropertyChangeListeners(),
addPropertyChangeListener(String, java.beans.PropertyChangeListener)public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener),
getPropertyChangeListeners(),
removePropertyChangeListener(String, PropertyChangeListener)public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListeners
or an empty array if no property change
listeners are currently registeredaddPropertyChangeListener(java.beans.PropertyChangeListener),
removePropertyChangeListener(java.beans.PropertyChangeListener),
getPropertyChangeListeners(String)
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName or listener is null,
no exception is thrown and no action is taken.
propertyName - one of the property names listed abovelistener - the property change listener to be addedremovePropertyChangeListener(String, PropertyChangeListener),
getPropertyChangeListeners(String),
addPropertyChangeListener(String, PropertyChangeListener)
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
PropertyChangeListener from the listener
list for a specific property. This method should be used to remove
PropertyChangeListeners
that were registered for a specific bound property.
If propertyName or listener is null,
no exception is thrown and no action is taken.
propertyName - a valid property namelistener - the PropertyChangeListener to be removedaddPropertyChangeListener(String, PropertyChangeListener),
getPropertyChangeListeners(String),
removePropertyChangeListener(PropertyChangeListener)public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
PropertyChangeListeners associated with
the named property; if no such listeners have been added or
if propertyName is null, an empty
array is returnedaddPropertyChangeListener(String, PropertyChangeListener),
removePropertyChangeListener(String, PropertyChangeListener),
getPropertyChangeListeners()
protected void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
propertyName - the property whose value has changedoldValue - the property's previous valuenewValue - the property's new value
public void handlePropertyChangeEvent(java.beans.PropertyChangeEvent evt,
JXLayer<? extends V> l)
LayerUI when any of its property is changed
and allows to update every JXLayer this LayerUI is set to.
evt - the PropertyChangeEvent generated by this LayerUIl - the JXLayer this LayerUI is set topublic java.awt.Dimension getPreferredScrollableViewportSize(JXLayer<? extends V> l)
()
public int getScrollableBlockIncrement(JXLayer<? extends V> l,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Scrollable.getScrollableBlockIncrement(Rectangle, int, int)public boolean getScrollableTracksViewportHeight(JXLayer<? extends V> l)
Scrollable.getScrollableTracksViewportHeight()public boolean getScrollableTracksViewportWidth(JXLayer<? extends V> l)
Scrollable,
getScrollableTracksViewportWidth(JXLayer)
public int getScrollableUnitIncrement(JXLayer<? extends V> l,
java.awt.Rectangle visibleRect,
int orientation,
int direction)
Scrollable.getScrollableUnitIncrement(Rectangle, int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||