public void setLineWidth(int w) { _head.setLineWidth(w); _body.setLineWidth(w); _arms.setLineWidth(w); _leftLeg.setLineWidth(w); _rightLeg.setLineWidth(w); }
private void constructFigs() { Color fg = getLineColor(); Color fill = getFillColor(); // Put this rectangle behind the rest, so it goes first FigRect bigPort = new ActorPortFigRect(X0, Y0, 0, 0, this); FigCircle head = new FigCircle(X0 + 2, Y0, 16, 15, fg, fill); FigLine body = new FigLine(X0 + 10, Y0 + 15, 20, 40, fg); FigLine arms = new FigLine(X0, Y0 + 20, 30, 30, fg); FigLine leftLeg = new FigLine(X0 + 10, Y0 + 30, 15, 55, fg); FigLine rightLeg = new FigLine(X0 + 10, Y0 + 30, 25, 55, fg); body.setLineWidth(LINE_WIDTH); arms.setLineWidth(LINE_WIDTH); leftLeg.setLineWidth(LINE_WIDTH); rightLeg.setLineWidth(LINE_WIDTH); getNameFig().setBounds(X0, Y0 + 45, 20, 20); getNameFig().setTextFilled(false); getNameFig().setFilled(false); getNameFig().setLineWidth(0); // initialize any other Figs here getStereotypeFig().setBounds(getBigPort().getCenter().x, getBigPort().getCenter().y, 0, 0); setSuppressCalcBounds(true); // add Figs to the FigNode in back-to-front order addFig(bigPort); addFig(getNameFig()); addFig(head); addFig(body); addFig(arms); addFig(leftLeg); addFig(rightLeg); addFig(getStereotypeFig()); setBigPort(bigPort); setSuppressCalcBounds(false); }
/* * @see org.tigris.gef.presentation.Fig#setLineWidth(int) */ @Override public void setLineWidth(int w) { cover.setLineWidth(w); divider.setLineWidth(w); }