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ÀïÃæÉ¾³ýÎļþ¼Ðʱºò£¬Èç¹û¸ÃÎļþ¼ÐÏÂÓÐÄÚÈÝ£¬¼´Æäϰüº¬µÄÓÐÎļþ»òÎļþ¼Ð£¬µ±ÄãÖ´ÐÐ
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
´ ......
import java.sql.*;
public class ConnectAccess {
/**
* ³õѧÕßÇë×¢Ò⣺
* 1:ÏȽ¨Á¢Ò»¸öaccessÎļþa1.mdb,²¢·ÅÔÚD:\ÏÂ;
* 2:ÔÚÊý¾Ý¿âÎļþa1.mdbÖн¨Á¢Ò»¸ö±íTable1£»
* 3£ºÎªTable1Ìí¼ÓÒ»ÁУ¬²¢²åÈëÖÁÉÙÒ»Ìõ¼Ç¼£»
* 4£º±¾ÎÄÊÇÒ»¸öÍêÕûµÄÀֱ࣬½ÓÄÃÈ¥ÔËÐоͿÉÒÔ¡£
*/
public static void main(Stri ......
package com.event;
import java.util.Map;
public interface EventListener {
void onEvent(Map event);
}
package com.socket;
import java.nio.ByteBuffer;
import java.util.HashMap;
import com.event.EventListener;
/*
* Ô¤´¦ÀíÀà
*/
public class BaseObject {
private boole ......