|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.0) E13403-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.ui.ViewportChangeNotifier
public class ViewportChangeNotifier
It is sometimes useful to know if a component has changed its position on screen as a result of scrolling. The component might not be added directly to the scrolled viewport or it might be part of a component hierarchy that contains many viewports. This class finds all of the viewports in a components hierarchy and listens for position changes to them, forwarding their events to interested ChangeListeners. To use, create an instance of this class with the component to monitor. The instance will begin listening to the viewports in the component hierarchy immediately or whenever the component is first added to the hierarchy. If the component hierarchy changes at any parent level then this mechanism reassociates automatically with any new or removed viewports. When done, dispose() must be called or the references to the viewports and the component may be retained causing a memory leak.
Constructor Summary | |
---|---|
ViewportChangeNotifier(javax.swing.JComponent component)
Create an instance of a ViewportChangeNotifier and begin listening to any viewports in its component hierarchy. |
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
|
void |
dispose()
Stop listening to any viewports in the hierarchy, and cleanup. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewportChangeNotifier(javax.swing.JComponent component)
component
- Method Detail |
---|
public void dispose()
public void addChangeListener(javax.swing.event.ChangeListener listener)
public void removeChangeListener(javax.swing.event.ChangeListener listener)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.0) E13403-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |