javatools.swing
Class MoreSwingUtilities

java.lang.Object
  |
  +--javatools.swing.MoreSwingUtilities

public class MoreSwingUtilities
extends java.lang.Object

Additional static methods for Swing components.


Constructor Summary
MoreSwingUtilities()
          Creates a new instance of MoreSwingUtilities
 
Method Summary
static void disableTabs(javax.swing.JTabbedPane tab)
          Disable all tabs of a JTabbedPane.
static void enableTab(javax.swing.JTabbedPane tab, int index)
          Enables a tab of a JTabbedPane.
static void expandLater(javax.swing.JTree tree, javax.swing.tree.TreeNode node)
          Expands a node in a thread-safe way.
static void invokeWakingUp(RunningRunnable runnable)
          Calls a wakeUp method of a RunningRunnable object when the event queue dispatches it.
static void reloadTree(javax.swing.JTree tree)
          Reloads a tree in a thread-safe way.
static void reloadTree(javax.swing.JTree tree, javax.swing.tree.TreeNode node)
          Reloads a tree in a thread-safe way.
static void resizeTable(javax.swing.JTable table, int[] sizes)
          Resizes a table in a thread-safe way.
static void setTextLater(javax.swing.JLabel label, java.lang.String text)
          Sets a label's text in a thread-safe way.
static void useDbRow(DbRowUser user, DbRow row)
          Calls the use method of a DbRowUser object in a thread-safe way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoreSwingUtilities

public MoreSwingUtilities()
Creates a new instance of MoreSwingUtilities

Method Detail

invokeWakingUp

public static void invokeWakingUp(RunningRunnable runnable)
Calls a wakeUp method of a RunningRunnable object when the event queue dispatches it.

Parameters:
runnable - The object to use.

reloadTree

public static void reloadTree(javax.swing.JTree tree)
Reloads a tree in a thread-safe way.

Parameters:
tree - The tree to be reloaded.

reloadTree

public static void reloadTree(javax.swing.JTree tree,
                              javax.swing.tree.TreeNode node)
Reloads a tree in a thread-safe way.

Parameters:
tree - The tree to be reloaded.
node - The node to be reloaded.

expandLater

public static void expandLater(javax.swing.JTree tree,
                               javax.swing.tree.TreeNode node)
Expands a node in a thread-safe way.

Parameters:
tree - The tree to be expanded.
node - The node to be expanded.

resizeTable

public static void resizeTable(javax.swing.JTable table,
                               int[] sizes)
Resizes a table in a thread-safe way.

Parameters:
table - The table to be resized.
sizes - The array of sizes. Each index corresponds to each column's index of the table.

disableTabs

public static void disableTabs(javax.swing.JTabbedPane tab)
Disable all tabs of a JTabbedPane.

Parameters:
tab - The tabbed pane to be used.

enableTab

public static void enableTab(javax.swing.JTabbedPane tab,
                             int index)
Enables a tab of a JTabbedPane.

Parameters:
tab - The tabbed pane to use.
index - The index of the tab to be enabled.

useDbRow

public static void useDbRow(DbRowUser user,
                            DbRow row)
Calls the use method of a DbRowUser object in a thread-safe way.

Parameters:
user - The object that contains the method.
row - The row to use.

setTextLater

public static void setTextLater(javax.swing.JLabel label,
                                java.lang.String text)
Sets a label's text in a thread-safe way.

Parameters:
label - The label to use.
text - The text to put.