public class UIUtil
extends java.lang.Object
org.fife.rsta.ui GUI components.| Modifier and Type | Method and Description |
|---|---|
static boolean |
browse(java.lang.String uri)
Attempts to open a web browser to the specified URI.
|
static boolean |
browse(java.net.URI uri)
Attempts to open a web browser to the specified URI.
|
static void |
fixComboOrientation(javax.swing.JComboBox combo)
Fixes the orientation of the renderer of a combo box.
|
static javax.swing.border.Border |
getEmpty5Border()
Returns an empty border of width 5 on all sides.
|
static java.awt.Color |
getErrorTextForeground()
Returns a color to use for "error" text in a text field.
|
static int |
getMnemonic(java.util.ResourceBundle msg,
java.lang.String key)
Returns the mnemonic specified by the given key in a resource bundle.
|
static javax.swing.text.JTextComponent |
getTextComponent(javax.swing.JComboBox combo)
Returns the text editor component for the specified combo box.
|
static void |
makeSpringCompactGrid(java.awt.Container parent,
int rows,
int cols,
int initialX,
int initialY,
int xPad,
int yPad)
This method is ripped off from
SpringUtilities.java found
on Sun's Java Tutorial pages. |
static javax.swing.JButton |
newButton(java.util.ResourceBundle bundle,
java.lang.String key)
Returns a button with the specified text.
|
static javax.swing.JLabel |
newLabel(java.util.ResourceBundle msg,
java.lang.String key,
java.awt.Component labelFor)
Returns an
JLabel with the specified text. |
public static boolean browse(java.lang.String uri)
uri - The URI to open. If this is null, nothing
happens and this method returns false.false on JRE's older than 1.6.browse(URI)public static boolean browse(java.net.URI uri)
uri - The URI to open. If this is null, nothing
happens and this method returns false.false on JRE's older than 1.6.browse(String)public static void fixComboOrientation(javax.swing.JComboBox combo)
combo - The combo box.public static javax.swing.border.Border getEmpty5Border()
public static final java.awt.Color getErrorTextForeground()
public static final int getMnemonic(java.util.ResourceBundle msg,
java.lang.String key)
msg - The resource bundle.key - The key for the mnemonic.0 if not found.public static final javax.swing.text.JTextComponent getTextComponent(javax.swing.JComboBox combo)
combo - The combo box.public static final void makeSpringCompactGrid(java.awt.Container parent,
int rows,
int cols,
int initialX,
int initialY,
int xPad,
int yPad)
SpringUtilities.java found
on Sun's Java Tutorial pages. It takes a component whose layout is
SpringLayout and organizes the components it contains into
a nice grid.
Aligns the first rows * cols components of
parent in a grid. Each component in a column is as wide as
the maximum preferred width of the components in that column; height is
similarly determined for each row. The parent is made just big enough
to fit them all.parent - The container whose layout is SpringLayout.rows - The number of rows of components to make in the container.cols - The number of columns of components to make.initialX - The x-location to start the grid at.initialY - The y-location to start the grid at.xPad - The x-padding between cells.yPad - The y-padding between cells.public static final javax.swing.JButton newButton(java.util.ResourceBundle bundle,
java.lang.String key)
getString(textKey) + ".Mnemonic" is
defined, it is used as the mnemonic for the button.bundle - The resource bundle in which to get the int.key - The key into the bundle containing the string text value.public static final javax.swing.JLabel newLabel(java.util.ResourceBundle msg,
java.lang.String key,
java.awt.Component labelFor)
JLabel with the specified text. If another
property with name getString(textKey) + ".Mnemonic" is
defined, it is used as the mnemonic for the label.msg - The resource bundle.key - The key into the bundle containing the string text value.labelFor - The component the label is labeling.JLabel.