java.lang.Object
org.autogui.swing.util.ApplicationIconGenerator
generating an icon image from the name of the app
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
a pattern of line wrapping in order to find optimal layout: indices are word indices of lines e.g.static class
bounds of words with a graphics context -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildRadialGradientPaint
(float x, float y, float r, float hue, float sat1, float br1, float sat2, float br2) buildRectSmaller
(Rectangle2D.Float base, float w, float h) buildRoundRect
(boolean topLeft, boolean topRight, boolean bottomLeft, boolean bottomRight, float x, float y, float w, float h, float arc) buildRoundRect
(boolean topLeft, boolean topRight, boolean bottomLeft, boolean bottomRight, Rectangle2D.Float base, float arcP) void
drawShadow
(Graphics2D g2, int shadowWidth, Shape shape, float alpha) float
getHSBColor
(float hue, float sat, float br, float alpha) getImage()
float
getNameColorHue
(String name) getNames()
float
getWidth()
layout
(float[] w, float h, float requiredRatio) static void
void
paint
(Graphics2D g) void
runDemo()
static void
setAppIcon
(Image image) setting-up the app-icon to the target-bar if supportedvoid
setAppIcon
(JFrame frame) void
setAppIcon
(JFrame frame, String name) void
setFrameIcon
(JFrame frame) setting the frame iconvoid
setHeight
(float height) void
setMacApplicationIcon
(JFrame frame, Image image) Deprecated.void
void
setWidth
(float width)
-
Field Details
-
width
protected float width -
height
protected float height -
names
-
-
Constructor Details
-
ApplicationIconGenerator
public ApplicationIconGenerator() -
ApplicationIconGenerator
-
-
Method Details
-
main
-
runDemo
public void runDemo() -
setWidth
public void setWidth(float width) -
setHeight
public void setHeight(float height) -
setNames
-
getWidth
public float getWidth() -
getHeight
public float getHeight() -
getNames
-
setAppIcon
-
setAppIcon
-
setFrameIcon
setting the frame icon- Parameters:
frame
- the target frame- Since:
- 1.5
-
setAppIcon
setting-up the app-icon to the target-bar if supported- Parameters:
image
- the icon-image- Since:
- 1.5
-
setMacApplicationIcon
Deprecated. -
getImage
-
paint
-
getNameColorHue
-
layout
public static ApplicationIconGenerator.NameLinePattern layout(float[] w, float h, float requiredRatio) -
drawShadow
-
buildRadialGradientPaint
public RadialGradientPaint buildRadialGradientPaint(float x, float y, float r, float hue, float sat1, float br1, float sat2, float br2) -
getHSBColor
-
buildRectSmaller
-
buildRoundRect
public Path2D.Float buildRoundRect(boolean topLeft, boolean topRight, boolean bottomLeft, boolean bottomRight, Rectangle2D.Float base, float arcP) -
buildRoundRect
public Path2D.Float buildRoundRect(boolean topLeft, boolean topRight, boolean bottomLeft, boolean bottomRight, float x, float y, float w, float h, float arc)
-