Пример #1
0
  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());
  }
Пример #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();
 }
Пример #3
0
 public void setLineWidth(int w) {
   _head.setLineWidth(w);
   _body.setLineWidth(w);
   _arms.setLineWidth(w);
   _leftLeg.setLineWidth(w);
   _rightLeg.setLineWidth(w);
 }
Пример #4
0
 public void setLineColor(Color col) {
   _head.setLineColor(col);
   _body.setLineColor(col);
   _arms.setLineColor(col);
   _leftLeg.setLineColor(col);
   _rightLeg.setLineColor(col);
 }
Пример #5
0
 public Color getFillColor() {
   return _cover.getFillColor();
 }
Пример #6
0
 public void setFillColor(Color col) {
   _cover.setFillColor(col);
 }
Пример #7
0
 public Color getLineColor() {
   return _cover.getLineColor();
 }
Пример #8
0
 public void setLineColor(Color col) {
   _cover.setLineColor(col);
 }
 public void setLineWidth(int w) {
   _head.setLineWidth(w);
 }
Пример #10
0
 public void setLineWidth(int w) {
   _cover.setLineWidth(w);
 }
Пример #11
0
 public boolean getFilled() {
   return _head.getFilled();
 }
Пример #12
0
 public void setFilled(boolean f) {
   _head.setFilled(f);
 }
Пример #13
0
 public Color getFillColor() {
   return _head.getFillColor();
 }
Пример #14
0
 public void setFillColor(Color col) {
   _head.setFillColor(col);
 }
Пример #15
0
 public Color getLineColor() {
   return _head.getLineColor();
 }
Пример #16
0
 public void setFilled(boolean f) {
   _cover.setFilled(f);
 }
Пример #17
0
 public boolean getFilled() {
   return _cover.getFilled();
 }
Пример #18
0
 public int getLineWidth() {
   return _head.getLineWidth();
 }
Пример #19
0
 public int getLineWidth() {
   return _cover.getLineWidth();
 }
 public void setLineColor(Color col) {
   _head.setLineColor(col);
 }