Canned getPolygon(), which made a seemingly useless rectangular polygon and
wasn't used in anywhere anyway. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1249 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SwingUtil.java,v 1.24 2003/06/02 17:45:35 mdb Exp $
|
||||
// $Id: SwingUtil.java,v 1.25 2003/10/09 21:15:14 ray Exp $
|
||||
//
|
||||
// samskivert library - useful routines for java programs
|
||||
// Copyright (C) 2001 Michael Bayne
|
||||
@@ -246,26 +246,6 @@ public class SwingUtil
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a polygon representing the rectangle defined by the
|
||||
* specified upper left coordinate and the supplied dimensions.
|
||||
*
|
||||
* @param x the left edge of the rectangle.
|
||||
* @param y the top of the rectangle.
|
||||
* @param d the rectangle's dimensions.
|
||||
*
|
||||
* @return the bounding polygon.
|
||||
*/
|
||||
public static Polygon getPolygon (int x, int y, Dimension d)
|
||||
{
|
||||
Polygon poly = new Polygon();
|
||||
poly.addPoint(x, y);
|
||||
poly.addPoint(x + d.width, y);
|
||||
poly.addPoint(x + d.width, y + d.height);
|
||||
poly.addPoint(x, y + d.height);
|
||||
return poly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables (or disables) the specified component, <em>and all of its
|
||||
* children.</cite> A simple call to {@link Container#setEnabled}
|
||||
|
||||
Reference in New Issue
Block a user