Class ImageTag

java.lang.Object
com.j3d.gen.docs.api.ImageTag

public class ImageTag extends Object
A utility class for parsing and representing <img> HTML tags found within J3Engine documentation.

This class extracts relevant attributes such as src, alt, and scale from a TWhtmlTag object, validates them, and provides access to the parsed information. It ensures that image paths are relative to the application's resources and that the image files exist and are of supported types (.png, .jpg).

Author:
Lehlogonolo Poole
See Also:
  • Field Details

    • tag

      private TWhtmlTag tag
    • altText

      private String altText
    • imagePath

      private JarPath imagePath
    • scale

      private double scale
    • invalid

      private boolean invalid
  • Constructor Details

    • ImageTag

      private ImageTag(TWhtmlTag tag, JarPath imagePath, String altText, double scale)
    • ImageTag

      private ImageTag()
  • Method Details

    • getInstance

      public static ImageTag getInstance(TWhtmlTag tag)
    • getTag

      public TWhtmlTag getTag()
    • getAltText

      public String getAltText()
    • setAltText

      public void setAltText(String altText)
    • getImagePath

      public JarPath getImagePath()
    • getScale

      public double getScale()
    • isInvalid

      public boolean isInvalid()
    • read

      public ImageIcon read() throws IOException
      Throws:
      IOException