For example, given a {@code JTextField} within a content frame, theapplication logic may need to check to see if the text field resides within a certain application-specific container set. Perhaps all {@code JTables}embedded within {@code JSplitPanes} are significant within the particularapplication. The {@code find(Component searchSrc, Class childClass, Class parentClass)} methodon this class will be able to return a {@code NestedComponents} instanceindicating whether the specified text field resides within a {@code JTable}that is embedded within a {@code JSplitPane}.
Although perhaps a bit contrived, this example shows a generic use for this class. The FlexDock framework itself has a particular interest in {@code Dockable} components that are embedded within {@code DockingPorts}, especially during drag operations. As a {@code Dockable} is dragged over an{@code DockingPort}, this class allows the framework to determine with a single object instance any {@code Dockables} currently embedded within thetarget {@code DockingPort}, starting with the deepest {@code Component} atthe current mouse point during the drag.
This classes' member fields are {@code public} and may be both accessed andmodified by external code as needed within their particular usage context. This is by design for ease of use within the FlexDock framework. Consequently, instances of this class should only be used for short-lived operations. Since its member fields may be modified publicly, instances of this class should not be cached, nor should its member values be indexed as they are subject to arbitrary changes over the long term. @author Christopher Butler
|
|
|
|