|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.gui.GuiUtilFns
Class GuiUtilFns defines a set of various static utility methods for use in GUI applications.
Method Summary | |
static void |
ensureRowVisible(javax.swing.JTable tableObj,
int row)
Ensures that the specified table row is visible. |
static void |
ensureSelectionVisible(javax.swing.JTable tableObj)
Ensures that the current table selection is visible. |
static int |
getExtendedFrameState(java.awt.Frame frameObj)
Returns the "extended" state of the given frame. |
static int |
getFrameMaximizedBothValue()
Returns the value of Frame.MAXIMIZED_BOTH. |
static java.awt.Rectangle |
getMaximumWindowBounds()
Returns the maximum bounds for centered windows. |
static java.lang.String |
getSpacerStrForWidth(int widthVal,
java.awt.Component compObj)
Generates a spacer string containing the maximum number of space characters that will fit within the given pixel width, using the given component. |
static java.lang.String |
getSpacerStrForWidth(int widthVal,
java.awt.Component compObj,
java.awt.Font fontObj)
Generates a spacer string containing the maximum number of space characters that will fit within the given pixel width, using the given component and font. |
static java.lang.String |
getSpacerStrForWidth(int widthVal,
java.awt.Component compObj,
java.awt.Font fontObj,
int defWidthVal)
Generates a spacer string containing the maximum number of space characters that will fit within the given pixel width, using the given component and font. |
static java.lang.String |
getSpacerStrForWidth(int widthVal,
java.awt.Component compObj,
int defWidthVal)
Generates a spacer string containing the maximum number of space characters that will fit within the given pixel width, using the given component. |
static java.lang.String |
getSpacerStrForWidth(int widthVal,
int spaceCharSize)
Generates a spacer string containing the maximum number of space characters that will fit within the given pixel width. |
static int |
getStringWidth(java.awt.Component compObj,
java.awt.Font fontObj,
java.lang.String str)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.awt.Component compObj,
java.awt.Font fontObj,
java.lang.String str,
int defWidthVal)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.awt.Component compObj,
java.lang.String str)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.awt.Component compObj,
java.lang.String str,
int defWidthVal)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.awt.Font fontObj,
java.lang.String str)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.awt.Font fontObj,
java.lang.String str,
int defWidthVal)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.lang.String str)
Returns the width, in pixels, of the given string. |
static int |
getStringWidth(java.lang.String str,
int defWidthVal)
Returns the width, in pixels, of the given string. |
static void |
initColumnSizes(javax.swing.JTable tableObj)
|
static boolean |
isFrameMaximized(java.awt.Frame frameObj)
Determines if the given frame is maximized (both horizontally and vertically). |
static boolean |
maximizeFrame(java.awt.Frame frameObj)
Sets the state of the given frame to "maximized" (both horizontally and vertically). |
static void |
setEmptyJListWidth(javax.swing.JList listObj,
int widthVal)
Sets the fixed cell width that the given 'JList' is to have when its contents are empty. |
static boolean |
setExtendedFrameState(java.awt.Frame frameObj,
int stateVal)
Sets the "extended" state of the given frame. |
static void |
setScrollPaneCentered(javax.swing.JScrollPane paneObj)
Sets the given scroll-pane to have its scroll-bars centered. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void ensureSelectionVisible(javax.swing.JTable tableObj)
tableObj
- the table object.public static void ensureRowVisible(javax.swing.JTable tableObj, int row)
tableObj
- the table object.row
- the row index.public static int getStringWidth(java.awt.Component compObj, java.awt.Font fontObj, java.lang.String str, int defWidthVal)
compObj
- the component to use, or null to use a default
'JLabel' object.fontObj
- the font to use, or null to use the font from the
given component object.str
- the string to use.defWidthVal
- a default width value to be returned if an error
occurs while calculating the width.
public static int getStringWidth(java.awt.Component compObj, java.lang.String str, int defWidthVal)
compObj
- the component to use, or null to use a default
'JLabel' object.str
- the string to use.defWidthVal
- a default width value to be returned if an error
occurs while calculating the width.
public static int getStringWidth(java.awt.Font fontObj, java.lang.String str, int defWidthVal)
fontObj
- the font to use, or null to use the font from the
given component object.str
- the string to use.defWidthVal
- a default width value to be returned if an error
occurs while calculating the width.
public static int getStringWidth(java.awt.Component compObj, java.awt.Font fontObj, java.lang.String str)
compObj
- the component to use, or null to use a default
'JLabel' object.fontObj
- the font to use, or null to use the font from the
given component object.str
- the string to use.
public static int getStringWidth(java.awt.Font fontObj, java.lang.String str)
fontObj
- the font to use, or null to use the font from the
given component object.str
- the string to use.
public static int getStringWidth(java.awt.Component compObj, java.lang.String str)
compObj
- the component to use, or null to use a default
'JLabel' object.str
- the string to use.
public static int getStringWidth(java.lang.String str, int defWidthVal)
str
- the string to use.defWidthVal
- a default width value to be returned if an error
occurs while calculating the width.
public static int getStringWidth(java.lang.String str)
str
- the string to use.
public static java.lang.String getSpacerStrForWidth(int widthVal, int spaceCharSize)
widthVal
- the pixel width to use.spaceCharSize
- the size (in pixels) of a space character to use,
or 0 to use a default size.
public static java.lang.String getSpacerStrForWidth(int widthVal, java.awt.Component compObj, java.awt.Font fontObj, int defWidthVal)
widthVal
- the pixel width to use.compObj
- the component to use, or null to use a default
'JLabel' object.fontObj
- the font to use, or null to use the font from the
given component object.defWidthVal
- a default width value for the size of space
character in pixels (used if an error occurs while determining the
size).
public static java.lang.String getSpacerStrForWidth(int widthVal, java.awt.Component compObj, java.awt.Font fontObj)
widthVal
- the pixel width to use.compObj
- the component to use, or null to use a default
'JLabel' object.fontObj
- the font to use, or null to use the font from the
given component object.
public static java.lang.String getSpacerStrForWidth(int widthVal, java.awt.Component compObj, int defWidthVal)
widthVal
- the pixel width to use.compObj
- the component to use, or null to use a default
'JLabel' object.defWidthVal
- a default width value for the size of space
character in pixels (used if an error occurs while determining the
size).
public static java.lang.String getSpacerStrForWidth(int widthVal, java.awt.Component compObj)
widthVal
- the pixel width to use.compObj
- the component to use, or null to use a default
'JLabel' object.
public static void setScrollPaneCentered(javax.swing.JScrollPane paneObj)
paneObj
- the scroll-pane object to use.public static void setEmptyJListWidth(javax.swing.JList listObj, int widthVal)
listObj
- the 'JList' to use.widthVal
- the width value to use.public static int getExtendedFrameState(java.awt.Frame frameObj)
frameObj
- 'Frame' object to use.
public static boolean setExtendedFrameState(java.awt.Frame frameObj, int stateVal)
frameObj
- 'Frame' object to use.stateVal
- frame-state-bitmap value to use.
public static void initColumnSizes(javax.swing.JTable tableObj)
public static boolean isFrameMaximized(java.awt.Frame frameObj)
frameObj
- 'Frame' object to use.
public static boolean maximizeFrame(java.awt.Frame frameObj)
frameObj
- 'Frame' object to use.
public static int getFrameMaximizedBothValue()
public static java.awt.Rectangle getMaximumWindowBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |