|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.io.AbstractGraphics jcontrol.graphics.XDisplay
public class XDisplay
Field Summary |
---|
Fields inherited from class jcontrol.io.AbstractGraphics |
---|
NEGATIVE, OFF, ON, SYSTEMFONT |
Fields inherited from interface jcontrol.graphics.XGraphics |
---|
ANCHOR_BASELINE, ANCHOR_BOTTOM, ANCHOR_HCENTER, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, ANCHOR_VCENTER, DRAWMODE_AND, DRAWMODE_INVERSE, DRAWMODE_MASK, DRAWMODE_NORMAL, DRAWMODE_OR, DRAWMODE_XOR, MAX_BRIGHTNESS, MAX_CONTRAST, MIN_BRIGHTNESS, MIN_CONTRAST, STROKEMODE_DOTTED, STROKEMODE_SOLID |
Fields inherited from interface jcontrol.io.Graphics |
---|
AND, INVERSE, NORMAL, OR, XOR |
Constructor Summary | |
---|---|
XDisplay()
|
Method Summary | |
---|---|
boolean |
clipRect(int nx,
int ny,
int nw,
int nh)
Intersects the stored ClipRect with another represented by the given values. |
XGraphics |
cloneXGraphics()
Creates a clone of this XGraphics object that has the same settings as this one, but acts independently. |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
NOTE: not supported Copies an area within the framebuffer. |
void |
drawArc(int x,
int y,
int width,
int height,
int startangle,
int arcangle)
NOTE: not supported Draws an elliptic arc. |
int |
drawChar(char c,
int x,
int y,
int anchor)
NOTE: not supported Draws a single character with the currently set font. |
void |
drawImage(Object drawable,
int x,
int y)
Draws an image to the specified coordinates. |
void |
drawImage(Object drawable,
int x,
int y,
int anchor)
NOTE: not supported Draws an image. |
void |
drawImage(Object drawable,
int x,
int y,
int width,
int height,
int xoff,
int yoff)
Draws a subimage to the specified coordinates. |
void |
drawOval(int x,
int y,
int width,
int height)
Draws an ellipse. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
NOTE: not supported Draws a closed polyline. |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
NOTE: not supported Draws a polyline. |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws a rounded rectangle. |
void |
drawString(String s,
int x,
int y,
int anchor)
NOTE: not supported Draws a text string with the currently set font. |
void |
fillArc(int x,
int y,
int width,
int height,
int startangle,
int arcangle)
NOTE: not supported Draws a filled elliptic arc, which is similar to a pie charts element. |
void |
fillOval(int x,
int y,
int width,
int height)
Draws a filled ellipse. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
NOTE: not supported Draws a polygon. |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws a filled rounded rectangle. |
protected void |
finalize()
free internal data structures used by this xdisplay object. |
int |
getBackground()
Returns the ARGB value of the current background color. |
int |
getBrightness()
Get current backlight brightness. |
int |
getClipHeight()
Returns the height of the clipping rectangle |
int |
getClipWidth()
Returns the width of the clipping rectangle |
int |
getClipX()
Returns the relative x-location of the clipping rectangle |
int |
getClipY()
Returns the relative y-location of the clipping rectangle |
int |
getColor()
Returns the ARGB value of the current drawing color. |
int |
getContrast()
Get current display contrast. |
Object |
getFont()
Returns the currently set font. |
int |
getStrokeMode()
NOTE: not supported Returns the current stroke mode. |
int |
getTranslateX()
Returns the absolute x-location of the origin |
int |
getTranslateY()
Returns the absolute y-location of the origin |
boolean |
isClipRectEmpty()
Checks, if the current clipping rectangle is empty (i.e. doesn't cover any pixel). |
boolean |
isOverlapping(int x,
int y,
int width,
int height)
Checks, if the given rectangle overlaps (or - mathematically spoken - intersects) with the current clipping rectangle. |
void |
setBackground(Color color)
Sets the background color. |
void |
setBrightness(int value)
Set backlight's brightness |
void |
setClip(int nx,
int ny,
int nw,
int nh)
Sets the clipping rectangle. |
void |
setColor(Color color)
Sets the drawing color. |
void |
setContrast(int value)
Set displays contrast |
void |
setFont(Object newfont)
Sets the font to use. |
void |
setStrokeMode(int mode)
NOTE: not supported Sets the stroke mode. |
void |
swapColors()
Swaps drawing and background color. |
void |
translate(int dx,
int dy)
Moves the translation (origin) point. |
Methods inherited from class jcontrol.io.AbstractGraphics |
---|
clearDisplay, clearRect, drawChar, drawLine, drawRect, drawString, drawString, fillRect, getDrawMode, getFontHeight, getPixel, getTextWidth, scroll, setBackground, setColor, setDisplayMode, setDrawMode, setPixel |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Methods inherited from interface jcontrol.graphics.XGraphics |
---|
drawChar, scroll, setBackground, setColor |
Methods inherited from interface jcontrol.io.Graphics |
---|
clearRect, drawLine, drawRect, drawString, drawString, fillRect, getDrawMode, getFontHeight, getPixel, getTextWidth, setDrawMode, setPixel |
Constructor Detail |
---|
public XDisplay()
Method Detail |
---|
public XGraphics cloneXGraphics()
public void setBrightness(int value)
value
- value between 0 (backlight off) and 0xffff (very bright)public int getBrightness()
public void setContrast(int value)
value
- value between 0 (contrast off) and 0xffff (very high contrast)public int getContrast()
protected void finalize()
public void setColor(Color color)
setColor
in interface XGraphics
c
- new drawing colorpublic int getColor()
getColor
in interface XGraphics
public void setBackground(Color color)
setBackground
in interface XGraphics
c
- new background colorpublic int getBackground()
getBackground
in interface XGraphics
public void swapColors()
swapColors
in interface XGraphics
public void setFont(Object newfont)
setFont
in interface Graphics
setFont
in class AbstractGraphics
newfont
- the font to use, possible values: SYSTEMFONT
(default) or
a instance of Resource
specifying the font, the resource has to be
in JCFD format (use FontEdit
of the JControl toolware to generate).AbstractGraphics.drawString(java.lang.String s, int x, int y)
,
AbstractGraphics.SYSTEMFONT
public Object getFont()
getFont
in interface XGraphics
public void translate(int dx, int dy)
translate
in interface XGraphics
dx
- horizontal translationdy
- vertical translationpublic boolean clipRect(int nx, int ny, int nw, int nh)
clipRect
in interface XGraphics
nx
- new ClipRect xny
- new ClipRect ynw
- new ClipRect widthnh
- new ClipRect height
public void setClip(int nx, int ny, int nw, int nh)
setClip
in interface XGraphics
x
- new x-location of the clipping rectangley
- new x-location of the clipping rectanglewidth
- new width of the clipping rectangleheight
- new height of the clipping rectanglepublic int getTranslateX()
getTranslateX
in interface XGraphics
public int getTranslateY()
getTranslateY
in interface XGraphics
public int getClipX()
getClipX
in interface XGraphics
public int getClipY()
getClipY
in interface XGraphics
public int getClipWidth()
getClipWidth
in interface XGraphics
public int getClipHeight()
getClipHeight
in interface XGraphics
public boolean isOverlapping(int x, int y, int width, int height)
isOverlapping
in interface XGraphics
x
- x-location of rectangle to testy
- y-location of rectangle to testwidth
- width of rectangle to testheight
- height of rectangle to test
public boolean isClipRectEmpty()
isClipRectEmpty
in interface XGraphics
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in interface XGraphics
x
- x-locationy
- y-locationwidth
- widthheight
- heightarcWidth
- arcHeight
- public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in interface XGraphics
x
- x-locationy
- y-locationwidth
- widthheight
- heightarcWidth
- arcHeight
- public void drawOval(int x, int y, int width, int height)
drawOval
in interface XGraphics
x
- x-locationy
- y-locationwidth
- widthheight
- heightpublic void fillOval(int x, int y, int width, int height)
fillOval
in interface XGraphics
x
- x-locationy
- y-locationwidth
- widthheight
- heightpublic void drawImage(Object drawable, int x, int y)
Resource
pointing to a JCIF file (use JIFEditor to create)Drawable
specifiying what to draw
drawImage
in interface Graphics
drawImage
in class AbstractGraphics
drawable
- the image to drawx
- the horizontal coordinatey
- the vertical coordinatepublic void drawImage(Object drawable, int x, int y, int width, int height, int xoff, int yoff)
drawImage
in interface Graphics
drawImage
in class AbstractGraphics
drawable
- the image to drawx
- the horizontal coordinatey
- the vertical coordinatewidth
- the width of the sub image within the source imageheight
- the height of the sub image within the source imagexoff
- horizontal offset of the sub image within the source imageyoff
- vertical offset of the sub image within the source imagedrawImage(Object, int, int)
public void setStrokeMode(int mode)
setStrokeMode
in interface XGraphics
stroke
- mode (STROKEMODE_SOLID or STROKEMODE_DOTTED)public int getStrokeMode()
getStrokeMode
in interface XGraphics
public void drawArc(int x, int y, int width, int height, int startangle, int arcangle)
drawArc
in interface XGraphics
x
- x-location of the underlying ellipsey
- y-location of the underlying ellipsewidth
- width of the underlying ellipseheight
- height of the underlying ellipsestartAngle
- angle from where to start drawing (in degrees)arcAngle
- angle along which the arc has to be drawn (in degrees)public void fillArc(int x, int y, int width, int height, int startangle, int arcangle)
fillArc
in interface XGraphics
x
- x-location of the underlying ellipsey
- y-location of the underlying ellipsewidth
- width of the underlying ellipseheight
- height of the underlying ellipsestartAngle
- angle from where to start drawing (in degrees)arcAngle
- angle along which the arc has to be drawn (in degrees)public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in interface XGraphics
xPoints
- x-locations of the polyline's pointsyPoints
- y-locations of the polyline's pointsnPoints
- number of pointsdrawPolyline(int[], int[], int)
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in interface XGraphics
xPoints
- x-locations of the polyline's pointsyPoints
- y-locations of the polyline's pointsnPoints
- number of pointsdrawPolygon(int[], int[], int)
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in interface XGraphics
xPoints
- x-locations of the polygon's pointsyPoints
- y-locations of the polygon's pointsnPoints
- number of pointspublic int drawChar(char c, int x, int y, int anchor)
drawChar
in interface XGraphics
c
- character to drawx
- x-locationy
- y-locationanchor
- character alignment (e.g. ANCHOR_HCENTER or ANCHOR_BASELINE, ...)
public void drawString(String s, int x, int y, int anchor)
drawString
in interface XGraphics
s
- text to drawx
- x-locationy
- y-locationanchor
- text alignment (e.g. ANCHOR_HCENTER or ANCHOR_BASELINE, ...)public void drawImage(Object drawable, int x, int y, int anchor)
drawImage
in interface XGraphics
drawable
- drawable object (e.g. Image
or a Resource
containing
a bitmap image)x
- x-locationy
- y-locationanchor
- image alignment (e.g. ANCHOR_HCENTER or ANCHOR_TOP, ...)public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in interface XGraphics
x
- x-location of area to copyy
- y-location of area to copywidth
- width of area to copyheight
- height of area to copydx
- destination x-locationdy
- destination y-location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |