public void setBounds(int x, int y, int w, int h) {
    int middle = w / 2;
    h = _h;
    Rectangle oldBounds = getBounds();
    _bigPort.setLocation(x + middle - _bigPort.getWidth() / 2, y + h - 65);
    _head.setLocation(x + middle - _head.getWidth() / 2, y + h - 65);
    _body.setLocation(x + middle, y + h - 50);
    _arms.setLocation(x + middle - _arms.getWidth() / 2, y + h - 45);
    _leftLeg.setLocation(x + middle - _leftLeg.getWidth(), y + h - 35);
    _rightLeg.setLocation(x + middle, y + h - 35);

    Dimension minTextSize = _name.getMinimumSize();
    _name.setBounds(
        x + middle - minTextSize.width / 2,
        y + h - minTextSize.height,
        minTextSize.width,
        minTextSize.height);

    updateEdges();
    _x = x;
    _y = y;
    _w = w;
    // do not set height
    firePropChange("bounds", oldBounds, getBounds());
  }
Exemple #2
0
 public void setBounds(int x, int y, int w, int h) {
   Rectangle oldBounds = getBounds();
   _bigPort.setBounds(x, y, w, h);
   _cover.setBounds(x, y, w, h);
   Dimension nameDim = _name.getMinimumSize();
   _name.setBounds(
       x + (w - nameDim.width) / 2, y + (h - nameDim.height) / 2, nameDim.width, nameDim.height);
   _x = x;
   _y = y;
   _w = w;
   _h = h;
   firePropChange("bounds", oldBounds, getBounds());
   updateEdges();
 }
 public void setLineWidth(int w) {
   _head.setLineWidth(w);
   _body.setLineWidth(w);
   _arms.setLineWidth(w);
   _leftLeg.setLineWidth(w);
   _rightLeg.setLineWidth(w);
 }
 public void setLineColor(Color col) {
   _head.setLineColor(col);
   _body.setLineColor(col);
   _arms.setLineColor(col);
   _leftLeg.setLineColor(col);
   _rightLeg.setLineColor(col);
 }
Exemple #5
0
 public Color getFillColor() {
   return _cover.getFillColor();
 }
Exemple #6
0
 public void setFillColor(Color col) {
   _cover.setFillColor(col);
 }
Exemple #7
0
 public Color getLineColor() {
   return _cover.getLineColor();
 }
Exemple #8
0
 public void setLineColor(Color col) {
   _cover.setLineColor(col);
 }
 public void setLineWidth(int w) {
   _head.setLineWidth(w);
 }
Exemple #10
0
 public void setLineWidth(int w) {
   _cover.setLineWidth(w);
 }
 public boolean getFilled() {
   return _head.getFilled();
 }
 public void setFilled(boolean f) {
   _head.setFilled(f);
 }
 public Color getFillColor() {
   return _head.getFillColor();
 }
 public void setFillColor(Color col) {
   _head.setFillColor(col);
 }
 public Color getLineColor() {
   return _head.getLineColor();
 }
Exemple #16
0
 public void setFilled(boolean f) {
   _cover.setFilled(f);
 }
Exemple #17
0
 public boolean getFilled() {
   return _cover.getFilled();
 }
 public int getLineWidth() {
   return _head.getLineWidth();
 }
Exemple #19
0
 public int getLineWidth() {
   return _cover.getLineWidth();
 }
 public void setLineColor(Color col) {
   _head.setLineColor(col);
 }