public final class UIUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UIUtil.FlatButtonBorder |
static class |
UIUtil.HistoryAction |
static class |
UIUtil.IconlessButton |
static class |
UIUtil.PlainToolBar |
static class |
UIUtil.RolloverButton |
static class |
UIUtil.SeparatingBorder |
static class |
UIUtil.TextAction
Action supporting the copy, paste, cut and selectAll operations with
localization awareness and dynamic enabled-checks regarding the state of
a designated JTextComponent
|
Modifier and Type | Field and Description |
---|---|
static javax.swing.border.Border |
bottomLineBorder |
static int |
DEFAULT_SCROLL_UNIT_INCREMENT |
static int |
DEFAULT_TOOLTIP_WIDTH |
static int |
DEFAULT_UNDO_LIMIT |
static javax.swing.border.Border |
defaultAreaBorder
Rounded line border in gray
|
static java.awt.Color |
defaultBorderColor |
static javax.swing.border.Border |
defaultBoxBorder
Lined border in gray
|
static javax.swing.border.Border |
defaultContentBorder
Empty border (1, 3, 1, 3)
|
static javax.swing.border.Border |
DUMMY_BORDER |
static javax.swing.border.Border |
emptyBorder
Empty border
|
static javax.swing.border.Border |
FLAT_BUTTON_BORDER |
static javax.swing.border.Border |
leftLineBorder |
static java.awt.datatransfer.DataFlavor |
localObjectFlavor |
static javax.swing.border.Border |
LOWERED_DUMMY_BORDER |
static java.awt.event.MouseListener |
popupListener |
static javax.swing.border.Border |
RAISED_DUMMY_BORDER |
static javax.swing.border.Border |
rightLineBorder |
static javax.swing.border.Border |
topLineBorder |
Modifier and Type | Method and Description |
---|---|
static void |
addHint(javax.swing.text.JTextComponent component,
ResourceDomain resourceDomain,
java.lang.String hint) |
static void |
addPopupMenu(javax.swing.JComponent comp,
javax.swing.JPopupMenu menu) |
static void |
alignToOwner(java.awt.Component owner,
java.awt.Component comp) |
static void |
beep() |
static <C extends java.awt.Component> |
centerComponent(C comp) |
static <C extends java.awt.Component> |
centerComponent(C comp,
java.awt.GraphicsConfiguration gc) |
static void |
changeFocus(java.awt.Component target,
java.awt.Component source) |
static javax.swing.Icon |
createBlankIcon(int width,
int height) |
static javax.swing.JPopupMenu |
createDefaultTextMenu(javax.swing.text.JTextComponent comp,
boolean allowUndo) |
static javax.swing.undo.UndoManager |
createUndoSupport(javax.swing.text.JTextComponent comp,
int limit) |
static javax.swing.JTextArea |
defaultCreateInfoLabel(javax.swing.JComponent container) |
static javax.swing.JLabel |
defaultCreateLoadingLabel(javax.swing.JComponent container) |
static void |
defaultHideSplitPaneDecoration(javax.swing.JSplitPane splitPane) |
static void |
defaultHideTabbedPaneDecoration(javax.swing.JTabbedPane tabbedPane) |
static void |
defaultSetUnitIncrement(java.lang.Object obj) |
static void |
disableCaretScroll(javax.swing.text.JTextComponent comp) |
static void |
disableHtml(java.lang.Object item) |
static void |
enableRighClickListSelection(javax.swing.JList<?> list) |
static void |
enableRighClickTableSelection(javax.swing.JTable table) |
static void |
enableRighClickTreeSelection(javax.swing.JTree tree) |
static void |
enableToolTip(javax.swing.JComponent comp) |
static boolean |
equalsInsets(java.awt.Insets a,
java.awt.Insets b) |
static void |
expandAll(javax.swing.JTree tree,
boolean expand) |
static void |
expandRoot(javax.swing.JTree tree) |
static void |
feedButtonGroup(javax.swing.ButtonGroup group,
javax.swing.JMenu menu,
Actions actions,
java.lang.String... items) |
static void |
feedButtonGroup(javax.swing.ButtonGroup group,
javax.swing.JToolBar toolBar,
Actions actions,
java.lang.String... items) |
static void |
feedMenu(javax.swing.JMenu menu,
Actions actions,
java.lang.String... items) |
static void |
feedPopupMenu(javax.swing.JPopupMenu menu,
Actions actions,
java.lang.String... items) |
static void |
feedToolBar(javax.swing.JToolBar toolBar,
Actions actions,
java.lang.String... items) |
static void |
fitToContent(javax.swing.JComboBox<?> comboBox,
int minWidth,
int maxWidth) |
static void |
fitToContent(javax.swing.JComboBox<?> comboBox,
int minWidth,
int maxWidth,
int height) |
static java.awt.Color |
generateRandomColor(java.awt.Color mix) |
static java.awt.Window |
getActiveWindow() |
static javax.swing.Icon |
getBlankIcon(int width,
int height) |
static java.awt.Color |
getColor(double power)
Generates a color out of a red-green gradient
|
static int |
getDirection(java.lang.String s) |
static java.lang.String[] |
getFontNames() |
static javax.swing.Icon |
getInfoIcon() |
static javax.swing.Icon |
getLargeLoadingIcon() |
static javax.swing.Icon |
getSmallLoadingIcon() |
static javax.swing.undo.UndoManager |
getUndoManager(javax.swing.JComponent comp) |
static void |
invokeAndWait(java.lang.Runnable runnable) |
static void |
invokeLater(java.lang.Runnable runnable) |
static boolean |
isWindowsClassicLAF() |
static boolean |
isWindowsLAF() |
static void |
openConfigDialog(java.lang.String path) |
static void |
pack(java.awt.Component comp) |
static <C extends java.awt.Component> |
resizeComponent(C comp,
java.awt.Dimension dimension) |
static <C extends java.awt.Component> |
resizeComponent(C comp,
java.awt.Dimension min,
java.awt.Dimension pref,
java.awt.Dimension max) |
static <C extends java.awt.Component> |
resizeComponent(C comp,
java.lang.Integer width,
java.lang.Integer height) |
static <C extends java.awt.Component> |
resizeComponent(C comp,
java.lang.Integer minWidth,
java.lang.Integer prefWidth,
java.lang.Integer maxWidth,
java.lang.Integer minHeight,
java.lang.Integer prefHeight,
java.lang.Integer maxHeight) |
static <C extends java.awt.Component> |
resizeIfNeccessary(C comp,
java.awt.Dimension dim) |
static java.lang.String |
toSwingTooltip(java.lang.String tooltip) |
static java.lang.String |
toUnwrappedSwingTooltip(java.lang.String tooltip) |
static <C extends java.awt.Component> |
unsizeComponent(C comp) |
public static final java.awt.datatransfer.DataFlavor localObjectFlavor
public static final int DEFAULT_TOOLTIP_WIDTH
public static final java.awt.Color defaultBorderColor
public static final javax.swing.border.Border defaultAreaBorder
public static final javax.swing.border.Border defaultBoxBorder
public static final javax.swing.border.Border topLineBorder
public static final javax.swing.border.Border bottomLineBorder
public static final javax.swing.border.Border rightLineBorder
public static final javax.swing.border.Border leftLineBorder
public static final javax.swing.border.Border emptyBorder
public static final javax.swing.border.Border defaultContentBorder
public static final int DEFAULT_SCROLL_UNIT_INCREMENT
public static final javax.swing.border.Border DUMMY_BORDER
public static final javax.swing.border.Border LOWERED_DUMMY_BORDER
public static final javax.swing.border.Border RAISED_DUMMY_BORDER
public static final javax.swing.border.Border FLAT_BUTTON_BORDER
public static final int DEFAULT_UNDO_LIMIT
public static final java.awt.event.MouseListener popupListener
public static java.lang.String[] getFontNames()
public static boolean isWindowsLAF()
public static boolean isWindowsClassicLAF()
public static void beep()
public static java.awt.Color getColor(double power)
0.0 gets bright red 1.0 gets bright green
public static java.awt.Color generateRandomColor(java.awt.Color mix)
public static javax.swing.Icon getBlankIcon(int width, int height)
public static javax.swing.Icon createBlankIcon(int width, int height)
public static void enableToolTip(javax.swing.JComponent comp)
public static void enableRighClickTreeSelection(javax.swing.JTree tree)
public static void enableRighClickListSelection(javax.swing.JList<?> list)
public static void enableRighClickTableSelection(javax.swing.JTable table)
public static int getDirection(java.lang.String s)
public static void fitToContent(javax.swing.JComboBox<?> comboBox, int minWidth, int maxWidth)
public static void fitToContent(javax.swing.JComboBox<?> comboBox, int minWidth, int maxWidth, int height)
public static java.lang.String toSwingTooltip(java.lang.String tooltip)
public static java.lang.String toUnwrappedSwingTooltip(java.lang.String tooltip)
public static void pack(java.awt.Component comp)
public static void invokeLater(java.lang.Runnable runnable)
public static void invokeAndWait(java.lang.Runnable runnable) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
java.lang.reflect.InvocationTargetException
java.lang.InterruptedException
public static <C extends java.awt.Component> C resizeComponent(C comp, java.awt.Dimension dimension)
public static <C extends java.awt.Component> C resizeComponent(C comp, java.lang.Integer width, java.lang.Integer height)
public static <C extends java.awt.Component> C resizeComponent(C comp, java.awt.Dimension min, java.awt.Dimension pref, java.awt.Dimension max)
public static <C extends java.awt.Component> C resizeComponent(C comp, java.lang.Integer minWidth, java.lang.Integer prefWidth, java.lang.Integer maxWidth, java.lang.Integer minHeight, java.lang.Integer prefHeight, java.lang.Integer maxHeight)
public static <C extends java.awt.Component> C resizeIfNeccessary(C comp, java.awt.Dimension dim)
public static void expandRoot(javax.swing.JTree tree)
public static void expandAll(javax.swing.JTree tree, boolean expand)
public static <C extends java.awt.Component> C unsizeComponent(C comp)
public static boolean equalsInsets(java.awt.Insets a, java.awt.Insets b)
public static void feedPopupMenu(javax.swing.JPopupMenu menu, Actions actions, java.lang.String... items)
public static void feedToolBar(javax.swing.JToolBar toolBar, Actions actions, java.lang.String... items)
public static void feedMenu(javax.swing.JMenu menu, Actions actions, java.lang.String... items)
public static void feedButtonGroup(javax.swing.ButtonGroup group, javax.swing.JToolBar toolBar, Actions actions, java.lang.String... items)
public static void feedButtonGroup(javax.swing.ButtonGroup group, javax.swing.JMenu menu, Actions actions, java.lang.String... items)
public static void addHint(javax.swing.text.JTextComponent component, ResourceDomain resourceDomain, java.lang.String hint)
public static void changeFocus(java.awt.Component target, java.awt.Component source)
public static void alignToOwner(java.awt.Component owner, java.awt.Component comp)
public static <C extends java.awt.Component> C centerComponent(C comp)
public static <C extends java.awt.Component> C centerComponent(C comp, java.awt.GraphicsConfiguration gc)
public static void openConfigDialog(java.lang.String path)
public static void defaultHideTabbedPaneDecoration(javax.swing.JTabbedPane tabbedPane)
public static void defaultHideSplitPaneDecoration(javax.swing.JSplitPane splitPane)
public static void disableHtml(java.lang.Object item)
public static void disableCaretScroll(javax.swing.text.JTextComponent comp)
public static final void defaultSetUnitIncrement(java.lang.Object obj)
public static javax.swing.JTextArea defaultCreateInfoLabel(javax.swing.JComponent container)
public static javax.swing.JLabel defaultCreateLoadingLabel(javax.swing.JComponent container)
public static javax.swing.Icon getSmallLoadingIcon()
public static javax.swing.Icon getLargeLoadingIcon()
public static javax.swing.Icon getInfoIcon()
public static java.awt.Window getActiveWindow()
public static javax.swing.undo.UndoManager createUndoSupport(javax.swing.text.JTextComponent comp, int limit)
public static javax.swing.undo.UndoManager getUndoManager(javax.swing.JComponent comp)
public static javax.swing.JPopupMenu createDefaultTextMenu(javax.swing.text.JTextComponent comp, boolean allowUndo)
public static final void addPopupMenu(javax.swing.JComponent comp, javax.swing.JPopupMenu menu)