// The UMLet source code is distributed under the terms of the GPL; see license.txt
package com.umlet.element.custom;

import java.awt.*;

import com.umlet.control.*;
import com.umlet.element.base.Entity;

public class SeqDestroyMark extends Entity {
	public void paint(Graphics g) {
		Graphics2D g2=(Graphics2D) g;
		Composite[] composites = colorize(g2); //enable colors
		g2.setColor(_activeColor);
		Constants.getFRC(g2);

		Rectangle r=this.getBounds();
		g2.drawLine(0,0,(int)r.getWidth()-1,(int)r.getHeight()-1);
		g2.drawLine((int)r.getWidth()-1,0,0,(int)r.getHeight()-1);
	}
	
	public StickingPolygon getStickingBorder() {
	    StickingPolygon p = new StickingPolygon();
	    int x,y;
		x=this.getWidth()/2;
		y=this.getHeight()/2;
	    p.addLine(new Point(x-4,y-4), new Point(x+4,y-4),Constants.RESIZE_LEFT | Constants.RESIZE_RIGHT | Constants.RESIZE_TOP | Constants.RESIZE_BOTTOM);
	    p.addLine(new Point(x+4,y-4), new Point(x+4,y+4),Constants.RESIZE_LEFT | Constants.RESIZE_RIGHT | Constants.RESIZE_TOP | Constants.RESIZE_BOTTOM);
	    p.addLine(new Point(x+4,y+4), new Point(x-4,y+4),Constants.RESIZE_LEFT | Constants.RESIZE_RIGHT | Constants.RESIZE_TOP | Constants.RESIZE_BOTTOM);
	    p.addLine(new Point(x-4,y+4), new Point(x-4,y-4),Constants.RESIZE_LEFT | Constants.RESIZE_RIGHT | Constants.RESIZE_TOP | Constants.RESIZE_BOTTOM);
	    return p;
	  }
	
	public int getPossibleResizeDirections() {return 0;} //deny size changes
}
