Class DefaultButtonImageResource

All Implemented Interfaces:
Serializable, IResource, IClusterable

Automatically generates a basic button image. The model for the component determines the label displayed on the button.
Author:
Jonathan Locke
See Also:
  • Constructor Details

    • DefaultButtonImageResource

      public DefaultButtonImageResource(int width, int height, String label)
      Parameters:
      label - The label for this button image
      width - Width of image in pixels
      height - Height of image in pixels
    • DefaultButtonImageResource

      Parameters:
      label - The label for this button image
  • Method Details

    • setDefaultHeight

      public static void setDefaultHeight(int defaultHeight)
      Parameters:
      defaultHeight - The defaultHeight to set.
    • setDefaultWidth

      public static void setDefaultWidth(int defaultWidth)
      Parameters:
      defaultWidth - The defaultWidth to set.
    • getArcHeight

      public int getArcHeight()
      Returns:
      Returns the arcHeight.
    • getArcWidth

      public int getArcWidth()
      Returns:
      Returns the arcWidth.
    • getBackgroundColor

      Returns:
      Returns the backgroundColor.
    • getColor

      public Color getColor()
      Returns:
      Returns the color.
    • getFont

      public Font getFont()
      Returns:
      Returns the font.
    • getTextColor

      public Color getTextColor()
      Returns:
      Returns the textColor.
    • setArcHeight

      public void setArcHeight(int arcHeight)
      Parameters:
      arcHeight - The arcHeight to set.
    • setArcWidth

      public void setArcWidth(int arcWidth)
      Parameters:
      arcWidth - The arcWidth to set.
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
      Parameters:
      backgroundColor - The backgroundColor to set.
    • setColor

      public void setColor(Color color)
      Parameters:
      color - The color to set.
    • setFont

      public void setFont(Font font)
      Parameters:
      font - The font to set.
    • setTextColor

      public void setTextColor(Color textColor)
      Parameters:
      textColor - The textColor to set.
    • render

      protected boolean render(Graphics2D graphics, IResource.Attributes attributes)
      Renders button image.
      Specified by:
      render in class RenderedDynamicImageResource
      Parameters:
      graphics - The graphics context to render on.
      attributes - the current request attributes
      Returns:
      true if the image was rendered. false if the image size was changed by the rendering implementation and the image should be re-rendered at the new size.
      See Also: