001/* 002 * Copyright 2010-2015 Institut Pasteur. 003 * 004 * This file is part of Icy. 005 * 006 * Icy is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Icy is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Icy. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package icy.roi; 020 021import icy.painter.Anchor2D; 022 023import java.awt.Color; 024import java.awt.Polygon; 025import java.awt.geom.Point2D; 026import java.util.List; 027 028/** 029 * @deprecated Use {@link plugins.kernel.roi.roi2d.ROI2DPolyLine} instead. 030 */ 031@Deprecated 032public class ROI2DPolyLine extends plugins.kernel.roi.roi2d.ROI2DPolyLine 033{ 034 /** 035 * @deprecated Use {@link plugins.kernel.roi.roi2d.ROI2DPolyLine.ROI2DPolyLineAnchor2D} instead. 036 */ 037 @Deprecated 038 protected class ROI2DPolyLineAnchor2D extends plugins.kernel.roi.roi2d.ROI2DPolyLine.ROI2DPolyLineAnchor2D 039 { 040 public ROI2DPolyLineAnchor2D(Point2D position, Color color, Color selectedColor) 041 { 042 super(position, color, selectedColor); 043 } 044 } 045 046 /** 047 * @deprecated 048 */ 049 @Deprecated 050 public ROI2DPolyLine(Point2D pt, boolean cm) 051 { 052 super(pt); 053 } 054 055 /** 056 * 057 */ 058 public ROI2DPolyLine(Point2D pt) 059 { 060 super(pt); 061 } 062 063 public ROI2DPolyLine(Polygon polygon) 064 { 065 super(new Point2D.Double()); 066 067 setPolygon(polygon); 068 } 069 070 public ROI2DPolyLine(List<Point2D> points) 071 { 072 super(points); 073 } 074 075 public ROI2DPolyLine() 076 { 077 super(); 078 } 079 080 @Override 081 protected Anchor2D createAnchor(Point2D pos) 082 { 083 return new ROI2DPolyLineAnchor2D(pos, getColor(), getFocusedColor()); 084 } 085}