Package com.ribs

Class RUAwt


  • public class RUAwt
    extends java.lang.Object
    This class offers a number of useful general purpose utilities used by ribs classes.

    Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill .

    • Constructor Summary

      Constructors 
      Constructor Description
      RUAwt()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Color fromStringColor​(java.lang.String aString)
      Returns a Color from a String/hex representation.
      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).
      static javax.swing.JComponent getComponentLast​(javax.swing.JComponent aComp)
      Returns the given components last child (or null, if none).
      static java.awt.geom.GeneralPath getPath​(float[] xpoints, float[] ypoints, int npoints)
      Returns a general path for the given float arrays of points.
      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.
      static javax.swing.JViewport getViewport​(java.awt.Component aComp)
      Returns the first viewport that is a parent of the given component.
      static java.awt.Window getWindow​(java.awt.Component aComponent)
      Returns the window associated with this component.
      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.
      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.
      static void setWindowAlwaysOnTop​(java.awt.Window aWindow, boolean aFlag)
      Sets a window to always be on top in Java 5 or beyond.
      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.
      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.
      static void setWindowVisibleCentered​(java.awt.Component aWin)
      Makes a window visable in the middle of the screen.
      static java.lang.String toStringColor​(java.awt.Color aColor)
      Returns a String/hex representation of a given color (eg, "#FF00D8").
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RUAwt

        public RUAwt()
    • 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.