public void setBounds(int x, int y, int w, int h) { if (_name == null) return; Rectangle oldBounds = getBounds(); _bigPort.setBounds(x, y, w, h); _cover.setBounds(x, y, w, h); Dimension stereoDim = _stereo.getMinimumSize(); Dimension nameDim = _name.getMinimumSize(); if (h < 50) { _upperRect.setBounds(x - 10, y + h / 6, 20, 10); _lowerRect.setBounds(x - 10, y + 3 * h / 6, 20, 10); } else { _upperRect.setBounds(x - 10, y + 13, 20, 10); _lowerRect.setBounds(x - 10, y + 39, 20, 10); } _stereo.setBounds(x + 1, y + 1, w - 2, stereoDim.height); _name.setBounds(x + 1, y + stereoDim.height - OVERLAP + 1, w - 2, nameDim.height); _x = x; _y = y; _w = w; _h = h; firePropChange("bounds", oldBounds, getBounds()); updateEdges(); }
public void setLineColor(Color c) { // super.setLineColor(c); _cover.setLineColor(c); _stereo.setFilled(false); _stereo.setLineWidth(0); _name.setFilled(false); _name.setLineWidth(0); _upperRect.setLineColor(c); _lowerRect.setLineColor(c); }
/* Override setBounds to keep shapes looking right */ public void setBounds(int x, int y, int w, int h) { Rectangle oldBounds = getBounds(); if (w > h) h = 9; else w = 9; _bigPort.setBounds(x, y, w, h); _head.setBounds(x, y, w, h); calcBounds(); // _x = x; _y = y; _w = w; _h = h; updateEdges(); firePropChange("bounds", oldBounds, getBounds()); }
public int getLineWidth() { return _head.getLineWidth(); }
public void setLineWidth(int w) { _head.setLineWidth(w); }
public Color getFillColor() { return _head.getFillColor(); }
public void setFillColor(Color col) { _head.setFillColor(col); }
public Color getLineColor() { return _head.getLineColor(); }
public void setLineColor(Color col) { _head.setLineColor(col); }