Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jimi.core.util.x11
Class XpmParser

    java.lang.Object
      |
      +--com.sun.jimi.core.util.x11.XpmParser

public class XpmParser
extends java.lang.Object

X11 bitmap (xpm) parser Parse files of the form:

      static char * fee_m_pm[] = {
      "8 8 2 1 -1 -1",
      "       s iconColor5    m black c blue",
      ".      s none  m none  c none",
      "      ..",
      "    ....",
      "    ....",
      "     ...",
      " ..   ..",
      " ...   .",
      ".....   ",
      "......  "};

Constructor Summary
`XpmParser(java.io.InputStream is)` Construct and XpmParser from an InputStream

Method Summary
`java.awt.Color[]` | `getColorTable()` Get color table.
`int` | `getHeight()` Get image height.
`byte[]` | `getPixmap()` Get pixmap.
`int` | `getWidth()` Get image width.
`boolean` | `parse()` Parse input stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XpmParser

    public XpmParser(java.io.InputStream is)

  Construct and XpmParser from an InputStream
  Parameters:
    `is` - the imput stream to parse

Method Detail

### parse

    public boolean parse()

  Parse input stream.
  Returns:
    true on success.

### getWidth

    public int getWidth()

  Get image width.
  Returns:
    width in pixels.

### getHeight

    public int getHeight()

  Get image height.
  Returns:
    height in pixels.

### getPixmap

    public byte[] getPixmap()

  Get pixmap.
  Returns:
    pixmap array.

### getColorTable

    public java.awt.Color[] getColorTable()

  Get color table.
  Returns:
    array of used colors.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD