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

📄 tileset.java

📁 html解析包 可以很方便的解析html 纯java 实现
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
////        for (e = v.elements (); !ret && e.hasMoreElements (); )//            ret = r.intersects ((Rectangle)e.nextElement ());////        return (ret);//    }////    void paintwait ()//    {//        java.awt.Graphics g = getGraphics ();//        if (null != g)//            paint (g);//        Thread.yield ();//        try//        {//            Thread.sleep (1000);//        }//        catch (Exception exception)//        {//        }//    }////    void add ()//    {//        if (null != last)//        {//            Picture m = new Picture (last);//            try//            {//                m.setURL (new URL ("http://localhost/image#" + mCounter++));//            }//            catch (java.net.MalformedURLException murle)//            {//                murle.printStackTrace ();//            }//            this.add (m);//            repaint ();//        }//    }////    ////    // WindowListener interface//    ////    public void windowOpened (java.awt.event.WindowEvent e) {}//    public void windowClosing (java.awt.event.WindowEvent e)//    {//        System.exit (0);//    }//    public void windowClosed (java.awt.event.WindowEvent e) {}//    public void windowIconified (java.awt.event.WindowEvent e) {}//    public void windowDeiconified (java.awt.event.WindowEvent e) {}//    public void windowActivated (java.awt.event.WindowEvent e) {}//    public void windowDeactivated (java.awt.event.WindowEvent e) {}////    ////  // ActionListener interface//  ////  public void actionPerformed (java.awt.event.ActionEvent event)//  {//      Object object = event.getSource();//        if (object == repeat)//            add ();//        else if (object == clear)//        {//            mRegions = new Vector ();//            repaint ();//        }//    }////    ////    // MouseListener Interface//    //////    public void mouseClicked (java.awt.event.MouseEvent event)//    {//        if (mVerbose)//            System.out.println ("DrawTarget.mouseClicked " + event);//    }////  public void mouseReleased (java.awt.event.MouseEvent event)//    {//        if (mVerbose)//            System.out.println ("DrawTarget.mouseReleased " + event);//        if (null != origin)//        {//            last = new Rectangle (//                Math.min (origin.x, event.getX ()),//                Math.min (origin.y, event.getY ()),//                Math.abs (event.getX () - origin.x),//                Math.abs (event.getY () - origin.y));//            add ();//            origin = null;//        }//    }////  public void mouseEntered (java.awt.event.MouseEvent event)//    {//        if (mVerbose)//            System.out.println ("DrawTarget.mouseEntered " + event);//    }////  public void mouseExited (java.awt.event.MouseEvent event)//    {//        if (mVerbose)//            System.out.println ("DrawTarget.mouseExited " + event);//    }////    public void mousePressed (java.awt.event.MouseEvent event)//    {//        if (mVerbose)//            System.out.println ("DrawTarget.mousePressed " + event);//        if (event.isMetaDown ())//        {//            status.setText (getDetails (event.getX (), event.getY ()));//        }//        else//            origin = new java.awt.Point (event.getX (), event.getY ());//    }////    public void update (java.awt.Graphics graphics)//    {//        paint (graphics);//    }////    static final java.awt.Color[] mColours =//    {//        java.awt.Color.blue,//        java.awt.Color.cyan,//        java.awt.Color.gray,//        java.awt.Color.green,//        java.awt.Color.orange,//        java.awt.Color.pink,//        java.awt.Color.red,//        java.awt.Color.yellow,//        java.awt.Color.lightGray,//        java.awt.Color.darkGray,//    };////    public void paint (java.awt.Graphics graphics)//    {//        java.awt.Dimension size = getSize ();//        graphics.setColor (getBackground ());//        graphics.fillRect (0, 0, size.width + 1, size.height + 1);////        if (0 == mRegions.size ())//        {//            graphics.setColor (getForeground ());//            graphics.drawString (//                "Click and drag to create a picture.", 10, 20);//            graphics.drawString (//                "Right click a picture for details.", 10, 40);//        }//        else//        {//            Enumeration e = getPictures ();//            while (e.hasMoreElements ())//            {//                Picture m = (Picture)e.nextElement ();//                String url = m.getURL ().toExternalForm ();//                int n = url.indexOf ('#');//                n = Integer.parseInt (url.substring (n + 1))//                java.awt.Color colour = mColours[n % mColours.length];//                graphics.setColor (colour);//                graphics.fillRect (m.x, m.y, m.width + 1, m.height + 1);//                graphics.setColor (java.awt.Color.black);//                graphics.drawRect (m.x, m.y, m.width, m.height);//            }//            checkOverlap (graphics);//        }//    }////    void checkOverlap (java.awt.Graphics graphics)//    {//        Picture m;//        Picture _m;//        Rectangle r;////        graphics.setColor (java.awt.Color.magenta);//        for (int i = 0; i < mRegions.size (); i++)//        {//            m = (Picture)mRegions.elementAt (i);//            for (int j = i + 1; j < mRegions.size (); j++)//            {//                _m = (Picture)mRegions.elementAt (j);//                if (m.intersects (_m))//                {//                    r = m.intersection (_m);//                    System.out.println (//                        "overlap ("//                        + r.x//                        + ","//                        + r.y//                        + ") ("//                        + (r.x + r.width)//                        + ","//                        + (r.y + r.height)//                        + ")");//                    graphics.fillRect (r.x, r.y, r.width + 1, r.height + 1);//                }//            }//        }//    }////    String getDetails (int x, int y)//    {//        Picture m;//        String ret;////        ret = null;////        // find the Picture//        for (int i = 0; (null == ret) && (i < mRegions.size ()); i++)//        {//            m = (Picture)mRegions.elementAt (i);//            if (m.contains (x, y))//                ret = m.toString ();//        }//        if (null == ret)//            ret = "";////        return (ret);//    }////    public static void main (String[] args)//    {//        java.awt.Frame frame;////        frame = new java.awt.Frame ();//        frame.setSize (400,400);//      menuMain = new java.awt.MenuBar();//      Options = new java.awt.Menu ("Options");//        repeat = new java.awt.MenuItem("Repeat");//      Options.add (repeat);//      clear = new java.awt.MenuItem("Clear");//      Options.add (clear);////      menuMain.add (Options);//      frame.setMenuBar (menuMain);////        java.awt.Insets insets = frame.getInsets ();////        TileSet buffy = new TileSet ();//        buffy.setLocation (insets.left + 10, insets.top + 10);//        buffy.setBackground (java.awt.Color.lightGray.brighter ());//        buffy.setVisible (true);////        frame.add (buffy, "Center");//        status = new java.awt.TextField ();//        frame.add (status, "South");////        frame.addWindowListener (buffy);//        buffy.addMouseListener (buffy);//      repeat.addActionListener (buffy);//      clear.addActionListener (buffy);////        frame.setVisible (true);////    }}/* * Revision Control Modification History * * $Log: TileSet.java,v $ * Revision 1.2  2004/07/31 16:42:30  derrickoswald * Remove unused variables and other fixes exposed by turning on compiler warnings. * * Revision 1.1  2003/09/21 18:20:56  derrickoswald * Thumbelina * Created a lexer GUI application to extract images behind thumbnails. * Added a task in the ant build script - thumbelina - to create the jar file. * You need JDK 1.4.x to build it.  It can be run on JDK 1.3.x in crippled mode. * Usage: java -Xmx256M thumbelina.jar [URL] * * */

⌨️ 快捷键说明

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