Class RadianceOutlineUtilities
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.utils.RadianceOutlineUtilities
-
public class RadianceOutlineUtilities extends java.lang.ObjectProvides common functionality that can be used by button shapers. This class is for internal use only.
-
-
Constructor Summary
Constructors Constructor Description RadianceOutlineUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.ShapegetBaseOutline(java.awt.ComponentOrientation orientation, float width, float height, float radius, java.util.Set<RadianceThemingSlices.Side> straightSides)Returns basic outline for the specified parameters.static java.awt.ShapegetBaseOutline(java.awt.ComponentOrientation orientation, float width, float height, float radius, java.util.Set<RadianceThemingSlices.Side> straightSides, float insets)Returns basic outline for the specified parameters.static java.awt.ShapegetBaseOutline(java.awt.Component comp, float radius, java.util.Set<RadianceThemingSlices.Side> straightSides)Returns basic outline for the specified component.static java.awt.geom.GeneralPathgetTriangleButtonOutline(float width, float height, float radius, float insets)Returns outline that has a triangle pointing downwards.
-
-
-
Method Detail
-
getBaseOutline
public static java.awt.Shape getBaseOutline(java.awt.Component comp, float radius, java.util.Set<RadianceThemingSlices.Side> straightSides)Returns basic outline for the specified component. The basic outline is a rectangle with rounded corners. Some corners may not be rounded based on the contents ofstraightSideparameter.- Parameters:
comp- Component.radius- Corner radius.straightSides- Contains all sides which are straight.- Returns:
- The basic outline for the specified parameters.
-
getBaseOutline
public static java.awt.Shape getBaseOutline(java.awt.ComponentOrientation orientation, float width, float height, float radius, java.util.Set<RadianceThemingSlices.Side> straightSides)Returns basic outline for the specified parameters. The basic outline is a rectangle with rounded corners. Some corners may not be rounded based on the contents ofstraightSideparameter.- Parameters:
width- Width of some UI component.height- Height of some UI component.radius- Corner radius.straightSides- Contains all sides which are straight.- Returns:
- The basic outline for the specified parameters.
-
getBaseOutline
public static java.awt.Shape getBaseOutline(java.awt.ComponentOrientation orientation, float width, float height, float radius, java.util.Set<RadianceThemingSlices.Side> straightSides, float insets)Returns basic outline for the specified parameters. The basic outline is a rectangle with rounded corners. Some corners may not be rounded based on the contents ofstraightSidesparameter.- Parameters:
width- Width of some UI component.height- Height of some UI component.radius- Corner radius.straightSides- Contains all sides which are straight.insets- Shape insets.- Returns:
- The basic outline for the specified parameters.
-
getTriangleButtonOutline
public static java.awt.geom.GeneralPath getTriangleButtonOutline(float width, float height, float radius, float insets)Returns outline that has a triangle pointing downwards. The top two corners in the outline are rounded. This function can be used to draw slider thumbs.- Parameters:
width- Width of some UI component.height- Height of some UI component.radius- Corner radius for the top two corners.insets- Insets to compute the outline.- Returns:
- Outline that has a triangle pointing downwards.
-
-