Package com.ribs

Class RUAwt

java.lang.Object
com.ribs.RUAwt

public class RUAwt extends 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 <info@reportmill.com>.

  • Field Details

  • Constructor Details

    • RUAwt

      public RUAwt()
  • Method Details

    • toStringColor

      public static String toStringColor(Color aColor)
      Returns a String/hex representation of a given color (eg, "#FF00D8").
    • fromStringColor

      public static Color fromStringColor(String aString)
      Returns a Color from a String/hex representation.
    • setWindowVisibleCentered

      public static void setWindowVisibleCentered(Component aWin)
      Makes a window visable in the middle of the screen.
    • setWindowVisible

      public static void setWindowVisible(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(Component aWindow, int x, int y, byte aCorner, String frameSaveName)
      Makes a window visiable with the given corner at the given x & y.
    • setWindowAlwaysOnTop

      public static void setWindowAlwaysOnTop(Window aWindow, boolean aFlag)
      Sets a window to always be on top in Java 5 or beyond.
    • getPreferredWindowSize

      public static Dimension getPreferredWindowSize(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(Component aComponent)
      Sets appropriate window size for a component in a scrollpane such that scrollers aren't visible if possible.
    • getWindow

      public static Window getWindow(Component aComponent)
      Returns the window associated with this component.
    • getComponent

      public static JComponent getComponent(JComponent aComp, int anIndex)
      Returns the given component's child at the given index (or null, if beyond bounds).
    • getComponentLast

      public static JComponent getComponentLast(JComponent aComp)
      Returns the given components last child (or null, if none).
    • getViewport

      public static JViewport getViewport(Component aComp)
      Returns the first viewport that is a parent of the given component.
    • setContentSize

      public static void setContentSize(Window aWindow, int width, int height)
      Sets the size of a window so that its contentPane is the given size.
    • getPath

      public static GeneralPath getPath(float[] xpoints, float[] ypoints, int npoints)
      Returns a general path for the given float arrays of points.