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 |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XpmParser
public XpmParser(java.io.InputStream is)
- Construct and XpmParser from an InputStream
- Parameters:
is
- the imput stream to parse
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.