Package com.sshtools.common.ui
Class UIUtil
java.lang.Object
com.sshtools.common.ui.UIUtil
- All Implemented Interfaces:
SwingConstants
- Version:
- $Revision: 1.16 $
- Author:
- $author$
-
Field Summary
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidjGridBagAdd(JComponent parent, Component componentToAdd, GridBagConstraints constraints, int pos) static KeyStrokeparseAcceleratorString(String string) Parse a string in the format of [ALT+|CTRL+|SHIFT+]to create a keystroke. static IntegerparseMnemonicString(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, Component c)
-
Constructor Details
-
UIUtil
public UIUtil()
-
-
Method Details
-
parseMnemonicString
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
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(JComponent parent, Component componentToAdd, GridBagConstraints constraints, int pos) - Parameters:
parent-componentToAdd-constraints-pos-- Throws:
IllegalArgumentException
-
positionComponent
- Parameters:
p-c-
-