95 int x, int y, boolean xSet, boolean ySet,
96 int w, int h, int cw, int ch,
97 float xGravity, float yGravity) {
98 int width;
99 int height;
100
101 if (w > 0) {
102 //window width surpass window content width (cw)
103 width = w;
104 } else if (cw > 0) {
105 //content width changed
106 width = cw;
107 } else {
108 //no explicit request to change width, get default
109 width = getWidth();
110 }
111
112 if (h > 0) {
113 //window height surpass window content height(ch)
114 height = h;
115 } else if (cw > 0) {
116 //content height changed
117 height = ch;
118 } else {
119 //no explicit request to change height, get default
120 height = getHeight();
121 }
122 if (!xSet) {
123 x = getX();
124 }
125 if (!ySet) {
126 y = getY();
127 }
128 if (maxW >= 0) {
129 width = Math.min(width, maxW);
130 }
131 if (maxH >= 0) {
132 height = Math.min(height, maxH);
133 }
134 width = Math.max(width, minW);
135 height = Math.max(height, minH);
|
95 int x, int y, boolean xSet, boolean ySet,
96 int w, int h, int cw, int ch,
97 float xGravity, float yGravity) {
98 int width;
99 int height;
100
101 if (w > 0) {
102 //window width surpass window content width (cw)
103 width = w;
104 } else if (cw > 0) {
105 //content width changed
106 width = cw;
107 } else {
108 //no explicit request to change width, get default
109 width = getWidth();
110 }
111
112 if (h > 0) {
113 //window height surpass window content height(ch)
114 height = h;
115 } else if (ch > 0) {
116 //content height changed
117 height = ch;
118 } else {
119 //no explicit request to change height, get default
120 height = getHeight();
121 }
122 if (!xSet) {
123 x = getX();
124 }
125 if (!ySet) {
126 y = getY();
127 }
128 if (maxW >= 0) {
129 width = Math.min(width, maxW);
130 }
131 if (maxH >= 0) {
132 height = Math.min(height, maxH);
133 }
134 width = Math.max(width, minW);
135 height = Math.max(height, minH);
|