| org.netbeans.microedition.lcdui.wma.SMSComposer
SMSComposer | public class SMSComposer extends Canvas implements CommandListener(Code) | | The SMSComposer provides an easy and convenient way to send SMS messages
directly from JavaME application.
|
Field Summary | |
public static Command | SEND_COMMAND Command fired when SMS sent. |
Constructor Summary | |
public | SMSComposer(Display display) Creates a new instance of SMSComposer for given Display object. |
Method Summary | |
public void | commandAction(Command c, Displayable d) Indicates that a command event has occurred on Displayable d.
Parameters: c - a Command object identifying the command. | public ColorSchema | getColorSchema() Returnd component's color schema. | public CommandListener | getCommandListener() Returns component's command listener. | protected void | keyPressed(int keyCode) Called when a key is pressed. | protected void | keyReleased(int keyCode) Called when a key is released. | protected void | paint(Graphics graphics) Paints this canvas. | public void | sendSMS() Sends the message based on given non null phone number and port number. | public void | setBGColor(int color) Sets component's background color. | public void | setCommandListener(CommandListener listener) Sets component's command listener. | public void | setDefaulBorderStyles() Sets Default border styles. | public void | setDefaultFonts() Sets Default fonts. | public void | setFGColor(int color) Sets component's foreground color. | public void | setMessage(String message) Sets the message text. | public void | setMessageLabel(String messageLabel) Sets the message text label. | public void | setPhoneNumber(String phoneNumber) Sets the phone number. | public void | setPhoneNumberLabel(String phoneNumberLabel) Sets the phone number label. | public void | setPort(int portNum) | public void | setSendAutomatically(boolean sendAutomatically) Controlls execution of sendSMS method. | protected void | showNotify() The implementation calls showNotify() immediately prior to this Canvas
being made visible on the display. | protected void | sizeChanged(int w, int h) Called when the drawable area of the Canvas has been changed. |
SEND_COMMAND | public static Command SEND_COMMAND(Code) | | Command fired when SMS sent.
|
SMSComposer | public SMSComposer(Display display)(Code) | | Creates a new instance of SMSComposer for given Display object.
Parameters: display - A non-null display object. |
commandAction | public void commandAction(Command c, Displayable d)(Code) | | Indicates that a command event has occurred on Displayable d.
Parameters: c - a Command object identifying the command. This is eitherone of the applications have been added to Displayable with addCommand(Command)or is the implicit SELECT_COMMAND of List. Parameters: d - the Displayable on which this event has occurred |
getColorSchema | public ColorSchema getColorSchema()(Code) | | Returnd component's color schema.
colorSchema |
getCommandListener | public CommandListener getCommandListener()(Code) | | Returns component's command listener.
CommandListener |
keyPressed | protected void keyPressed(int keyCode)(Code) | | Called when a key is pressed.
Parameters: keyCode - the key code of the key that was pressed |
keyReleased | protected void keyReleased(int keyCode)(Code) | | Called when a key is released.
Parameters: keyCode - the key code of the key that was released |
paint | protected void paint(Graphics graphics)(Code) | | Paints this canvas.
Parameters: graphics - the Graphic object to be used for rendering the Canvas |
sendSMS | public void sendSMS() throws IOException(Code) | | Sends the message based on given non null phone number and port number.
throws: IOException - if the message could not be sent or because of network failure or if the connection is not available |
setBGColor | public void setBGColor(int color)(Code) | | Sets component's background color.
Parameters: color - background color |
setCommandListener | public void setCommandListener(CommandListener listener)(Code) | | Sets component's command listener.
Parameters: listener - CommandListener |
setDefaulBorderStyles | public void setDefaulBorderStyles()(Code) | | Sets Default border styles.
|
setDefaultFonts | public void setDefaultFonts()(Code) | | Sets Default fonts.
|
setFGColor | public void setFGColor(int color)(Code) | | Sets component's foreground color.
Parameters: color - foreground color |
setMessage | public void setMessage(String message)(Code) | | Sets the message text.
Parameters: message - message text |
setMessageLabel | public void setMessageLabel(String messageLabel)(Code) | | Sets the message text label.
Parameters: messageLabel - message text label |
setPhoneNumber | public void setPhoneNumber(String phoneNumber)(Code) | | Sets the phone number.
Parameters: phoneNumber - phone number |
setPhoneNumberLabel | public void setPhoneNumberLabel(String phoneNumberLabel)(Code) | | Sets the phone number label.
Parameters: phoneNumberLabel - phone number label |
setPort | public void setPort(int portNum)(Code) | | Sets the port number
Parameters: portNum - port number |
setSendAutomatically | public void setSendAutomatically(boolean sendAutomatically)(Code) | | Controlls execution of sendSMS method. Default value of sendAutomaticly argument is Boolean.TRUE which means that method sendSMS is
invoked when command Send pressed. If sendAutomaticly is Boolean.FALSE then sendSMS method is not invoked after Send command is pressed.
Parameters: sendAutomatically - Boolean.TRUE sendSMS method is executed, Boolean.FALSE sendSMS method is NOT executed |
showNotify | protected void showNotify()(Code) | | The implementation calls showNotify() immediately prior to this Canvas
being made visible on the display. Canvas subclasses may override this method
to perform tasks before being shown, such as setting up animations, starting
timers, etc.
|
sizeChanged | protected void sizeChanged(int w, int h)(Code) | | Called when the drawable area of the Canvas has been changed. This method
has augmented semantics compared to Displayable.sizeChanged.
In addition to the causes listed in Displayable.sizeChanged, a size
change can occur on a Canvas because of a change between normal and full-screen modes.
If the size of a Canvas changes while it is actually visible on the display,
it may trigger an automatic repaint request. If this occurs, the call to size Changed will
occur prior to the call to paint. If the Canvas has become smaller, the
implementation may choose not to trigger a repaint request if the remaining
contents of the Canvas have been preserved. Similarly, if the Canvas has become
larger, the implementation may choose to trigger a repaint only for the new region.
In both cases, the preserved contents must remain stationary with respect to the origin
of the Canvas . If the size change is significant to the contents of the Canvas ,
the application must explicitly issue a repaint request for the changed areas.
Note that the application's repaint request should not cause multiple repaints,
since it can be coalesced with repaint requests that are already pending.
If the size of a Canvas changes while it is not visible, the implementation
may choose to delay calls to sizeChanged until immediately prior to the call
to showNotify. In that case, there will be only one call to sizeChanged,
regardless of the number of size changes.
An application that is sensitive to size changes can update instance
variables in its implementation of sizeChanged. These updated values
will be available to the code in the showNotify, hideNotify, and paint methods.
Parameters: w - the new width in pixels of the drawable area of the Canvas Parameters: h - the new height in pixels of the drawable area of the Canvas |
|
|