Package com.jidesoft.swing
Interface JideSwingUtilities.GetHandler
-
- Enclosing class:
- JideSwingUtilities
public static interface JideSwingUtilities.GetHandler
A simple handler used by getRecursively.
. Here is an example to get the first child of the specified type.if ( condition() ) { return action(); }
public static Component getFirstChildOf(final Class clazz, Component c) { return getRecursively(c, new GetHandler() { public boolean condition(Component c) { return clazz.isAssignableFrom(c.getClass()); } public Component action(Component c) { return c; } }); }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.Component
action(java.awt.Component c)
The action you want to perform on this component.boolean
condition(java.awt.Component c)
If true, it will callaction(java.awt.Component)
on this component.
-
-
-
Method Detail
-
condition
boolean condition(java.awt.Component c)
If true, it will callaction(java.awt.Component)
on this component.- Parameters:
c
- the component- Returns:
- true or false.
-
action
java.awt.Component action(java.awt.Component c)
The action you want to perform on this component. This method will only be called ifcondition(java.awt.Component)
returns true.- Parameters:
c
- the component- Returns:
- the component that will be returned from
JideSwingUtilities.getRecursively(java.awt.Component, com.jidesoft.swing.JideSwingUtilities.GetHandler)
.
-
-