Module org.autogui

Class ApplicationIconGenerator

java.lang.Object
org.autogui.swing.util.ApplicationIconGenerator

public class ApplicationIconGenerator extends Object
generating an icon image from the name of the app
  • Field Details

    • width

      protected float width
    • height

      protected float height
    • names

      protected List<String> names
  • Constructor Details

    • ApplicationIconGenerator

      public ApplicationIconGenerator()
    • ApplicationIconGenerator

      public ApplicationIconGenerator(float width, float height, List<String> names)
  • Method Details

    • main

      public static void main(String[] args)
    • runDemo

      public void runDemo()
    • setWidth

      public void setWidth(float width)
    • setHeight

      public void setHeight(float height)
    • setNames

      public void setNames(List<String> names)
    • getWidth

      public float getWidth()
    • getHeight

      public float getHeight()
    • getNames

      public List<String> getNames()
    • setAppIcon

      public void setAppIcon(JFrame frame, String name)
    • setAppIcon

      public void setAppIcon(JFrame frame)
    • setFrameIcon

      public void setFrameIcon(JFrame frame)
      setting the frame icon
      Parameters:
      frame - the target frame
      Since:
      1.5
    • setAppIcon

      public static void setAppIcon(Image image)
      setting-up the app-icon to the target-bar if supported
      Parameters:
      image - the icon-image
      Since:
      1.5
    • setMacApplicationIcon

      @Deprecated public void setMacApplicationIcon(JFrame frame, Image image)
      Deprecated.
    • getImage

      public BufferedImage getImage()
    • paint

      public void paint(Graphics2D g)
    • getNameColorHue

      public float getNameColorHue(String name)
    • layout

      public static ApplicationIconGenerator.NameLinePattern layout(float[] w, float h, float requiredRatio)
    • drawShadow

      public void drawShadow(Graphics2D g2, int shadowWidth, Shape shape, float alpha)
    • buildRadialGradientPaint

      public RadialGradientPaint buildRadialGradientPaint(float x, float y, float r, float hue, float sat1, float br1, float sat2, float br2)
    • getHSBColor

      public Color getHSBColor(float hue, float sat, float br, float alpha)
    • buildRectSmaller

      public Rectangle2D.Float buildRectSmaller(Rectangle2D.Float base, float w, float h)
    • 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)