|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.ui.UIUtil
Utility methods for org.fife.ui GUI components.
| Method Summary | |
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 javax.swing.JLabel |
createLabel(java.util.ResourceBundle msg,
java.lang.String textKey,
java.lang.String mnemonicKey)
Returns an JLabel with the specified text and mnemonic. |
static javax.swing.JRadioButton |
createRadioButton(java.util.ResourceBundle bundle,
java.lang.String textKey,
java.lang.String mnemonicKey)
Returns an JRadioButton with the specified text and
mnemonic. |
static RButton |
createRButton(javax.swing.Action action,
java.util.ResourceBundle bundle,
java.lang.String mnemonicKey)
Returns an org.fife.ui.RButton created from the specified
action and with the specified mnemonic. |
static RButton |
createRButton(java.util.ResourceBundle bundle,
java.lang.String textKey,
java.lang.String mnemonicKey)
Returns an org.fife.ui.RButton with the specified text and
mnemonic. |
static RButton |
createTabbedPaneButton(java.lang.String text)
Returns a button to add to a panel in a tabbed pane. |
static javax.swing.JPanel |
createTabbedPanePanel()
Returns an opaque panel so we get the cool gradient effect on Windows XP and Vista. |
static javax.swing.JPanel |
createTabbedPanePanel(java.awt.LayoutManager layout)
Returns an opaque panel so we get the cool gradient effect on Windows XP and Vista. |
static java.awt.Color |
deriveColor(java.awt.Color orig,
int darker)
Derives a color from another color by linearly shifting its blue, green, and blue values. |
static void |
expandAllNodes(javax.swing.JTree tree)
Expands all nodes in the specified tree. |
static void |
fixComboOrientation(javax.swing.JComboBox combo)
Fixes the orientation of the renderer of a combo box. |
static void |
fixJTableRendererOrientations(javax.swing.JTable table)
Fixes the orientation of the default JTable renderers (for Object, Number and Boolean) to match that of the current Locale
(e.g. |
static javax.swing.border.Border |
getEmpty5Border()
Returns an empty border of width 5 on all sides. |
static java.lang.String |
getHTMLFormatForColor(java.awt.Color color)
Returns a String of the form "#xxxxxx" good for use
in HTML, representing the given color. |
static void |
installOsSpecificLafTweaks()
Tweaks certain LookAndFeels (i.e., Windows XP) to look just a tad more like the native Look. |
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 void |
setDescription(javax.swing.JComponent comp,
java.util.ResourceBundle msg,
java.lang.String key)
Sets the accessible description on the specified component. |
static java.util.Map |
setNativeRenderingHints(java.awt.Graphics2D g2d)
Sets the rendering hints on a graphics object to those closest to the system's desktop values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
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 final javax.swing.JLabel createLabel(java.util.ResourceBundle msg,
java.lang.String textKey,
java.lang.String mnemonicKey)
JLabel with the specified text and mnemonic.
msg - The resource bundle in which to get the int.textKey - The key into the bundle containing the string text value.mnemonicKey - The key into the bundle containing a single-char
String value for the mnemonic.
JLabel.
public static final javax.swing.JRadioButton createRadioButton(java.util.ResourceBundle bundle,
java.lang.String textKey,
java.lang.String mnemonicKey)
JRadioButton with the specified text and
mnemonic.
bundle - The resource bundle in which to get the int.textKey - The key into the bundle containing the string text value.mnemonicKey - The key into the bundle containing a single-char
String value for the mnemonic.
JRadioButton.
public static final RButton createRButton(java.util.ResourceBundle bundle,
java.lang.String textKey,
java.lang.String mnemonicKey)
org.fife.ui.RButton with the specified text and
mnemonic.
bundle - The resource bundle in which to get the int.textKey - The key into the bundle containing the string text value.mnemonicKey - The key into the bundle containing a single-char
String value for the mnemonic.
RButton.
public static final RButton createRButton(javax.swing.Action action,
java.util.ResourceBundle bundle,
java.lang.String mnemonicKey)
org.fife.ui.RButton created from the specified
action and with the specified mnemonic.
action - The action for the button.bundle - The resource bundle in which to get the int.mnemonicKey - The key into the bundle containing a single-char
String value for the mnemonic.
RButton.public static RButton createTabbedPaneButton(java.lang.String text)
JTabbedPane.createTabbedPanePanel()public static javax.swing.JPanel createTabbedPanePanel()
JTabbedPane.createTabbedPaneButton(String)public static javax.swing.JPanel createTabbedPanePanel(java.awt.LayoutManager layout)
layout - The layout for the panel.
JTabbedPane.createTabbedPaneButton(String)
public static final java.awt.Color deriveColor(java.awt.Color orig,
int darker)
orig - The original color.darker - The amount by which to decrease its r, g, and b values.
Note that you can use negative values for making a color
component "brighter." If this makes any of the three values
less than zero, zero is used for that component value; similarly,
if it makes any value greater than 255, 255 is used for that
component's value.public static void expandAllNodes(javax.swing.JTree tree)
tree - The tree.public static void fixComboOrientation(javax.swing.JComboBox combo)
combo - The combo box.public static void fixJTableRendererOrientations(javax.swing.JTable table)
Locale
(e.g. ComponentOrientation.getOrientation(table.getLocale())).
This is needed because DefaultTableCellRenderer does not
do this, even though DefaultListCellRenderer and
DefaultTreeCellRenderer do.See Sun bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6333197 for more information.
table - The table to update.public static javax.swing.border.Border getEmpty5Border()
public static final java.lang.String getHTMLFormatForColor(java.awt.Color color)
String of the form "#xxxxxx" good for use
in HTML, representing the given color.
color - The color to get a string for.
color is
null, #000000 is returned.public static void installOsSpecificLafTweaks()
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 umber 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 void setDescription(javax.swing.JComponent comp,
java.util.ResourceBundle msg,
java.lang.String key)
comp - The component on which to set the accessible description.msg - A resource bundle from which to get the description.key - The key for the description in the resource bundle.public static java.util.Map setNativeRenderingHints(java.awt.Graphics2D g2d)
See AWT Desktop Properties for more information.
g2d - The graphics context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||