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

📄 polylinelocator.java

📁 JHotDraw学习过程中对数组的测试程序haha 学习过程中对数组的测试程序
💻 JAVA
字号:
/* * @(#)PolyLineLocator.java 5.1 * */package CH.ifa.draw.figures;import java.awt.*;import java.io.IOException;import CH.ifa.draw.framework.*;import CH.ifa.draw.standard.*;import CH.ifa.draw.util.*;/** * A poly line figure consists of a list of points. * It has an optional line decoration at the start and end. * * @see LineDecoration */class PolyLineLocator extends AbstractLocator {    int fIndex;    public PolyLineLocator(int index) {        fIndex = index;    }    public Point locate(Figure owner) {        PolyLineFigure plf = (PolyLineFigure)owner;        // guard against changing PolyLineFigures -> temporary hack        if (fIndex < plf.pointCount())            return ((PolyLineFigure)owner).pointAt(fIndex);        return new Point(0, 0);    }}

⌨️ 快捷键说明

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