JAVA,ÈçºÎÅжϵãÊÇ·ñÔÚÃæÄÚ£¿
Ê×ÏÈÃæÒ²ÊÇÓÉһϵÁеĵã×é³É£¬±ÈÈ磬һ¸öÕý·½ÐΡ£ÎÒÃÇ¿ÉÒÔ°ÑËüµ±³ÉËĸö×ø±êµãÈ»ºóÖ±ÏßÁ¬½Ó¶ø³É¡£
java.awt.geom.GeneralPathΪÎÒÃÇʵÏÖµÄÕâ¸ö»ÏߵŦÄÜ¡£
ÏÂÃæÓÃÒ»¸ö¼òµ¥µÄÀý×ÓÀ´»Ò»¸öÃæ
/**
* ½«¾Î³¶Èµã¼¯ºÏת»»ÎªGeneralPath¶ÔÏó
*
* @param points µã¼¯ºÏ(ÓÐÐò)
*
* @return GeneralPath¶ÔÏó
*/
public static GeneralPath genGeneralPath(ArrayList<Point2D.Double> points) {
GeneralPath path = new GeneralPath();
if (points.size() < 3) {
return null;
}
path.moveTo((float) points.get(0).getX(), (float) points.get(0).getY());
for (Iterator<Point2D.Double> it = points.iterator(); it.hasNext();) {
Point2D.Double point = (Point2D.Double) it.next();
path.lineTo((float) point.getX(), (float) point.getY());
}
path.closePath();
return path;
}
ÆäÖС£pointsÊÇһϵÁÐ×ø±êµãµÄ¼¯ºÏ¡£ÎÒÃÇ¿ÉÒÔÓÃ
Point2D.Double point= new Point2D.Double(x,y);Éú³ÉеÄ×ø±êµã
moveTo·½·¨£ºÍ¨¹ýÒƶ¯µ½Ö¸¶¨µÄ×ø±êÔÚ·¾¶ÖÐÌí¼Óµã
Ö±½ÓÓÃ
lineTo:ͨ¹ý»æÖÆÒ»Ìõ´Óµ±Ç°×ø±êµ½ÐÂÖ¸¶¨×ø±êµÄÖ±ÏßÔÚ·¾¶ÖÐÌí¼Óµã¡£
ÕâÑùÿ¼ÓÒ»¸öµã¡£ÎÒÃǾÍÓÃÉÏÒ»¸öµãµ½Õâ¸öµã»ÌõÖ±Ïß¡£ÕâÑù¾Í³É¹¦µÄ»ºÃÁËÒ»¸öÃæÁË¡£
È»ºó£¬ÎÒÃÇÅжÁµãÊÇ·ñÔÚ¸ÃÃæÖÐ
GeneralPathÀàµÄcontains·½·¨¾Í¿ÉÒÔÁË¡£ÕæµÄ·Ç³£·½±ã
Ïà¹ØÎĵµ£º
Êý×飺±íʾ¶¨ÒåͬÖÖÊý¾ÝÀàÐ͵Ķà¸ö±äÁ¿
1.һάÊý×éµÄ¶¨Òå
Êý×éÔªËصÄÊý×éÀàÐÍ[] Êý×éÃû=new Êý×éÔªËصÄÊý¾ÝÀàÐÍ[Êý×éÔªËصĸöÊý] »ò
Êý×éÔªËصÄÊý¾ÝÀàÐÍ Êý×éÃû[]=new Êý×éÔªË ......
ÓÃjava´´½¨XmlµÄ4´óÀࣺ
Element£º½ÚµãÀà
AttributeÊôÐÔÀà
Document£ºÖ¸µÄ¾ÍÊÇÎĵµÀà
XMLOutput£ºÊä³öÀà
´ËÀàÊÇÓÃjava½¨Á¢Ò»¸öxmlÎļþ
public class TestJdom {
//´´½¨XML£¨Ä£ÐÍ£©dom
public static void main(String[] args) {
  ......
javaÀïÃæɾ³ýÎļþ¼Ðʱºò£¬Èç¹û¸ÃÎļþ¼ÐÏÂÓÐÄÚÈÝ£¬¼´ÆäÏ°üº¬µÄÓÐÎļþ»òÎļþ¼Ð£¬µ±ÄãÖ´ÐÐ
java.io.File.delete(File file)·½·¨Ê±ºò£¬²»Äܳɹ¦É¾³ý£¬ÄÇôÈç¹ûÎÒÃÇÏë³É¹¦É¾³ý£¬¸ÃÔõô°ìµÄ£¬ÄǾÍÒªÏÈɾ³ý¸ÃÎļþ¼ÐÏÂÃæµÄÄÚÈÝ£¬´úÂëÈçÏ£º
/**
* ɾ³ýÎļþ»òÎļþ¼Ð
* @param file
*/
public static void deleteFile ......
·ÏÁË¡£2ÄêûÕý¾ÓùýJavaÁË¡£ÎªÁË°ïÅóÓÑæ±ØÐëÈ«²¿¼ñÆðÀ´¡£BT¼Æ»®±»ÆÈÔÝÍ£¡£
»¹ÊǺÃÄÔ×Ó²»ÈçÀñÊÍ·¡£
¼ÇÏÂÀ´£º
Java»·¾³±äÁ¿ÉèÖãº
http://blog.csdn.net/aneka/archive/2008/09/19/2948209.aspx
ѧϰ Java ¿ª·¢µÄµÚÒ»²½¾ÍÊǹ¹½¨¿ª·¢»·¾³£¬ÏÂÃæÒÔ JDK6.0 ÔÚ Windows XP ÉϵݲװÅäÖÃΪÀýÀ´½²Êö£º
µÚÒ»²½£ºÏÂÔØ JDK
´ ......
JavaÀàÖпÉÒÔ¶¨ÒåÒ»¸östatic¿éÓÃÓÚ¾²Ì¬±äÁ¿µÄ³õʼ»¯£»µ±ÀàµÄ¶¨ÒåÖв»º¬ÓÐstatic¿éʱ£¬±àÒëÆ÷»áΪ¸ÃÀàÌṩһ¸öĬÈϵÄstatic¿é£¬Ç°Ìá
ÊÇ´æÔÚ¾²Ì¬±äÁ¿µÄ³õʼ»¯²Ù×÷£»ÓÉÓÚ¾²Ì¬±äÁ¿ÊÇͨ¹ý¸³Öµ²Ù×÷½øÐгõʼ»¯µÄ£¬Òò´Ë¿ÉÒÔͨ¹ý¾²Ì¬º¯Êý·µ»ØÖµµÄ·½Ê½ÎªÆä³õʼ»¯£»ÀඨÒåÖпÉÒÔ´æÔÚ¶à¸östatic
¿é£¬¶øÇÒÔÚ±àÒëʱ±àÒëÆ÷»á½«¶à¸östatic ......