⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jawaamarker.java

📁 网站上使用水晶报表的例子
💻 JAVA
字号:
/*----------------------------------------------------------------------------- JAWAA 2.0 --Copyright information:Susan H. Rodger, Pretesh Patel, Ayonike Akingbade, Diana JacksonComputer Science DepartmentDuke UniversityAugust 2002Supported by National Science Foundation DUE-9752583.Copyright (c) 20012All rights reserved.Redistribution and use in source and binary forms are permittedprovided that the above copyright notice and this paragraph areduplicated in all such forms and that any documentation,advertising materials, and other materials related to suchdistribution and use acknowledge that the software was developedby the author.  The name of the author may not be used toendorse or promote products derived from this software withoutspecific prior written permission.THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS ORIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIEDWARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.---------------------------------------------------------------------------*//*---------------------------------------------------------------------------File:                           nameoffile.javaPackage:                        JAWAA Version 2.0Author:                         Pretesh Patel, Ayonike Akingbade, Diana JacksonDate:                           August 2002Description of Contents:                                        --------------------------------------------------------------------------*/package jawaa.extras.marker;import jawaa.util.*;import java.awt.*;import jawaa.object.*;import jawaa.extras.PositionListener;public class JawaaMarker extends JawaaCircle implements PositionListener{    public JawaaMarker(String[] args)    {	try{	    build(args);	}	catch(Exception e)	{	    System.out.println(toString() +":syntax error");	}    }    public void build(String[] args) throws    ArrayIndexOutOfBoundsException, NumberFormatException, Exception    {	myName = args[1];	myNode = args[2];	myWidth = Integer.parseInt(args[3]);	myHeight = myWidth;	myColor = ColorFactory.getColor(args[4]);	myBackground = ColorFactory.getColor(args[5]);	JawaaHash hash = JawaaHash.getInstance();	try{	    myTarget = (Markable)hash.get(myNode);	    myIndex = myTarget.addMarkerListener(this);	    Point p = myTarget.getMarkerHandle(myIndex);	    setLocation(p.x-myWidth/2, p.y-myHeight/2);	}	catch(ClassCastException e)	{	    ErrorHandler.error(this, "markers can only be used on nodes", false);	}    }    public void pointMoved()    {	myLocation = myTarget.getMarkerHandle(myIndex);	myLocation.x = myLocation.x - myWidth/2;	myLocation.y = myLocation.y - myHeight/2;    }        public void setNode(String n, Markable node)    {	myNode = n;	myIndex = node.addMarkerListener(this);	myTarget = node;    }    public void setNode(Markable node)    {	//name not set	myTarget = node;    }    public Markable getMarkedNode()    {	return myTarget;    }    public int getIndex()    {	return myIndex;    }        protected int myIndex;    protected Markable myTarget;    String myNode;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -