Package rma.util
Class RMAUtil
java.lang.Object
rma.util.RMAUtil
General Utilities Class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Color
colorChooser
(Component parent, Color defaultColor) static Color
colorChooser
(Component parent, Color defaultColor, String chooserTitle) Returns a Color chosen from the Color Chooser Dialog.static File
static File
static AbstractButton
findButtonFromText
(Class buttonClass, String buttonText, Container container) find the button of buttonClass with text buttonText in the Container container or containers that container holdsstatic Component
getComponentByAction
(Container container, Class actionClass) find a component inside container that has an action of class actionClassstatic RmaJObjectCheckBoxMenuItem
getComponentByObject
(Container container, RmaJObjectCheckBoxMenuItem item) find an RmaJObjectCheckBoxMenuItem inside container that holds the same Object as itemstatic String
return a string that Font can use in getFont() of the form [family]-[style]-[size]static int
Retrieves the Win32 window handle for the specified window.static Window
return the window from which menuItem was launchedstatic boolean
isChildrenModified
(Container comp) Return true if a child of comp is an instance of rma.lang.Modifiable and isModified() is true.static void
static void
setParentModified
(Component comp) when a Modifiable component get modified, set its nearest Modifiable parent to modifiedstatic void
setWindowAlwaysOnTop
(Window win, boolean flag) Sets the specified window as the topmost window in the z-order.static void
setWindowMaximized
(Window win) static void
setWindowMinimized
(Window win) static void
static void
static boolean
substringMatch
(Object data, Object matchTo) Returns true if data.toString() starts with startWith.toString()
-
Field Details
-
CURRENT_DIRECTORY
-
-
Constructor Details
-
RMAUtil
public RMAUtil()
-
-
Method Details
-
colorChooser
-
colorChooser
Returns a Color chosen from the Color Chooser Dialog. Accepts a parent Frame and a default Color. -
fileOpen
-
fileSave
-
showAbout
-
showHelp
-
substringMatch
Returns true if data.toString() starts with startWith.toString() -
setParentModified
when a Modifiable component get modified, set its nearest Modifiable parent to modified -
isChildrenModified
Return true if a child of comp is an instance of rma.lang.Modifiable and isModified() is true.- Parameters:
comp
-- Returns:
-
setChildrenUnmodified
-
findButtonFromText
public static AbstractButton findButtonFromText(Class buttonClass, String buttonText, Container container) find the button of buttonClass with text buttonText in the Container container or containers that container holds -
getHwnd
Retrieves the Win32 window handle for the specified window.- Type Parameters:
CODE
- win the window, either a Frame or Dialog, whose Win32 window handle to retrieve- Returns:
- an
int
representing the Win32 window handle for the specified window title or -1 on error or not on Windows
-
setWindowAlwaysOnTop
Sets the specified window as the topmost window in the z-order.- Type Parameters:
CODE
- win the window'sCODE
- flag aboolean
parameter that specifies whether the window will be the topmost window in the z-order.true
sets the window as the topmost window in the z-order,false
sets the window behind all topmost windows.- See Also:
-
getHwnd(java.lang.String)
-
setWindowMinimized
-
setWindowMaximized
-
getFontString
return a string that Font can use in getFont() of the form [family]-[style]-[size] -
getWindow
return the window from which menuItem was launched -
getComponentByAction
find a component inside container that has an action of class actionClass -
getComponentByObject
public static RmaJObjectCheckBoxMenuItem getComponentByObject(Container container, RmaJObjectCheckBoxMenuItem item) find an RmaJObjectCheckBoxMenuItem inside container that holds the same Object as item
-