TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.manual.runner.ui.internal.util
Class SwingUtil

java.lang.Object
  extended byorg.eclipse.tptp.test.manual.runner.ui.internal.util.SwingUtil

public class SwingUtil
extends java.lang.Object

Since:
1.0.2

Field Summary
static int COMPLETED
           
static int DISABLED
           
static int NORMAL
           
static int RUNNING
           
 
Constructor Summary
SwingUtil()
           
 
Method Summary
static java.awt.Container addLabelComponentRows(java.awt.Container container, java.awt.GridBagLayout gridbag, javax.swing.JLabel[] labels, javax.swing.JComponent[] components)
           
static void adjustMnemonic(javax.swing.AbstractButton abstractButton)
           
static void adjustMnemonic(javax.swing.JLabel label)
           
static void expandTree(javax.swing.JTree tree, int depth, boolean expand)
          Expands all nodes in a JTree.
static int expandTree(javax.swing.JTree tree, java.lang.Object node, int row, int depth, boolean expand)
          Expands a given node in a JTree.
static javax.swing.Icon getIcon(java.lang.String imageName)
           
static javax.swing.Icon getIcon(java.lang.String imageName, int type, boolean enabled)
           
static java.awt.Dimension getMaxWidth(java.awt.Dimension d1, java.awt.Dimension d2)
           
static java.awt.Dimension resizeDimension(java.awt.Dimension d, double widthFactor, double heightFactor)
           
static boolean selectComboItemByValue(javax.swing.JComboBox combo, java.lang.String value)
           
static void setSameSize(javax.swing.JComponent[] components)
           
static void setSameSize(javax.swing.JComponent[] components, double factor)
           
static void setSameSize(javax.swing.JComponent[] components, double widthFactor, double heightFactor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
See Also:
Constant Field Values

DISABLED

public static final int DISABLED
See Also:
Constant Field Values
Constructor Detail

SwingUtil

public SwingUtil()
Method Detail

addLabelComponentRows

public static java.awt.Container addLabelComponentRows(java.awt.Container container,
                                                       java.awt.GridBagLayout gridbag,
                                                       javax.swing.JLabel[] labels,
                                                       javax.swing.JComponent[] components)

adjustMnemonic

public static void adjustMnemonic(javax.swing.JLabel label)

adjustMnemonic

public static void adjustMnemonic(javax.swing.AbstractButton abstractButton)

expandTree

public static void expandTree(javax.swing.JTree tree,
                              int depth,
                              boolean expand)
Expands all nodes in a JTree.

Parameters:
tree - The JTree to expand.
depth - The depth to which the tree should be expanded. Zero will just expand the root node, a negative value will fully expand the tree, and a positive value will recursively expand the tree to that depth.

expandTree

public static int expandTree(javax.swing.JTree tree,
                             java.lang.Object node,
                             int row,
                             int depth,
                             boolean expand)
Expands a given node in a JTree.

Parameters:
tree - The JTree to expand.
node - The node within tree to expand.
row - The displayed row in tree that represents node.
depth - The depth to which the tree should be expanded. Zero will just expand node, a negative value will fully expand the tree, and a positive value will recursively expand the tree to that depth relative to node.

getMaxWidth

public static java.awt.Dimension getMaxWidth(java.awt.Dimension d1,
                                             java.awt.Dimension d2)

resizeDimension

public static java.awt.Dimension resizeDimension(java.awt.Dimension d,
                                                 double widthFactor,
                                                 double heightFactor)

setSameSize

public static void setSameSize(javax.swing.JComponent[] components)

setSameSize

public static void setSameSize(javax.swing.JComponent[] components,
                               double factor)

setSameSize

public static void setSameSize(javax.swing.JComponent[] components,
                               double widthFactor,
                               double heightFactor)

selectComboItemByValue

public static boolean selectComboItemByValue(javax.swing.JComboBox combo,
                                             java.lang.String value)

getIcon

public static javax.swing.Icon getIcon(java.lang.String imageName)

getIcon

public static javax.swing.Icon getIcon(java.lang.String imageName,
                                       int type,
                                       boolean enabled)

TPTP 4.4.0 Testing Tools Project
Internal API Specification