|
What this is
Other links
The source code// $Id: FigActor.java,v 1.18 2004/08/28 14:56:37 mvw Exp $ // Copyright (c) 1996-2004 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. // File: FigActor.java // Classes: FigActor // Original Author: abonner@ics.uci.edu // $Id: FigActor.java,v 1.18 2004/08/28 14:56:37 mvw Exp $ package org.argouml.uml.diagram.use_case.ui; import java.awt.Color; import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; import java.util.Vector; import org.argouml.uml.diagram.ui.FigNodeModelElement; import org.tigris.gef.base.Selection; import org.tigris.gef.graph.GraphModel; import org.tigris.gef.presentation.FigCircle; import org.tigris.gef.presentation.FigLine; import org.tigris.gef.presentation.FigRect; /** Class to display graphics for a UML MState in a diagram. */ public class FigActor extends FigNodeModelElement { //////////////////////////////////////////////////////////////// // instance variables //These are the positions of child figs inside this fig //They mst be added in the constructor in this order. private static final int HEAD_POSN = 1; private static final int BODY_POSN = 2; private static final int ARMS_POSN = 3; private static final int LEFT_LEG_POSN = 4; private static final int RIGHT_LEG_POSN = 5; private static final int NAME_POSN = 6; //////////////////////////////////////////////////////////////// // constructors /** * Main Constructor for the creation of a new Actor. */ public FigActor() { // Put this rectangle behind the rest, so it goes first FigRect bigPort = new FigRect(10, 30, 15, 60); bigPort.setVisible(false); FigCircle head = new FigCircle(10, 30, 15, 15, Color.black, Color.white); FigLine body = new FigLine(20, 45, 20, 60, Color.black); FigLine arms = new FigLine(10, 50, 30, 50, Color.black); FigLine leftLeg = new FigLine(20, 60, 15, 75, Color.black); FigLine rightLeg = new FigLine(20, 60, 25, 75, Color.black); getNameFig().setBounds(5, 75, 35, 20); getNameFig().setTextFilled(false); getNameFig().setFilled(false); getNameFig().setLineWidth(0); // initialize any other Figs here // add Figs to the FigNode in back-to-front order addFig(bigPort); addFig(head); addFig(body); addFig(arms); addFig(leftLeg); addFig(rightLeg); addFig(getNameFig()); setBigPort(bigPort); } /** * |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.