com.nutiteq.wrappers.rimui
Class Graphics

java.lang.Object
  extended by com.nutiteq.wrappers.rimui.Graphics

public class Graphics
extends java.lang.Object

Wrapper implementation around RIM UI graphics to enable similar API to J2ME graphics. Only methods used in library have been implemented.


Field Summary
static int BASELINE
           
static int BOTTOM
           
static int DOTTED
           
static int HCENTER
           
static int LEFT
           
static int RIGHT
           
static int SOLID
           
static int TOP
           
static int VCENTER
           
 
Constructor Summary
Graphics(net.rim.device.api.ui.Graphics buffered)
          Wrap 'native' RIM UI Graphics class
 
Method Summary
 void drawImage(Image image, int x, int y, int anchor)
           
 void drawLine(int startX, int startY, int endX, int endY)
           
 void drawRect(int x, int y, int width, int height)
           
 void drawRGB(int[] rgbData, int offset, int scanlength, int x, int y, int width, int height, boolean processAlpha)
           
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
 void drawString(java.lang.String string, int x, int y, int anchor)
           
 void fillRect(int x, int y, int width, int height)
           
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
           
 void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3)
          Not implemented yet
 int getClipHeight()
           
 int getClipWidth()
           
 int getClipX()
           
 int getClipY()
           
 net.rim.device.api.ui.Graphics getNative()
          get RIM UI Graphics class, enables to use native methods of it
 void popAll()
          Pop graphics contexts, that might have been pushed in setClip(int, int, int, int).
 void setClip(int x, int y, int width, int height)
           
 void setColor(int color)
           
 void setFont(Font font)
           
 void translate(int x, int y)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HCENTER

public static final int HCENTER
See Also:
Constant Field Values

VCENTER

public static final int VCENTER
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

BASELINE

public static final int BASELINE
See Also:
Constant Field Values

SOLID

public static final int SOLID
See Also:
Constant Field Values

DOTTED

public static final int DOTTED
See Also:
Constant Field Values
Constructor Detail

Graphics

public Graphics(net.rim.device.api.ui.Graphics buffered)
Wrap 'native' RIM UI Graphics class

Parameters:
buffered - graphics to be wrapped
Method Detail

translate

public void translate(int x,
                      int y)

getNative

public net.rim.device.api.ui.Graphics getNative()
get RIM UI Graphics class, enables to use native methods of it

Returns:
RIM native Graphics

setColor

public void setColor(int color)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)

drawImage

public void drawImage(Image image,
                      int x,
                      int y,
                      int anchor)

fillTriangle

public void fillTriangle(int x1,
                         int y1,
                         int x2,
                         int y2,
                         int x3,
                         int y3)
Not implemented yet

Parameters:
x1 -
y1 -
x2 -
y2 -
x3 -
y3 -

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)

drawLine

public void drawLine(int startX,
                     int startY,
                     int endX,
                     int endY)

drawString

public void drawString(java.lang.String string,
                       int x,
                       int y,
                       int anchor)

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)

setFont

public void setFont(Font font)

drawRGB

public void drawRGB(int[] rgbData,
                    int offset,
                    int scanlength,
                    int x,
                    int y,
                    int width,
                    int height,
                    boolean processAlpha)

getClipX

public int getClipX()

getClipY

public int getClipY()

getClipWidth

public int getClipWidth()

getClipHeight

public int getClipHeight()

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)

popAll

public void popAll()
Pop graphics contexts, that might have been pushed in setClip(int, int, int, int). This method will not fail, when no pushes have been performed