public final class WidgetUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.awt.Color |
ADDITIONAL_COLOR_CYAN_BRIGHT |
static java.awt.Color |
ADDITIONAL_COLOR_GREEN_BRIGHT |
static java.awt.Color |
ADDITIONAL_COLOR_PURPLE_BRIGHT |
static java.awt.Color |
ADDITIONAL_COLOR_RED_BRIGHT |
static java.awt.Color |
BG_COLOR_BLUE_BRIGHT |
static java.awt.Color |
BG_COLOR_BLUE_DARK |
static java.awt.Color |
BG_COLOR_BLUE_MEDIUM |
static java.awt.Color |
BG_COLOR_BRIGHT |
static java.awt.Color |
BG_COLOR_BRIGHTEST |
static java.awt.Color |
BG_COLOR_DARK |
static java.awt.Color |
BG_COLOR_DARKEST |
static java.awt.Color |
BG_COLOR_LESS_BRIGHT |
static java.awt.Color |
BG_COLOR_LESS_DARK |
static java.awt.Color |
BG_COLOR_MEDIUM |
static java.awt.Color |
BG_COLOR_ORANGE_BRIGHT |
static java.awt.Color |
BG_COLOR_ORANGE_DARK |
static java.awt.Color |
BG_COLOR_ORANGE_MEDIUM |
static java.awt.Color |
BG_COLOR_PALE_YELLOW |
static java.awt.Color |
BG_SEMI_TRANSPARENT |
static javax.swing.border.Border |
BORDER_BUTTON_DARK |
static javax.swing.border.Border |
BORDER_BUTTON_DARK_WITH_LINE |
static javax.swing.border.Border |
BORDER_BUTTON_DEFAULT |
static javax.swing.border.Border |
BORDER_BUTTON_PRIMARY |
static javax.swing.border.Border |
BORDER_EMPHASIZE_FIELD |
static javax.swing.border.Border |
BORDER_EMPTY |
static javax.swing.border.Border |
BORDER_INPUT |
static javax.swing.border.Border |
BORDER_LIST_ITEM |
static javax.swing.border.Border |
BORDER_LIST_ITEM_HIGHLIGHTED |
static javax.swing.border.Border |
BORDER_LIST_ITEM_LEFT_ONLY |
static javax.swing.border.Border |
BORDER_LIST_ITEM_SUBTLE |
static java.lang.Object |
BORDER_MENU_ITEM |
static javax.swing.border.Border |
BORDER_SHADOW |
static javax.swing.border.Border |
BORDER_TABLE_PANEL |
static javax.swing.border.Border |
BORDER_THIN |
static javax.swing.border.Border |
BORDER_THIN_DARK |
static javax.swing.border.Border |
BORDER_TOP_PADDING |
static javax.swing.border.Border |
BORDER_WIDE |
static javax.swing.border.Border |
BORDER_WIDE_BRIGHTEST |
static int |
BORDER_WIDE_WIDTH |
static java.awt.Color |
COLOR_ALTERNATIVE_BACKGROUND |
static java.awt.Color |
COLOR_DEFAULT_BACKGROUND |
static java.awt.Color |
COLOR_WELL_BACKGROUND |
static int |
DEFAULT_ANCHOR |
static int |
DEFAULT_PADDING |
static java.awt.Font |
FONT_BANNER |
static java.awt.Font |
FONT_HEADER1 |
static java.awt.Font |
FONT_HEADER2 |
static java.awt.Font |
FONT_MONOSPACE |
static java.awt.Font |
FONT_NORMAL |
static java.awt.Font |
FONT_OPENSANS_BOLD |
static java.awt.Font |
FONT_OPENSANS_BOLD_ITALIC |
static java.awt.Font |
FONT_OPENSANS_ITALIC |
static java.awt.Font |
FONT_OPENSANS_PLAIN |
static float |
FONT_SIZE_SMALL |
static java.awt.Font |
FONT_SMALL |
static java.awt.Font |
FONT_TABLE_HEADER |
static java.awt.Font |
FONT_UBUNTU_BOLD |
static java.awt.Font |
FONT_UBUNTU_BOLD_ITALIC |
static java.awt.Font |
FONT_UBUNTU_ITALIC |
static java.awt.Font |
FONT_UBUNTU_PLAIN |
static java.awt.Insets |
INSETS_EMPTY
Commonly used insets - empty
|
static org.jdesktop.swingx.decorator.Highlighter |
LIBERELLO_HIGHLIGHTER
A highlighter for coloring odd/even rows in a table
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addAligned(java.awt.Container container,
javax.swing.JComponent component) |
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy)
Adds a component to a panel with a grid bag layout
|
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
double weightx,
double weighty) |
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int anchor)
Adds a component to a panel with a grid bag layout
|
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int x,
int y,
int anchor,
double weightx,
double weighty) |
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height)
Adds a component to a panel with a grid bag layout
|
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor)
Adds a component to a panel with a grid bag layout
|
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor,
int padding) |
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor,
int padding,
double weightx,
double weighty)
Adds a component to a panel with a grid bag layout
|
static void |
addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor,
int padding,
double weightx,
double weighty,
int fill) |
static void |
centerOnScreen(java.awt.Component component) |
static java.awt.Color |
colorBetween(java.awt.Color c1,
java.awt.Color c2)
Creates a color that is in between two colors, in terms of RGB balance.
|
static DCPanel |
decorateWithShadow(javax.swing.JComponent comp) |
static DCPanel |
decorateWithShadow(javax.swing.JComponent comp,
boolean outline,
int margin)
Decorates a JComponent with a nice shadow border.
|
static java.lang.String |
extractText(java.awt.Component comp) |
static java.awt.Font |
findCompatibleFont(java.lang.String text,
java.awt.Font fallbackFont)
Finds a font that is capable of displaying the provided text.
|
static void |
invokeSwingAction(java.lang.Runnable runnable)
Invokes a
Runnable as soon as possible. |
static javax.swing.JScrollPane |
scrolleable(javax.swing.JComponent comp) |
static void |
setAppropriateFont(javax.swing.JLabel label) |
static void |
setDarkButtonStyle(javax.swing.AbstractButton b) |
static void |
setDefaultButtonStyle(javax.swing.AbstractButton b) |
static void |
setPrimaryButtonStyle(javax.swing.AbstractButton b) |
static void |
showErrorMessage(java.lang.String shortMessage,
java.lang.String detailedMessage) |
static void |
showErrorMessage(java.lang.String shortMessage,
java.lang.String detailedMessage,
java.lang.Throwable exception) |
static void |
showErrorMessage(java.lang.String shortMessage,
java.lang.Throwable exception) |
static java.awt.Color |
slightlyBrighter(java.awt.Color color)
Moderated version of Color.brighter()
|
static java.awt.Color |
slightlyDarker(java.awt.Color color)
Moderated version of Color.darker()
|
public static final float FONT_SIZE_SMALL
public static final java.awt.Font FONT_UBUNTU_PLAIN
public static final java.awt.Font FONT_UBUNTU_BOLD
public static final java.awt.Font FONT_UBUNTU_ITALIC
public static final java.awt.Font FONT_UBUNTU_BOLD_ITALIC
public static final java.awt.Font FONT_OPENSANS_PLAIN
public static final java.awt.Font FONT_OPENSANS_BOLD
public static final java.awt.Font FONT_OPENSANS_ITALIC
public static final java.awt.Font FONT_OPENSANS_BOLD_ITALIC
public static final java.awt.Font FONT_BANNER
public static final java.awt.Font FONT_HEADER1
public static final java.awt.Font FONT_HEADER2
public static final java.awt.Font FONT_MONOSPACE
public static final java.awt.Font FONT_NORMAL
public static final java.awt.Font FONT_SMALL
public static final java.awt.Font FONT_TABLE_HEADER
public static final java.awt.Color BG_COLOR_BLUE_MEDIUM
public static final java.awt.Color BG_COLOR_BLUE_BRIGHT
public static final java.awt.Color BG_COLOR_BLUE_DARK
public static final java.awt.Color BG_COLOR_ORANGE_MEDIUM
public static final java.awt.Color BG_COLOR_ORANGE_BRIGHT
public static final java.awt.Color BG_COLOR_ORANGE_DARK
public static final java.awt.Color BG_SEMI_TRANSPARENT
public static final java.awt.Color BG_COLOR_PALE_YELLOW
public static final java.awt.Color BG_COLOR_BRIGHTEST
public static final java.awt.Color BG_COLOR_BRIGHT
public static final java.awt.Color BG_COLOR_LESS_BRIGHT
public static final java.awt.Color BG_COLOR_MEDIUM
public static final java.awt.Color BG_COLOR_LESS_DARK
public static final java.awt.Color BG_COLOR_DARK
public static final java.awt.Color BG_COLOR_DARKEST
public static final java.awt.Color COLOR_DEFAULT_BACKGROUND
public static final java.awt.Color COLOR_WELL_BACKGROUND
public static final java.awt.Color COLOR_ALTERNATIVE_BACKGROUND
public static final java.awt.Color ADDITIONAL_COLOR_GREEN_BRIGHT
public static final java.awt.Color ADDITIONAL_COLOR_RED_BRIGHT
public static final java.awt.Color ADDITIONAL_COLOR_PURPLE_BRIGHT
public static final java.awt.Color ADDITIONAL_COLOR_CYAN_BRIGHT
public static final int BORDER_WIDE_WIDTH
public static final javax.swing.border.Border BORDER_SHADOW
public static final javax.swing.border.Border BORDER_WIDE
public static final javax.swing.border.Border BORDER_WIDE_BRIGHTEST
public static final javax.swing.border.Border BORDER_EMPTY
public static javax.swing.border.Border BORDER_TOP_PADDING
public static final javax.swing.border.Border BORDER_THIN
public static final javax.swing.border.Border BORDER_THIN_DARK
public static final javax.swing.border.Border BORDER_LIST_ITEM
public static final javax.swing.border.Border BORDER_LIST_ITEM_LEFT_ONLY
public static final javax.swing.border.Border BORDER_LIST_ITEM_HIGHLIGHTED
public static final javax.swing.border.Border BORDER_LIST_ITEM_SUBTLE
public static final javax.swing.border.Border BORDER_EMPHASIZE_FIELD
public static final javax.swing.border.Border BORDER_INPUT
public static final javax.swing.border.Border BORDER_TABLE_PANEL
public static final javax.swing.border.Border BORDER_BUTTON_DARK
public static final javax.swing.border.Border BORDER_BUTTON_DARK_WITH_LINE
public static final javax.swing.border.Border BORDER_BUTTON_DEFAULT
public static final javax.swing.border.Border BORDER_BUTTON_PRIMARY
public static final java.lang.Object BORDER_MENU_ITEM
public static final org.jdesktop.swingx.decorator.Highlighter LIBERELLO_HIGHLIGHTER
public static final int DEFAULT_PADDING
public static final int DEFAULT_ANCHOR
public static final java.awt.Insets INSETS_EMPTY
public static void invokeSwingAction(java.lang.Runnable runnable)
Runnable as soon as possible. If this is the swing
event dispatch thread, it will be run now, or else later using
SwingUtilities.invokeLater(Runnable)runnable - public static void centerOnScreen(java.awt.Component component)
public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor)
comp - panel - gridx - gridy - width - height - anchor - public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor,
int padding)
public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor,
int padding,
double weightx,
double weighty)
comp - panel - gridx - gridy - width - height - anchor - padding - public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height,
int anchor,
int padding,
double weightx,
double weighty,
int fill)
public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int width,
int height)
comp - panel - gridx - gridy - width - height - public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int x,
int y,
int anchor,
double weightx,
double weighty)
public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy)
comp - panel - gridx - gridy - public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
double weightx,
double weighty)
public static void addToGridBag(java.awt.Component comp,
javax.swing.JPanel panel,
int gridx,
int gridy,
int anchor)
comp - panel - gridx - gridy - anchor - public static void addAligned(java.awt.Container container,
javax.swing.JComponent component)
public static void showErrorMessage(java.lang.String shortMessage,
java.lang.String detailedMessage)
public static void showErrorMessage(java.lang.String shortMessage,
java.lang.String detailedMessage,
java.lang.Throwable exception)
public static void showErrorMessage(java.lang.String shortMessage,
java.lang.Throwable exception)
public static javax.swing.JScrollPane scrolleable(javax.swing.JComponent comp)
public static java.awt.Color colorBetween(java.awt.Color c1,
java.awt.Color c2)
c1 - c2 - public static java.awt.Color slightlyDarker(java.awt.Color color)
color - public static java.awt.Color slightlyBrighter(java.awt.Color color)
color - public static java.lang.String extractText(java.awt.Component comp)
public static DCPanel decorateWithShadow(javax.swing.JComponent comp)
public static DCPanel decorateWithShadow(javax.swing.JComponent comp, boolean outline, int margin)
comp - outline - margin - public static java.awt.Font findCompatibleFont(java.lang.String text,
java.awt.Font fallbackFont)
text - the text to display.fallbackFont - the font to fall back to in case no capable font was foundpublic static void setAppropriateFont(javax.swing.JLabel label)
public static void setPrimaryButtonStyle(javax.swing.AbstractButton b)
public static void setDarkButtonStyle(javax.swing.AbstractButton b)
public static void setDefaultButtonStyle(javax.swing.AbstractButton b)
Copyright © 2015. All Rights Reserved.