コード例 #1
0
 public Widget setMarginLeft(int marginLeft) {
   if (this.marginLeft != marginLeft) {
     this.marginLeft = marginLeft;
     updateSize();
   }
   return this;
 }
コード例 #2
0
 public Widget setMarginBottom(int marginBottom) {
   if (this.marginBottom != marginBottom) {
     this.marginBottom = marginBottom;
     updateSize();
   }
   return this;
 }
コード例 #3
0
 public Widget setMarginRight(int marginRight) {
   if (this.marginRight != marginRight) {
     this.marginRight = marginRight;
     updateSize();
   }
   return this;
 }
コード例 #4
0
 public Widget setMarginTop(int marginTop) {
   if (this.marginTop != marginTop) {
     this.marginTop = marginTop;
     updateSize();
   }
   return this;
 }
コード例 #5
0
 public Widget setFixed(boolean fixed) {
   if (this.fixed != fixed) {
     this.fixed = fixed;
     updateSize();
   }
   return this;
 }
コード例 #6
0
 public Widget setMaxHeight(int max) {
   max = max <= 0 ? 240 : max;
   if (maxHeight != max) {
     maxHeight = max;
     updateSize();
     setHeight((int) getHeight()); // Enforce our new size if needed
   }
   return this;
 }
コード例 #7
0
 public Widget setMinHeight(int min) {
   min = Math.max(min, 0);
   if (minHeight != min) {
     minHeight = min;
     updateSize();
     setHeight((int) getHeight()); // Enforce our new size if needed
   }
   return this;
 }
コード例 #8
0
 public Widget setMaxWidth(int max) {
   max = max <= 0 ? 427 : max;
   if (maxWidth != max) {
     maxWidth = max;
     updateSize();
     setWidth((int) getWidth()); // Enforce our new size if needed
   }
   return this;
 }
コード例 #9
0
 public Widget setMinWidth(int min) {
   min = Math.max(min, 0);
   if (minWidth != min) {
     minWidth = min;
     updateSize();
     setWidth((int) getWidth()); // Enforce our new size if needed
   }
   return this;
 }
コード例 #10
0
 public Widget setMargin(int marginTop, int marginRight, int marginBottom, int marginLeft) {
   if (this.marginTop != marginTop
       || this.marginRight != marginRight
       || this.marginBottom != marginBottom
       || this.marginLeft != marginLeft) {
     this.marginTop = marginTop;
     this.marginRight = marginRight;
     this.marginBottom = marginBottom;
     this.marginLeft = marginLeft;
     updateSize();
   }
   return this;
 }