com.sshtools.common.ui
Class UIUtil

java.lang.Object
  extended by 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$

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
UIUtil()
           
 
Method Summary
static void jGridBagAdd(javax.swing.JComponent parent, java.awt.Component componentToAdd, java.awt.GridBagConstraints constraints, int pos)
           
static javax.swing.KeyStroke parseAcceleratorString(java.lang.String string)
          Parse a string in the format of [ALT+|CTRL+|SHIFT+] to create a keystroke.
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.
static void positionComponent(int p, java.awt.Component c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIUtil

public UIUtil()
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 -


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.