|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.substance.Utilities
public class Utilities
Various utility functions.
Method Summary | |
---|---|
static String |
clipString(FontMetrics metrics,
int availableWidth,
String fullText)
Clips string based on specified font metrics and available width (in pixels). |
static boolean |
hasIcon(AbstractButton button)
Checks whether the specified button has associated icon. |
static boolean |
hasText(AbstractButton button)
Checks whether the specified button has associated text. |
static boolean |
isComboBoxButton(AbstractButton b)
Checks and answers if the specified button is in a combo box. |
static boolean |
isInColorChooserDialog(Component component)
|
static boolean |
isScrollBarButton(AbstractButton b)
Checks and answers if the specified button is in a combo box. |
static boolean |
isScrollButton(AbstractButton b)
Checks answers if the specified button is in scroll control, such as scroll bar or tabbed pane (as tab scroller). |
static boolean |
isSpinnerButton(AbstractButton b)
Checks and answers if the specified button is in a spinner. |
static boolean |
isTabbedPaneButton(AbstractButton b)
Checks and answers if the specified button is in a tabbed pane. |
static boolean |
isTitleBarButton(AbstractButton b)
Checks and answers if the specified button is in a title bar. |
static boolean |
isToolBarButton(AbstractButton b)
Checks and answers if the specified button is in a spinner. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String clipString(FontMetrics metrics, int availableWidth, String fullText)
metrics
- Font metrics.availableWidth
- Available width in pixels.fullText
- String to clip.
public static boolean hasIcon(AbstractButton button)
button
- Button.
true
is
returned, otherwise false
.public static boolean hasText(AbstractButton button)
button
- Button.
true
is
returned, otherwise false
.public static boolean isComboBoxButton(AbstractButton b)
b
- the button to check
true
if in tool bar, false
otherwisepublic static boolean isScrollBarButton(AbstractButton b)
b
- the button to check
true
if in tool bar, false
otherwisepublic static boolean isTitleBarButton(AbstractButton b)
b
- the button to check
true
if in title bar, false
otherwisepublic static boolean isSpinnerButton(AbstractButton b)
b
- the button to check
true
if in spinner, false
otherwisepublic static boolean isToolBarButton(AbstractButton b)
b
- the button to check
true
if in spinner, false
otherwisepublic static boolean isTabbedPaneButton(AbstractButton b)
b
- the button to check
true
if in spinner, false
otherwisepublic static boolean isScrollButton(AbstractButton b)
b
- the button to check
true
if in scroll control, false
otherwisepublic static boolean isInColorChooserDialog(Component component)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |