public class Utility
extends java.lang.Object
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Component |
addLeftJustifiedComponent(java.awt.Component component) |
static java.awt.Component |
addRightJustifiedComponent(java.awt.Component component) |
static javax.swing.JButton |
createButton(java.lang.Class resourceClass,
java.lang.String imageResourceName,
java.lang.String tooltip,
javax.swing.Action action)
This creates a button with the specified action, image, and tooltip text.
|
static javax.swing.JDialog |
createDialog(java.awt.Window parent,
java.lang.String title,
boolean isModal)
This creates a dialog.
|
static javax.swing.JMenuItem |
createMenuItem(java.lang.Class resourceClass,
java.lang.String name,
java.lang.String imageResourceName,
javax.swing.Action action) |
static javax.swing.JToggleButton |
createToggleButton(java.lang.Class resourceClass,
java.lang.String imageResourceName,
java.lang.String tooltip,
javax.swing.Action action) |
static javax.swing.ImageIcon |
getImageIcon(java.lang.Class resourceClass,
java.lang.String imageResourceName) |
static boolean |
isCTRLDown(int eventModifiersEx)
this determines if the CTRL key is down based on the modifiers from an event.
|
static void |
scrollToText(javax.swing.text.JTextComponent textComponent,
int startingIndex,
int endingIndex)
Scrolls the specified text component so the text between the starting and ending index are visible.
|
static void |
setTabComponent15Compatible(javax.swing.JTabbedPane tabbedPane,
int index,
java.awt.Component component)
This uses reflection to set the tab component if we're running under 1.6.
|
public static java.awt.Component addLeftJustifiedComponent(java.awt.Component component)
public static java.awt.Component addRightJustifiedComponent(java.awt.Component component)
public static javax.swing.JDialog createDialog(java.awt.Window parent,
java.lang.String title,
boolean isModal)
parent - the parent windowisModal - true if its modal, false if not.public static void setTabComponent15Compatible(javax.swing.JTabbedPane tabbedPane,
int index,
java.awt.Component component)
public static javax.swing.JButton createButton(java.lang.Class resourceClass,
java.lang.String imageResourceName,
java.lang.String tooltip,
javax.swing.Action action)
resourceClass - the calling class. Useful when multiple classloaders are used.imageResourceName - the image resourcetooltip - the tooltip to displayaction - the action to performpublic static javax.swing.JToggleButton createToggleButton(java.lang.Class resourceClass,
java.lang.String imageResourceName,
java.lang.String tooltip,
javax.swing.Action action)
public static javax.swing.JMenuItem createMenuItem(java.lang.Class resourceClass,
java.lang.String name,
java.lang.String imageResourceName,
javax.swing.Action action)
public static boolean isCTRLDown(int eventModifiersEx)
public static javax.swing.ImageIcon getImageIcon(java.lang.Class resourceClass,
java.lang.String imageResourceName)
public static void scrollToText(javax.swing.text.JTextComponent textComponent,
int startingIndex,
int endingIndex)
Copyright © 2013. All rights reserved