Class PlasticUtils


  • public final class PlasticUtils
    extends java.lang.Object
    Consists exclusively of static methods that provide convenience behavior.
    Version:
    $Revision: 1.9 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static float FRACTION_3D  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PlasticUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void add3DEffekt​(java.awt.Graphics g, java.awt.Rectangle r)  
      private static void add3DEffekt​(java.awt.Graphics g, java.awt.Rectangle r, boolean isHorizontal, java.awt.Color startC0, java.awt.Color stopC0, java.awt.Color startC1, java.awt.Color stopC1)  
      static void addLight3DEffekt​(java.awt.Graphics g, java.awt.Rectangle r)  
      (package private) static void addLight3DEffekt​(java.awt.Graphics g, java.awt.Rectangle r, boolean isHorizontal)  
      (package private) static void drawActiveButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h, boolean active)  
      (package private) static void drawDark3DBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawDefaultButtonBorder​(java.awt.Graphics g, int x, int y, int w, int h, boolean active)  
      (package private) static void drawDefaultButtonPressedBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawDisabledBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawFlush3DBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawPressed3DBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      private static void drawRect​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawThinFlush3DBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static void drawThinPressed3DBorder​(java.awt.Graphics g, int x, int y, int w, int h)  
      (package private) static boolean force3D​(javax.swing.JComponent c)
      Checks and returns whether we have a custom hint that forces the 3D mode.
      (package private) static boolean forceFlat​(javax.swing.JComponent c)
      Checks and returns whether we have a custom hint that prevents the 3D mode.
      (package private) static boolean is3D​(java.lang.String keyPrefix)
      Checks and returns whether the specified component type has 3D effects.
      (package private) static boolean isLeftToRight​(java.awt.Component c)  
      • Methods inherited from class java.lang.Object

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

      • PlasticUtils

        private PlasticUtils()
    • Method Detail

      • drawDark3DBorder

        static void drawDark3DBorder​(java.awt.Graphics g,
                                     int x,
                                     int y,
                                     int w,
                                     int h)
      • drawDisabledBorder

        static void drawDisabledBorder​(java.awt.Graphics g,
                                       int x,
                                       int y,
                                       int w,
                                       int h)
      • drawFlush3DBorder

        static void drawFlush3DBorder​(java.awt.Graphics g,
                                      int x,
                                      int y,
                                      int w,
                                      int h)
      • drawPressed3DBorder

        static void drawPressed3DBorder​(java.awt.Graphics g,
                                        int x,
                                        int y,
                                        int w,
                                        int h)
      • drawButtonBorder

        static void drawButtonBorder​(java.awt.Graphics g,
                                     int x,
                                     int y,
                                     int w,
                                     int h,
                                     boolean active)
      • drawActiveButtonBorder

        static void drawActiveButtonBorder​(java.awt.Graphics g,
                                           int x,
                                           int y,
                                           int w,
                                           int h)
      • drawDefaultButtonBorder

        static void drawDefaultButtonBorder​(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h,
                                            boolean active)
      • drawDefaultButtonPressedBorder

        static void drawDefaultButtonPressedBorder​(java.awt.Graphics g,
                                                   int x,
                                                   int y,
                                                   int w,
                                                   int h)
      • drawThinFlush3DBorder

        static void drawThinFlush3DBorder​(java.awt.Graphics g,
                                          int x,
                                          int y,
                                          int w,
                                          int h)
      • drawThinPressed3DBorder

        static void drawThinPressed3DBorder​(java.awt.Graphics g,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
      • isLeftToRight

        static boolean isLeftToRight​(java.awt.Component c)
      • is3D

        static boolean is3D​(java.lang.String keyPrefix)
        Checks and returns whether the specified component type has 3D effects.
        Parameters:
        keyPrefix - the prefix of the key used to lookup the setting
        Returns:
        true if the component type shall be rendered with a 3D effect
        See Also:
        force3D(JComponent), forceFlat(JComponent)
      • force3D

        static boolean force3D​(javax.swing.JComponent c)
        Checks and returns whether we have a custom hint that forces the 3D mode.
        Parameters:
        c - the component to inspect
        Returns:
        true if the given component has a 3D hint set
        See Also:
        forceFlat(JComponent)
      • forceFlat

        static boolean forceFlat​(javax.swing.JComponent c)
        Checks and returns whether we have a custom hint that prevents the 3D mode.
        Parameters:
        c - the component to inspect
        Returns:
        true if the given component has a flat hint set
        See Also:
        force3D(JComponent)
      • add3DEffekt

        private static void add3DEffekt​(java.awt.Graphics g,
                                        java.awt.Rectangle r,
                                        boolean isHorizontal,
                                        java.awt.Color startC0,
                                        java.awt.Color stopC0,
                                        java.awt.Color startC1,
                                        java.awt.Color stopC1)
      • add3DEffekt

        static void add3DEffekt​(java.awt.Graphics g,
                                java.awt.Rectangle r)
      • addLight3DEffekt

        static void addLight3DEffekt​(java.awt.Graphics g,
                                     java.awt.Rectangle r,
                                     boolean isHorizontal)
      • addLight3DEffekt

        public static void addLight3DEffekt​(java.awt.Graphics g,
                                            java.awt.Rectangle r)
      • drawRect

        private static void drawRect​(java.awt.Graphics g,
                                     int x,
                                     int y,
                                     int w,
                                     int h)