|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.experiment.gui.views.helpers.ChangeTracker
public class ChangeTracker
Utility class providing static methods for marking
JLabels and tabs when their connected editable
components change.
The component must add a ChangeableActionListener
as action listener, and pass the label and the panel
to be marked in its constructor.
ChangeTracker assumes the parent of the JPanel to be
a JTabbedPane.
The class also provides similar static methods for
marking DefaultMutableTreeNode
s in a tree.
No listener is necessary for nodes.
Constructor Summary | |
---|---|
ChangeTracker()
|
Method Summary | |
---|---|
static void |
addListener(javax.swing.text.JTextComponent component,
javax.swing.JLabel label,
javax.swing.JPanel panel)
Add a change listener for the component. |
static void |
clearChanges()
|
static void |
clearChanges(int changeType)
|
static void |
clearComponent(javax.swing.JComponent component)
|
static void |
clearNode(javax.swing.tree.TreeNode node)
|
static java.util.LinkedList |
getChangedComponents()
Returns a list of all changed components. |
static java.util.LinkedList |
getChangedNodes()
Returns a list of all changed nodes. |
static boolean |
hasChanges(javax.swing.JComponent component)
Returns true if this component has changed. |
static boolean |
hasChanges(javax.swing.tree.TreeNode node)
Returns true if this node has changed. |
static boolean |
hasComponentChanges()
Returns true if there are changes in any components. |
static boolean |
hasNodeChanges()
Returns true if there are changes in any nodes. |
static void |
performedChange(javax.swing.JComponent comp)
|
static void |
performedChange(javax.swing.JComponent comp1,
javax.swing.JComponent comp2)
|
static void |
performedChange(javax.swing.tree.TreeNode node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChangeTracker()
Method Detail |
---|
public static void performedChange(javax.swing.JComponent comp)
public static void performedChange(javax.swing.JComponent comp1, javax.swing.JComponent comp2)
public static void performedChange(javax.swing.tree.TreeNode node)
public static void clearChanges()
public static void clearChanges(int changeType)
public static void clearComponent(javax.swing.JComponent component)
public static void clearNode(javax.swing.tree.TreeNode node)
public static boolean hasComponentChanges()
public static boolean hasNodeChanges()
public static boolean hasChanges(javax.swing.JComponent component)
component
-
public static boolean hasChanges(javax.swing.tree.TreeNode node)
node
-
public static java.util.LinkedList getChangedComponents()
public static java.util.LinkedList getChangedNodes()
public static void addListener(javax.swing.text.JTextComponent component, javax.swing.JLabel label, javax.swing.JPanel panel)
component
- label
- panel
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |