Package com.ribs
Class RUAwt
- java.lang.Object
 - 
- com.ribs.RUAwt
 
 
- 
public class RUAwt extends java.lang.ObjectThis class offers a number of useful general purpose utilities used by ribs classes.Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill
.  
- 
- 
Field Summary
Fields Modifier and Type Field Description static byteSCREEN_ABSOLUTEstatic byteSCREEN_CENTERstatic byteSCREEN_LOWER_LEFTstatic byteSCREEN_LOWER_RIGHTstatic byteSCREEN_UPPER_LEFTstatic byteSCREEN_UPPER_RIGHT 
- 
Constructor Summary
Constructors Constructor Description RUAwt() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.ColorfromStringColor(java.lang.String aString)Returns a Color from a String/hex representation.static javax.swing.JComponentgetComponent(javax.swing.JComponent aComp, int anIndex)Returns the given component's child at the given index (or null, if beyond bounds).static javax.swing.JComponentgetComponentLast(javax.swing.JComponent aComp)Returns the given components last child (or null, if none).static java.awt.geom.GeneralPathgetPath(float[] xpoints, float[] ypoints, int npoints)Returns a general path for the given float arrays of points.static java.awt.DimensiongetPreferredWindowSize(java.awt.Component aComponent)Returns appropriate window size for a component in a scrollpane such that scrollers aren't visible if possible.static javax.swing.JViewportgetViewport(java.awt.Component aComp)Returns the first viewport that is a parent of the given component.static java.awt.WindowgetWindow(java.awt.Component aComponent)Returns the window associated with this component.static voidsetContentSize(java.awt.Window aWindow, int width, int height)Sets the size of a window so that its contentPane is the given size.static voidsetPreferredWindowSize(java.awt.Component aComponent)Sets appropriate window size for a component in a scrollpane such that scrollers aren't visible if possible.static voidsetWindowAlwaysOnTop(java.awt.Window aWindow, boolean aFlag)Sets a window to always be on top in Java 5 or beyond.static voidsetWindowVisible(java.awt.Component aWin, int x, int y, byte aCorner)Makes a window visiable with the given corner at the given x & y.static voidsetWindowVisible(java.awt.Component aWindow, int x, int y, byte aCorner, java.lang.String frameSaveName)Makes a window visiable with the given corner at the given x & y.static voidsetWindowVisibleCentered(java.awt.Component aWin)Makes a window visable in the middle of the screen.static java.lang.StringtoStringColor(java.awt.Color aColor)Returns a String/hex representation of a given color (eg, "#FF00D8"). 
 - 
 
- 
- 
Field Detail
- 
SCREEN_UPPER_LEFT
public static final byte SCREEN_UPPER_LEFT
- See Also:
 - Constant Field Values
 
 
- 
SCREEN_UPPER_RIGHT
public static final byte SCREEN_UPPER_RIGHT
- See Also:
 - Constant Field Values
 
 
- 
SCREEN_LOWER_LEFT
public static final byte SCREEN_LOWER_LEFT
- See Also:
 - Constant Field Values
 
 
- 
SCREEN_LOWER_RIGHT
public static final byte SCREEN_LOWER_RIGHT
- See Also:
 - Constant Field Values
 
 
- 
SCREEN_CENTER
public static final byte SCREEN_CENTER
- See Also:
 - Constant Field Values
 
 
- 
SCREEN_ABSOLUTE
public static final byte SCREEN_ABSOLUTE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
toStringColor
public static java.lang.String toStringColor(java.awt.Color aColor)
Returns a String/hex representation of a given color (eg, "#FF00D8"). 
- 
fromStringColor
public static java.awt.Color fromStringColor(java.lang.String aString)
Returns a Color from a String/hex representation. 
- 
setWindowVisibleCentered
public static void setWindowVisibleCentered(java.awt.Component aWin)
Makes a window visable in the middle of the screen. 
- 
setWindowVisible
public static void setWindowVisible(java.awt.Component aWin, int x, int y, byte aCorner)Makes a window visiable with the given corner at the given x & y. 
- 
setWindowVisible
public static void setWindowVisible(java.awt.Component aWindow, int x, int y, byte aCorner, java.lang.String frameSaveName)Makes a window visiable with the given corner at the given x & y. 
- 
setWindowAlwaysOnTop
public static void setWindowAlwaysOnTop(java.awt.Window aWindow, boolean aFlag)Sets a window to always be on top in Java 5 or beyond. 
- 
getPreferredWindowSize
public static java.awt.Dimension getPreferredWindowSize(java.awt.Component aComponent)
Returns appropriate window size for a component in a scrollpane such that scrollers aren't visible if possible. 
- 
setPreferredWindowSize
public static void setPreferredWindowSize(java.awt.Component aComponent)
Sets appropriate window size for a component in a scrollpane such that scrollers aren't visible if possible. 
- 
getWindow
public static java.awt.Window getWindow(java.awt.Component aComponent)
Returns the window associated with this component. 
- 
getComponent
public static javax.swing.JComponent getComponent(javax.swing.JComponent aComp, int anIndex)Returns the given component's child at the given index (or null, if beyond bounds). 
- 
getComponentLast
public static javax.swing.JComponent getComponentLast(javax.swing.JComponent aComp)
Returns the given components last child (or null, if none). 
- 
getViewport
public static javax.swing.JViewport getViewport(java.awt.Component aComp)
Returns the first viewport that is a parent of the given component. 
- 
setContentSize
public static void setContentSize(java.awt.Window aWindow, int width, int height)Sets the size of a window so that its contentPane is the given size. 
- 
getPath
public static java.awt.geom.GeneralPath getPath(float[] xpoints, float[] ypoints, int npoints)Returns a general path for the given float arrays of points. 
 - 
 
 -