edu.uci.ics.jung.visualization.graphics
Interface IGraphics


public interface IGraphics

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)
           
 Label createLabel()
           
 void draw(Shape s)
           
 void draw3DRect(int x, int y, int width, int height, boolean raised)
           
 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)
           
 boolean drawImage(Image img, AffineTransform xform)
           
 boolean drawImage(Image img, int x, int y)
           
 boolean drawLabel(Label img, int x, int y)
           
 boolean 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 fill3DRect(int x, int y, int width, int height, boolean raised)
           
 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)
           
 Color getBackground()
           
 Shape getClip()
           
 Rectangle getClipBounds()
           
 Rectangle getClipBounds(Rectangle r)
           
 Color getColor()
           
 Font getFont()
           
 Paint getPaint()
           
 Stroke getStroke()
           
 AffineTransform getTransform()
           
 boolean hit(Rectangle rect, Shape s, boolean onStroke)
           
 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 setTransform(AffineTransform Tx)
           
 

Method Detail

createLabel

Label createLabel()

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)

draw3DRect

void draw3DRect(int x,
                int y,
                int width,
                int height,
                boolean raised)

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

boolean drawImage(Image img,
                  AffineTransform xform)

drawImage

boolean drawImage(Image img,
                  int x,
                  int y)

drawLabel

boolean drawLabel(Label img,
                  int x,
                  int y)

drawLabel

boolean 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)

fill3DRect

void fill3DRect(int x,
                int y,
                int width,
                int height,
                boolean raised)

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.