Your preferences have been saved!
» This program demonstrates the various 2D shapes - import java.awt.BorderLayout; import java.awt.EventQueue; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Shape; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent;... 15 Feb 12 » Fill Rectangle2D.Double and Ellipse2D.Double - import java.awt.Color; import java.awt.EventQueue; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import javax.swing.JComponent; import javax.swing.JFrame; /**  * @version 1.33 2007-04-14... 15 Feb 12 » RectListManager is a class to manage a list of rectangular - import java.awt.Rectangle; import java.io.Serializable; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.ListIterator; import java.util.NoSuchElementException; /**  * RectListManager is a class to manage a list of rectangular regions.... 15 Feb 12 » Returns a point based on (x, y) but constrained to - import java.awt.Shape; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; /**  * Utility methods for {@link Shape} objects.  *  * @author David Gilbert  */ public class Main {   /**... 15 Feb 12 » Reads a Point2D object that has been serialised by the - import java.awt.geom.Point2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; public class Main {   /**    * Returns <code>true</code> if a class implements <code>Serializable</code>    * and <code>false</code> otherwise.    *... 15 Feb 12 » Checks, whether the given rectangle1 fully contains rectangle 2 (even - import java.awt.Shape; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; /**  * Utility methods for {@link Shape} objects.  *  * @author David Gilbert  */ public class Main {   /**... 15 Feb 12 » Draws a shape with the specified rotation about (x, y). - import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; /**  * Utility methods for {@link Shape} objects.  *  * @author David Gilbert  */ public class Main {   /**... 15 Feb 12 » Calculate Intersection Clip - import javax.swing.*; import java.awt.*; /**  * @author johan  */ public class GraphicsUtil {   public static void drawOptimizedLine(Graphics g, int x1, int y1, int x2, int y2) {     if (g.getColor().getAlpha() < 255 && (x1 == x2 || y1 == y2))       g.fillRect(x1 < x2 ? x1 : x2, y1 < y2 ? y1 : y2, Math.abs(x2 - x1) + 1, Math.abs(y2 - y1) + 1);     else... 15 Feb 12 » Union two rectangles - import java.awt.geom.Rectangle2D; public class RectUtils {   /**    * Unions the pair of source <code>Rectangle2D</code> objects and puts the    * result into the returned <code>Rectangle2D</code> object. This method    * extends the Rectangle2D version by checking for null parameters, the    * returned value will also be <code>null</code> if the two input    * rectangles are <code>null</code>    *     * @param src1... 15 Feb 12 » Tests two polygons for equality. If both are null this - import java.awt.Polygon; import java.util.Arrays; public class Main {   /**    * Tests two polygons for equality.  If both are <code>null</code> this    * method returns <code>true</code>.    *    * @param p1  polygon 1 (<code>null</code> permitted).    * @param p2  polygon 2 (<code>null</code> permitted).    *... 15 Feb 12