|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.lafwidget.LafWidgetUtilities
public class LafWidgetUtilities
Various utility functions.
| Field Summary | |
|---|---|
static java.lang.String |
PREVIEW_MODE
Name for the internal client property that marks a component as previewable. |
| Method Summary | |
|---|---|
static java.awt.image.BufferedImage |
createCompatibleImage(java.awt.image.BufferedImage image)
Creates a compatible image (for efficient processing and drawing). |
static java.awt.image.BufferedImage |
createThumbnail(java.awt.image.BufferedImage image,
int requestedThumbWidth)
Creates a thumbnail of the specified width. |
static LafConstants.AnimationKind |
getAnimationKind(java.awt.Component component)
Returns the animation kind of the specified component. |
static java.awt.image.BufferedImage |
getBlankImage(int width,
int height)
Retrieves transparent image of specified dimension. |
static javax.swing.Icon |
getHexaMarker(int value)
Returns small icon representation of the specified integer value. |
static javax.swing.Icon |
getIcon(javax.swing.AbstractButton b)
Returns the current icon for the specified button. |
static java.util.ResourceBundle |
getResourceBundle(javax.swing.JComponent jcomp)
Returns the resource bundle for the specified component. |
static javax.swing.Icon |
getSearchIcon(int dimension,
boolean leftToRight)
Returns search icon. |
static javax.swing.Icon |
getSmallLockIcon()
Returns a lock icon. |
static boolean |
hasAutoCompletion(javax.swing.JComboBox combobox)
Checks whether the specified combobox has auto-completion. |
static boolean |
hasAutomaticDnDSupport(javax.swing.JTree tree)
Checks whether the specified tree component has automatic drag and drop support. |
static boolean |
hasAutoScroll(javax.swing.JScrollPane scrollPane)
Checks whether the specified scroll pane supports auto scroll. |
static boolean |
hasNoFades(java.awt.Component comp,
FadeKind fadeKind)
Checks whether the specified fade kind has no animations on the specified component. |
static boolean |
hasTextEditContextMenu(javax.swing.text.JTextComponent textComp)
Checks whether the specified text component has edit context menu property. |
static boolean |
hasTextFlipSelectOnEscapeProperty(javax.swing.text.JTextComponent textComp)
Checks whether the specified text component has "flip select on escape" property. |
static boolean |
hasTextFocusSelectAllProperty(javax.swing.text.JTextComponent textComp)
Checks whether the specified text component has "select all on focus gain" property. |
static boolean |
hasUseModelOnlyProperty(javax.swing.JComboBox combobox)
Checks whether the specified combobox has "use model only" property. |
static void |
makePreviewable(java.awt.Component comp,
java.util.Map<java.awt.Component,java.lang.Boolean> dbSnapshot)
Makes the specified component and all its descendants previewable. |
static void |
restorePreviewable(java.awt.Component comp,
java.util.Map<java.awt.Component,java.lang.Boolean> dbSnapshot)
Restores the regular (non-previewable) status of the specified component and all its descendants. |
static boolean |
toIgnoreGlobalLocale(javax.swing.JComponent jcomp)
Checks whether the label lookup should use component-specific locale on the specified component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PREVIEW_MODE
| Method Detail |
|---|
public static java.awt.image.BufferedImage getBlankImage(int width,
int height)
width - Image width.height - Image height.
public static boolean hasUseModelOnlyProperty(javax.swing.JComboBox combobox)
combobox - Combobox.
true if the specified combobox has "use model
only" property, false otherwise.public static boolean hasAutoCompletion(javax.swing.JComboBox combobox)
combobox - Combobox.
true if the specified combobox has
auto-completion, false otherwise.public static java.awt.image.BufferedImage createCompatibleImage(java.awt.image.BufferedImage image)
image - The original image.
public static java.awt.image.BufferedImage createThumbnail(java.awt.image.BufferedImage image,
int requestedThumbWidth)
image - The original image.requestedThumbWidth - The width of the resulting thumbnail.
public static javax.swing.Icon getSearchIcon(int dimension,
boolean leftToRight)
dimension - Icon dimension.leftToRight - Indicates the orientation of the resulting icon.
public static javax.swing.Icon getHexaMarker(int value)
value - Integer value to represent.
public static void makePreviewable(java.awt.Component comp,
java.util.Map<java.awt.Component,java.lang.Boolean> dbSnapshot)
comp - Component.dbSnapshot - The "snapshot" map that will contain the original
double-buffer status of the specified component and all its
descendants. Key is JComponent, value is
Boolean.
public static void restorePreviewable(java.awt.Component comp,
java.util.Map<java.awt.Component,java.lang.Boolean> dbSnapshot)
comp - Component.dbSnapshot - The "snapshot" map that contains the original double-buffer
status of the specified component and all its descendants. Key
is JComponent, value is Boolean.public static LafConstants.AnimationKind getAnimationKind(java.awt.Component component)
component - Component.
public static javax.swing.Icon getSmallLockIcon()
public static boolean hasTextFocusSelectAllProperty(javax.swing.text.JTextComponent textComp)
textComp - Text component.
true if the specified text component has "select
all on focus gain" property, false otherwise.public static boolean hasTextFlipSelectOnEscapeProperty(javax.swing.text.JTextComponent textComp)
textComp - Text component.
true if the specified text component has "flip
select on escape" property, false otherwise.public static boolean hasTextEditContextMenu(javax.swing.text.JTextComponent textComp)
textComp - Text component.
true if the specified text component has edit
context menu property, false otherwise.public static boolean hasAutoScroll(javax.swing.JScrollPane scrollPane)
scrollPane - Scroll pane component.
true if the specified scroll pane supports auto
scroll, false otherwise.public static boolean hasAutomaticDnDSupport(javax.swing.JTree tree)
tree - Tree component.
true if the specified text component has automatic
drag and drop support, false otherwise.public static boolean toIgnoreGlobalLocale(javax.swing.JComponent jcomp)
jcomp - Component.
true if the custom labels should be looked up
based on the component locale as returned by
Component.getLocale(), false if the
custom labels should be looked up based on the global locale as
returned by Locale.getDefault().public static java.util.ResourceBundle getResourceBundle(javax.swing.JComponent jcomp)
jcomp - Component.
public static boolean hasNoFades(java.awt.Component comp,
FadeKind fadeKind)
comp - Component.fadeKind - Fade kind.
true if the specified fade kind has no animations
on the specified component, false otherwise.public static javax.swing.Icon getIcon(javax.swing.AbstractButton b)
b - Button.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||