1 18 19 package org.objectweb.jac.ide.diagrams; 20 21 import java.awt.Graphics ; 22 import java.awt.Rectangle ; 23 import java.awt.Color ; 24 25 import CH.ifa.draw.framework.Figure; 26 import CH.ifa.draw.framework.DrawingView; 27 28 import org.objectweb.jac.ide.Package; 29 import org.objectweb.jac.ide.Aspect; 30 31 public class AspectFigure extends ClassFigure { 32 33 public AspectFigure(org.objectweb.jac.ide.ClassFigure figure, Package pack, 34 DrawingView view) { 35 super(figure,pack,view); 36 } 37 38 protected void drawBorder(Graphics g) { 39 40 Rectangle r = displayBox(); 41 42 g.setColor(Color.orange); 43 44 g.fillRect(r.x, r.y, r.width, r.height); 45 46 g.setColor(Color.red); 47 48 g.drawRect(r.x, r.y, r.width, r.height); 49 50 51 Figure f = figureAt(0); 52 Rectangle rf = f.displayBox(); 53 54 g.drawLine(r.x,r.y+rf.height+1,r.x+r.width,r.y+rf.height+1); 55 56 if( fieldFigures.size() > 0 ) { 57 f = (Figure) fieldFigures.get(0); 58 rf = f.displayBox(); 59 g.drawLine(r.x,rf.y,r.x+r.width,rf.y); 60 } 61 62 } 63 64 public Aspect getAspect() { 65 return (Aspect)getSubstance(); 66 } 67 68 } 69 | Popular Tags |