Package com.sshtools.common.ui
Class UIUtil
- java.lang.Object
-
- com.sshtools.common.ui.UIUtil
-
- All Implemented Interfaces:
javax.swing.SwingConstants
public class UIUtil extends java.lang.Object implements javax.swing.SwingConstants- Version:
- $Revision: 1.16 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Constructor Description UIUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidjGridBagAdd(javax.swing.JComponent parent, java.awt.Component componentToAdd, java.awt.GridBagConstraints constraints, int pos)static javax.swing.KeyStrokeparseAcceleratorString(java.lang.String string)Parse a string in the format of [ALT+|CTRL+|SHIFT+]to create a keystroke. static java.lang.IntegerparseMnemonicString(java.lang.String string)Parse a string in the format of[character]to create an Integer that may be used for an action.static voidpositionComponent(int p, java.awt.Component c)
-
-
-
Method Detail
-
parseMnemonicString
public static java.lang.Integer parseMnemonicString(java.lang.String string)
Parse a string in the format of[character]to create an Integer that may be used for an action.- Parameters:
character- mnemonic string- Returns:
- mnemonic
-
parseAcceleratorString
public static javax.swing.KeyStroke parseAcceleratorString(java.lang.String string)
Parse a string in the format of [ALT+|CTRL+|SHIFT+]to create a keystroke. This can be used to define accelerators from resource bundles - Parameters:
string- accelerator string- Returns:
- keystroke
-
jGridBagAdd
public static void jGridBagAdd(javax.swing.JComponent parent, java.awt.Component componentToAdd, java.awt.GridBagConstraints constraints, int pos)- Parameters:
parent-componentToAdd-constraints-pos-- Throws:
java.lang.IllegalArgumentException
-
positionComponent
public static void positionComponent(int p, java.awt.Component c)- Parameters:
p-c-
-
-