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 classa pattern of line wrapping in order to find optimal layout: indices are word indices of lines e.g.static classbounds 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) voiddrawShadow(Graphics2D g2, int shadowWidth, Shape shape, float alpha) floatgetHSBColor(float hue, float sat, float br, float alpha) getImage()floatgetNameColorHue(String name) getNames()floatgetWidth()layout(float[] w, float h, float requiredRatio) static voidvoidpaint(Graphics2D g) voidrunDemo()static voidsetAppIcon(Image image) setting-up the app-icon to the target-bar if supportedvoidsetAppIcon(JFrame frame) voidsetAppIcon(JFrame frame, String name) voidsetFrameIcon(JFrame frame) setting the frame iconvoidsetHeight(float height) voidsetMacApplicationIcon(JFrame frame, Image image) Deprecated.voidvoidsetWidth(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)
-