Class JTattooUtilities

java.lang.Object
com.jtattoo.plaf.JTattooUtilities

public class JTattooUtilities extends Object

JTattooUtilities class.

Author Michael Hagen
  • Constructor Details

    • JTattooUtilities

      public JTattooUtilities()
  • Method Details

    • draw3DBorder

      public static void draw3DBorder(Graphics g, Color c1, Color c2, int x, int y, int w, int h)

      draw3DBorder.

      Parameters:
      g - a Graphics object.
      c1 - a Color object.
      c2 - a Color object.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • drawBorder

      public static void drawBorder(Graphics g, Color c, int x, int y, int w, int h)

      drawBorder.

      Parameters:
      g - a Graphics object.
      c - a Color object.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • drawRound3DBorder

      public static void drawRound3DBorder(Graphics g, Color c1, Color c2, int x, int y, int w, int h)

      drawRound3DBorder.

      Parameters:
      g - a Graphics object.
      c1 - a Color object.
      c2 - a Color object.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • drawRoundBorder

      public static void drawRoundBorder(Graphics g, Color c, int x, int y, int w, int h, int r)

      drawRoundBorder.

      Parameters:
      g - a Graphics object.
      c - a Color object.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
      r - a Integer object.
    • drawString

      public static void drawString(JComponent c, Graphics g, String text, int x, int y)

      drawString.

      Parameters:
      c - a JComponent object.
      g - a Graphics object.
      text - a String object.
      x - a Integer object.
      y - a Integer object.
    • drawStringUnderlineCharAt

      public static void drawStringUnderlineCharAt(JComponent c, Graphics g, String text, int underlinedIndex, int x, int y)

      drawStringUnderlineCharAt.

      Parameters:
      c - a JComponent object.
      g - a Graphics object.
      text - a String object.
      underlinedIndex - a Integer object.
      x - a Integer object.
      y - a Integer object.
    • fillComponent

      public static void fillComponent(Graphics g, Component c, Icon texture)

      fillComponent.

      Parameters:
      g - a Graphics object.
      c - a Component object.
      texture - a Icon object.
    • fillHorGradient

      public static void fillHorGradient(Graphics g, Color[] colors, int x, int y, int w, int h)

      fillHorGradient.

      Parameters:
      g - a Graphics object.
      colors - an array of Color objects.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • fillInverseHorGradient

      public static void fillInverseHorGradient(Graphics g, Color[] colors, int x, int y, int w, int h)

      fillInverseHorGradient.

      Parameters:
      g - a Graphics object.
      colors - an array of Color objects.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • fillInverseVerGradient

      public static void fillInverseVerGradient(Graphics g, Color[] colors, int x, int y, int w, int h)

      fillInverseVerGradient.

      Parameters:
      g - a Graphics object.
      colors - an array of Color objects.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • fillVerGradient

      public static void fillVerGradient(Graphics g, Color[] colors, int x, int y, int w, int h)

      fillVerGradient.

      Parameters:
      g - a Graphics object.
      colors - an array of Color objects.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • getClippedText

      public static String getClippedText(String text, FontMetrics fm, int maxWidth)

      getClippedText.

      Parameters:
      text - a String object.
      fm - a FontMetrics object.
      maxWidth - a Integer object.
      Returns:
      a String object.
    • getFontMetrics

      public static FontMetrics getFontMetrics(JComponent c, Graphics g, Font f)

      getFontMetrics.

      Parameters:
      c - a JComponent object.
      g - a Graphics object.
      f - a Font object.
      Returns:
      a FontMetrics object.
    • getFrameSize

      public static Dimension getFrameSize(Component c)

      getFrameSize.

      Parameters:
      c - a Component object.
      Returns:
      a Dimension object.
    • getJavaVersion

      public static double getJavaVersion()

      Getter for the field javaVersion.

      Returns:
      a double.
    • getOSVersion

      public static double getOSVersion()

      getOSVersion.

      Returns:
      a double.
    • getRelLocation

      public static Point getRelLocation(Component c)

      getRelLocation.

      Parameters:
      c - a Component object.
      Returns:
      a Point object.
    • getRootContainer

      public static Container getRootContainer(Component c)

      getRootContainer.

      Parameters:
      c - a Component object.
      Returns:
      a Container object.
    • isActive

      public static boolean isActive(JComponent c)

      isActive.

      Parameters:
      c - a JComponent object.
      Returns:
      a boolean.
    • isAIX

      public static boolean isAIX()

      isAIX.

      Returns:
      a boolean.
    • isFrameActive

      public static boolean isFrameActive(Component c)

      isFrameActive.

      Parameters:
      c - a Component object.
      Returns:
      a boolean.
    • isFreeBSD

      public static boolean isFreeBSD()

      isFreeBSD.

      Returns:
      a boolean.
    • isHiresScreen

      public static boolean isHiresScreen()

      isHiresScreen.

      Returns:
      a boolean.
    • isHPUX

      public static boolean isHPUX()

      isHPUX.

      Returns:
      a boolean.
    • isLeftToRight

      public static boolean isLeftToRight(Component c)

      isLeftToRight.

      Parameters:
      c - a Component object.
      Returns:
      a boolean.
    • isLinux

      public static boolean isLinux()

      isLinux.

      Returns:
      a boolean.
    • isMac

      public static boolean isMac()

      isMac.

      Returns:
      a boolean.
    • isOS2

      public static boolean isOS2()

      isOS2.

      Returns:
      a boolean.
    • isSunOS

      public static boolean isSunOS()

      isSunOS.

      Returns:
      a boolean.
    • isWindows

      public static boolean isWindows()

      isWindows.

      Returns:
      a boolean.
    • smoothFillHorGradient

      public static void smoothFillHorGradient(Graphics g, Color[] colors, int x, int y, int w, int h)

      smoothFillHorGradient.

      Parameters:
      g - a Graphics object.
      colors - an array of Color objects.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.
    • smoothFillInverseHorGradient

      public static void smoothFillInverseHorGradient(Graphics g, Color[] colors, int x, int y, int w, int h)

      smoothFillInverseHorGradient.

      Parameters:
      g - a Graphics object.
      colors - an array of Color objects.
      x - a Integer object.
      y - a Integer object.
      w - a Integer object.
      h - a Integer object.