com.creamtec.ajaxswing.v4

## Class HtmlGraphics

- java.lang.Object
- - java.awt.Graphics
  - - java.awt.Graphics2D
    - - com.creamtec.ajaxswing.v4.HtmlGraphics

- Direct Known Subclasses:
    AbstractRenderingGraphics

      public abstract class HtmlGraphics
      extends java.awt.Graphics2D

  Bridge between AjaxSwing 3.2 `HTMLPage` object and new 4.0 Graphics architecture, allows basic appends on HtmlPage and methods for image manipulation `ImageUtils`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.awt.Font` | `defaultFont`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlGraphics(HtmlGraphics g)`
    `HtmlGraphics(HTMLPage page)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(char ch)`
    `void` | `append(int i)`
    `void` | `append(java.lang.String s)`
    `void` | `appendFontStyle(java.awt.Font font)`
    `void` | `appendHexColor(java.awt.Color color)`
    `void` | `appendHexValue(int i)`
    `void` | `appendText(java.lang.String text)` Append text to underlying HTMLPage escaping HTML and replacing white-space and tabs with equivalents.
    `java.awt.Graphics` | `create()`
    `java.awt.FontMetrics` | `getFontMetrics(java.awt.Font f)`
    `java.awt.Image` | `getImagePart(java.awt.Image img, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)` Returns a subimage defined by a specified rectangular region.
    `java.lang.String` | `getImageUrl(java.awt.Image image)`
    `java.lang.String` | `getImageUrl(java.awt.Image image, boolean keepUntilRestart)`
    `HTMLPage` | `getPage()`

    - ### Methods inherited from class java.awt.Graphics2D

      `addRenderingHints, clip, draw, draw3DRect, drawGlyphVector, drawImage, drawImage, drawRenderableImage, drawRenderedImage, drawString, drawString, drawString, drawString, fill, fill3DRect, getBackground, getComposite, getDeviceConfiguration, getFontRenderContext, getPaint, getRenderingHint, getRenderingHints, getStroke, getTransform, hit, rotate, rotate, scale, setBackground, setComposite, setPaint, setRenderingHint, setRenderingHints, setStroke, setTransform, shear, transform, translate, translate`

    - ### Methods inherited from class java.awt.Graphics

      `clearRect, clipRect, copyArea, create, dispose, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### defaultFont

          public static final java.awt.Font defaultFont

  - ### Constructor Detail

    - #### HtmlGraphics

          public HtmlGraphics(HtmlGraphics g)
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### HtmlGraphics

          public HtmlGraphics(HTMLPage page)

  - ### Method Detail

    - #### append

          public void append(char ch)

    - #### append

          public void append(int i)

    - #### append

          public void append(java.lang.String s)

    - #### appendFontStyle

          public void appendFontStyle(java.awt.Font font)

    - #### appendHexColor

          public void appendHexColor(java.awt.Color color)

    - #### appendHexValue

          public void appendHexValue(int i)

    - #### appendText

          public void appendText(java.lang.String text)

      Append text to underlying HTMLPage escaping HTML and replacing white-space and tabs with equivalents.
      Parameters:
        `text` - String to append

    - #### create

          public java.awt.Graphics create()

      Specified by:
        `create` in class `java.awt.Graphics`

    - #### getFontMetrics

          public java.awt.FontMetrics getFontMetrics(java.awt.Font f)

      Specified by:
        `getFontMetrics` in class `java.awt.Graphics`

    - #### getImagePart

          public java.awt.Image getImagePart(java.awt.Image img,
                                    int sx1,
                                    int sy1,
                                    int sx2,
                                    int sy2,
                                    java.awt.image.ImageObserver observer)

      Returns a subimage defined by a specified rectangular region.
      Parameters:
        `img` -
        `sx1` - X coordinate of the upper-left corner of the specified rectangular region
        `sy1` - Y coordinate of the upper-left corner of the specified rectangular region
        `sx2` - X coordinate of the lower-right corner of the specified rectangular region
        `sy2` - Y coordinate of the lower-right corner of the specified rectangular region
        `observer` -

    - #### getImageUrl

          public java.lang.String getImageUrl(java.awt.Image image,
                                     boolean keepUntilRestart)

    - #### getImageUrl

          public java.lang.String getImageUrl(java.awt.Image image)

    - #### getPage

          public HTMLPage getPage()

Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.