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 ColorcolorChooser(Component parent, Color defaultColor) static ColorcolorChooser(Component parent, Color defaultColor, String chooserTitle) Returns a Color chosen from the Color Chooser Dialog.static Filestatic Filestatic AbstractButtonfindButtonFromText(Class buttonClass, String buttonText, Container container) find the button of buttonClass with text buttonText in the Container container or containers that container holdsstatic ComponentgetComponentByAction(Container container, Class actionClass) find a component inside container that has an action of class actionClassstatic RmaJObjectCheckBoxMenuItemgetComponentByObject(Container container, RmaJObjectCheckBoxMenuItem item) find an RmaJObjectCheckBoxMenuItem inside container that holds the same Object as itemstatic Stringreturn a string that Font can use in getFont() of the form [family]-[style]-[size]static intRetrieves the Win32 window handle for the specified window.static Windowreturn the window from which menuItem was launchedstatic booleanisChildrenModified(Container comp) Return true if a child of comp is an instance of rma.lang.Modifiable and isModified() is true.static voidstatic voidsetParentModified(Component comp) when a Modifiable component get modified, set its nearest Modifiable parent to modifiedstatic voidsetWindowAlwaysOnTop(Window win, boolean flag) Sets the specified window as the topmost window in the z-order.static voidsetWindowMaximized(Window win) static voidsetWindowMinimized(Window win) static voidstatic voidstatic booleansubstringMatch(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
intrepresenting 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 abooleanparameter that specifies whether the window will be the topmost window in the z-order.truesets the window as the topmost window in the z-order,falsesets 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
-