示例#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);
 }