edu.uci.ics.jung.visualization.graphics
Interface GraphicsContext
- All Known Implementing Classes:
- GCGraphicsContext, GraphicsWrapper
public interface GraphicsContext
An interface for the graphics implementation responsible
for rendering onto a particular UI component. This interface
is intended to be independent of the underlying UI, but will
reference some AWT classes, such as java.awt.Shape and
java.awt.Color as they are not associated with any UI components
and are already available.
- Author:
- Jason A Wrang
|
Method Summary |
void |
clearRect(int x,
int y,
int width,
int height)
|
void |
clip(Shape s)
|
void |
clipRect(int x,
int y,
int width,
int height)
|
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
|
Image |
createImage(int width,
int height)
|
Label |
createLabel()
|
void |
dispose()
|
void |
draw(Shape s)
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
drawChars(char[] data,
int offset,
int length,
int x,
int y)
|
void |
drawImage(Image img,
AffineTransform xform)
|
void |
drawImage(Image img,
int x,
int y)
|
void |
drawLabel(Label img,
int x,
int y)
|
void |
drawLabel(Label img,
int x,
int y,
int w,
int h)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawOval(int x,
int y,
int width,
int height)
|
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawPolygon(Polygon p)
|
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawRect(int x,
int y,
int width,
int height)
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
void |
drawString(String s,
float x,
float y)
|
void |
drawString(String str,
int x,
int y)
|
void |
fill(Shape s)
|
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
fillOval(int x,
int y,
int width,
int height)
|
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
fillPolygon(Polygon p)
|
void |
fillRect(int x,
int y,
int width,
int height)
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
Boolean |
getAntialiasing()
|
Color |
getBackground()
|
int |
getCharWidth(char c)
|
Shape |
getClip()
|
Rectangle |
getClipBounds()
|
Rectangle |
getClipBounds(Rectangle r)
|
Color |
getColor()
|
Font |
getFont()
|
int |
getFontAscent()
|
int |
getFontDescent()
|
int |
getFontHeight()
|
Paint |
getPaint()
|
int |
getStringWidth(String str)
|
Stroke |
getStroke()
|
Boolean |
getTextAntialiasing()
|
AffineTransform |
getTransform()
|
boolean |
hit(Rectangle rect,
Shape s,
boolean onStroke)
|
void |
setAntialiasing(Boolean on)
|
void |
setBackground(Color color)
|
void |
setClip(int x,
int y,
int width,
int height)
|
void |
setClip(Shape clip)
|
void |
setColor(Color c)
|
void |
setFont(Font font)
|
void |
setPaint(Paint paint)
|
void |
setStroke(Stroke s)
|
void |
setTextAntialiasing(Boolean on)
|
void |
setTransform(AffineTransform Tx)
|
createLabel
Label createLabel()
createImage
Image createImage(int width,
int height)
setAntialiasing
void setAntialiasing(Boolean on)
getAntialiasing
Boolean getAntialiasing()
setTextAntialiasing
void setTextAntialiasing(Boolean on)
getTextAntialiasing
Boolean getTextAntialiasing()
dispose
void dispose()
getStringWidth
int getStringWidth(String str)
getFontAscent
int getFontAscent()
getFontDescent
int getFontDescent()
getFontHeight
int getFontHeight()
getCharWidth
int getCharWidth(char c)
clearRect
void clearRect(int x,
int y,
int width,
int height)
clip
void clip(Shape s)
clipRect
void clipRect(int x,
int y,
int width,
int height)
copyArea
void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
draw
void draw(Shape s)
drawArc
void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
drawChars
void drawChars(char[] data,
int offset,
int length,
int x,
int y)
drawImage
void drawImage(Image img,
int x,
int y)
drawImage
void drawImage(Image img,
AffineTransform xform)
drawLabel
void drawLabel(Label img,
int x,
int y)
drawLabel
void drawLabel(Label img,
int x,
int y,
int w,
int h)
drawLine
void drawLine(int x1,
int y1,
int x2,
int y2)
drawOval
void drawOval(int x,
int y,
int width,
int height)
drawPolygon
void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolygon
void drawPolygon(Polygon p)
drawPolyline
void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
drawRect
void drawRect(int x,
int y,
int width,
int height)
drawRoundRect
void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
drawString
void drawString(String s,
float x,
float y)
drawString
void drawString(String str,
int x,
int y)
fill
void fill(Shape s)
fillArc
void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
fillOval
void fillOval(int x,
int y,
int width,
int height)
fillPolygon
void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
fillPolygon
void fillPolygon(Polygon p)
fillRect
void fillRect(int x,
int y,
int width,
int height)
fillRoundRect
void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
getBackground
Color getBackground()
getColor
Color getColor()
getClip
Shape getClip()
getClipBounds
Rectangle getClipBounds()
getClipBounds
Rectangle getClipBounds(Rectangle r)
getFont
Font getFont()
getStroke
Stroke getStroke()
getPaint
Paint getPaint()
getTransform
AffineTransform getTransform()
hit
boolean hit(Rectangle rect,
Shape s,
boolean onStroke)
setBackground
void setBackground(Color color)
setClip
void setClip(int x,
int y,
int width,
int height)
setClip
void setClip(Shape clip)
setColor
void setColor(Color c)
setFont
void setFont(Font font)
setPaint
void setPaint(Paint paint)
setStroke
void setStroke(Stroke s)
setTransform
void setTransform(AffineTransform Tx)
Copyright © 2007. All Rights Reserved.