com.objectxp.msg.ems
Class EMSAnimation

java.lang.Object
  extended by com.objectxp.msg.ems.EMSElement
      extended by com.objectxp.msg.ems.EMSAnimation
All Implemented Interfaces:
java.io.Serializable

public class EMSAnimation
extends EMSElement

This class represents a EMS Animation element. How the animation is displayed on the phone obviously depends on the size of the display and the type of phone. It is therefore important to verify the visual appearance of the animation on the actual target devices.

There are two types of EMS animations:

Since:
jSMS 1.7
See Also:
EMSMessage, Serialized Form

Field Summary
static EMSAnimation ANGRY
          Pre-defined animation: ANGRY
static EMSAnimation CONFUSED
          Pre-defined animation: CONFUSED
static EMSAnimation CRYING
          Pre-defined animation: CRYING
static EMSAnimation DEVIL
          Pre-defined animation: DEVIL
static EMSAnimation GLAD
          Pre-defined animation: GLAD
static EMSAnimation GLASSES
          Pre-defined animation: GLASSES
static EMSAnimation INDIFFERENT
          Pre-defined animation: INDIFFERENT
static EMSAnimation IRONIC
          Pre-defined animation: IRONIC
static EMSAnimation LAUGHING
          Pre-defined animation: LAUGHING
static EMSAnimation LOVE
          Pre-defined animation: LOVE
static EMSAnimation SAD
          Pre-defined animation: SAD
static EMSAnimation SCEPTIC
          Pre-defined animation: SCEPTIC
static EMSAnimation TONGUE
          Pre-defined animation: TONGUE
static EMSAnimation WINKING
          Pre-defined animation: WINKING
static EMSAnimation WOW
          Pre-defined animation: WOW
 
Constructor Summary
EMSAnimation(EMSPicture[] pics)
          Construct a new user-defined EMS Animation.
EMSAnimation(int number)
          Construct a predefined EMS Animation.
 
Method Summary
 int getPredefinedAnimation()
          Gets the predefined EMS Animation number.
 EMSPicture[] getUserDefinedAnimation()
          Gets the user defined EMS Animation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IRONIC

public static final EMSAnimation IRONIC
Pre-defined animation: IRONIC


GLAD

public static final EMSAnimation GLAD
Pre-defined animation: GLAD


SCEPTIC

public static final EMSAnimation SCEPTIC
Pre-defined animation: SCEPTIC


SAD

public static final EMSAnimation SAD
Pre-defined animation: SAD


WOW

public static final EMSAnimation WOW
Pre-defined animation: WOW


CRYING

public static final EMSAnimation CRYING
Pre-defined animation: CRYING


WINKING

public static final EMSAnimation WINKING
Pre-defined animation: WINKING


LAUGHING

public static final EMSAnimation LAUGHING
Pre-defined animation: LAUGHING


INDIFFERENT

public static final EMSAnimation INDIFFERENT
Pre-defined animation: INDIFFERENT


LOVE

public static final EMSAnimation LOVE
Pre-defined animation: LOVE


CONFUSED

public static final EMSAnimation CONFUSED
Pre-defined animation: CONFUSED


TONGUE

public static final EMSAnimation TONGUE
Pre-defined animation: TONGUE


ANGRY

public static final EMSAnimation ANGRY
Pre-defined animation: ANGRY


GLASSES

public static final EMSAnimation GLASSES
Pre-defined animation: GLASSES


DEVIL

public static final EMSAnimation DEVIL
Pre-defined animation: DEVIL

Constructor Detail

EMSAnimation

public EMSAnimation(EMSPicture[] pics)
             throws java.lang.IllegalArgumentException
Construct a new user-defined EMS Animation.

Animations are coded as 4 sequential pictures, with the first picture sent first.

For large animations, each picture in the animation must have the dimension 16 x 16 pixels, for small animations the dimension must be 8 x 8 pixels.

Parameters:
pics - an array containing exactly 4 EMSPictures of the same dimension
Throws:
java.lang.IllegalArgumentException - if the parameter pics is null, or doesn't contain exactly 4 EMSPicture objects

EMSAnimation

public EMSAnimation(int number)
             throws java.lang.IllegalArgumentException
Construct a predefined EMS Animation.

Parameters:
number - the number of the predefined animation
Throws:
java.lang.IllegalArgumentException - if the number is lower than zero or greater than 255
Method Detail

getPredefinedAnimation

public int getPredefinedAnimation()
Gets the predefined EMS Animation number.

Returns:
the number or -1 when this object represents an user defined animation

getUserDefinedAnimation

public EMSPicture[] getUserDefinedAnimation()
Gets the user defined EMS Animation.

Returns:
the pictures or null when this object represents an predefined animation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


object XP, Inc. © 2000-2008. All rights reserved object XP