public class SwingSuiteUtilities extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
IS_JAVA_6_OR_GREATER |
| Modifier and Type | Method and Description |
|---|---|
static void |
adjustToolbarButtonFocus(AbstractButton toolBarButton)
With certain look and feels, namely windows with XP style, the focus of a toolbar button is already indicated (border changes) and the focus indicator should not be drawn: this fixes the visual rendering.
|
static void |
autoFitTableColumn(JTable table,
int columnIndex,
int maxWidth)
Auto fit the column of a table.
|
static void |
autoFitTableColumns(JTable table,
int maxWidth)
Auto fit the columns of a table.
|
static String |
convertWildcardsToRegExp(String wildcardString)
Replace a string that contains wildcards (* and ?)
|
static String |
decodeURL(String s)
Decode some text that was URL encoded.
|
static String |
encodeURL(String s)
Encode some text to be used in a URL.
|
static String |
escapeXML(String s)
Escape a string to be used in XML.
|
static boolean |
isSelectingAllOnFocus(JTextComponent textComponent)
Indicate whether a text component selects all its text when it receives the focus.
|
static void |
setAutoScrollEnabled(JComponent component,
boolean isEnabled)
Set whether the auto-scroll feature is enabled.
|
static void |
setPreferredLookAndFeel()
Set the look and feel that users tend to prefer for the current platform.
|
static void |
setSelectAllOnFocus(JTextComponent component,
boolean isSelectingAllOnFocus)
Set whether a text component selects all of its text when it acquires the focus.
|
public static void setSelectAllOnFocus(JTextComponent component, boolean isSelectingAllOnFocus)
component - The component to set the select all status to.isSelectingAllOnFocus - true if the text should be selected when focus is acquired, false otherwise.public static boolean isSelectingAllOnFocus(JTextComponent textComponent)
textComponent - The text component for which to get the select all state.public static void adjustToolbarButtonFocus(AbstractButton toolBarButton)
toolBarButton - the tool bar button for which to adjust the focus state.public static void setAutoScrollEnabled(JComponent component, boolean isEnabled)
component - The component for which to enable or disable the feature.isEnabled - true if the feature is to be enabled, false otherwise.public static void autoFitTableColumns(JTable table, int maxWidth)
table - the table for which to auto fit the columns.maxWidth - the maximum width that a column can take (like Integer.MAX_WIDTH).public static void autoFitTableColumn(JTable table, int columnIndex, int maxWidth)
table - the table for which to auto fit the columns.columnIndex - the index of the column to auto fit, in view index.maxWidth - the maximum width that a column can take (like Integer.MAX_WIDTH).public static String decodeURL(String s)
s - the string to decode.public static String encodeURL(String s)
s - the string to encode.public static String escapeXML(String s)
s - the string to escape.public static String convertWildcardsToRegExp(String wildcardString)
wildcardString - the string to convert.public static void setPreferredLookAndFeel()
Copyright © 2019. All rights reserved.