org.eclipse.tptp.test.manual.runner.ui.internal.util
Class SwingUtil
java.lang.Object
org.eclipse.tptp.test.manual.runner.ui.internal.util.SwingUtil
- public class SwingUtil
- extends java.lang.Object
- Since:
- 1.0.2
|
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 |
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
SwingUtil
public SwingUtil()
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)