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 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 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. Peter S. Morris -
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 -
setWindowAlwaysOnTop
Sets the specified window as the topmost window in the z-order.- Parameters:
win- the window'sflag- a boolean 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.
-
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
-