edu.mit.sketch.util
Class GraphicsUtil

java.lang.Object
  |
  +--edu.mit.sketch.util.GraphicsUtil

public class GraphicsUtil
extends Object

Implements some methods not found in jdk 1.1


Constructor Summary
GraphicsUtil()
           
 
Method Summary
static void clearComponent(Component component)
          Clear the component
static void drawThickLine(double r, Graphics g, double x1, double y1, double x2, double y2)
          Plot a thick line from (x1, y1) to (x2,y2) with radius r
static void drawThickLine(int r, Graphics g, int x1, int y1, int x2, int y2)
          Plot a thick line from (x1, y1) to (x2,y2) with radius r
static void drawThickOval(int r, Graphics g, int x, int y, int r1, int r2)
          Plot a thick line from (x1, y1) to (x2,y2) with radius r
static void setConstraints(GridBagLayout layout, Component component, int x, int y, int column_span, int row_span, double weightx, double weighty, int fill, int anchor, Insets insets)
          Set the constraints of the input component using the arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsUtil

public GraphicsUtil()
Method Detail

drawThickLine

public static void drawThickLine(int r,
                                 Graphics g,
                                 int x1,
                                 int y1,
                                 int x2,
                                 int y2)
Plot a thick line from (x1, y1) to (x2,y2) with radius r

drawThickLine

public static void drawThickLine(double r,
                                 Graphics g,
                                 double x1,
                                 double y1,
                                 double x2,
                                 double y2)
Plot a thick line from (x1, y1) to (x2,y2) with radius r

drawThickOval

public static void drawThickOval(int r,
                                 Graphics g,
                                 int x,
                                 int y,
                                 int r1,
                                 int r2)
Plot a thick line from (x1, y1) to (x2,y2) with radius r

setConstraints

public static void setConstraints(GridBagLayout layout,
                                  Component component,
                                  int x,
                                  int y,
                                  int column_span,
                                  int row_span,
                                  double weightx,
                                  double weighty,
                                  int fill,
                                  int anchor,
                                  Insets insets)
Set the constraints of the input component using the arguments.

clearComponent

public static void clearComponent(Component component)
Clear the component