|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.objectxp.msg.ems.EMSElement
com.objectxp.msg.ems.EMSPicture
public class EMSPicture
This class represents a EMS Picture.
Pictures are coded from upper left to lower right and in each byte the most significant bit represent the pixel at the left. The pictures are plain black and white, no colours or grey scales are supported. The bitvalue "0" represents a white pixel and the bitvalue "1" represents a black pixel.
There are three differend types of EMS pictures:
| Field Summary | |
|---|---|
static int |
LARGE
Picture type: LARGE (32x32) |
static int |
SMALL
Picture type: SMALL (16x16) |
static int |
VARIABLE
Picture type: VARIABLE |
| Constructor Summary | |
|---|---|
EMSPicture(byte[] picture)
Construct a small or large EMS Picture. |
|
EMSPicture(byte[] picture,
int width,
int height)
Construct a new variable sized EMS Picture. |
|
EMSPicture(java.awt.Image img)
Construct a new EMS Picture. |
|
| Method Summary | |
|---|---|
java.awt.Image |
getImage()
|
byte[] |
getImageData()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SMALL
public static final int LARGE
public static final int VARIABLE
| Constructor Detail |
|---|
public EMSPicture(byte[] picture)
throws java.lang.IllegalArgumentException
picture - the picture data
java.lang.IllegalArgumentException - if the picture is null or is neither a
small (32 octets) or large (128 octets) picture.
public EMSPicture(byte[] picture,
int width,
int height)
The width of the picture must be a multiple of 8 pixels up to the screen width (ie. 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96).
The height of the picture may be from 1 to 255 pixels.
Note: The total product of Width and Height must never exceed 1024 pixels (128 octets).
picture - the picture data.width - the width of the picture in pixelsheight - the height of the picture in pixels.
java.lang.IllegalArgumentException - if the picture is null, the picture data
exceeds 128 octets or the width or height parameter has an illegal value.public EMSPicture(java.awt.Image img)
The width of the picture must be a multiple of 8 pixels up to the screen width (ie. 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96).
The height of the picture may be from 1 to 255 pixels.
Note: The total product of Width and Height must never exceed 1024 pixels (128 octets).
| Method Detail |
|---|
public java.awt.Image getImage()
public byte[] getImageData()
public java.lang.String toString()
toString in class java.lang.Object
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||