static final int MOUSEINSIDE = 0x00000001;
static final int VISIBLE = 0x00000002;
static final int PACKED = 0x00000004;
static final int MOUSEINSIDE = 0x00000001;
static final int VISIBLE = 0x00000002;
static final int PACKED = 0x00000004;
- private int contentwidth = 0; // == max(minwidth, textwidth, sum(child.contentwidth))
- private int contentheight = 0;
+ public int contentwidth = 0; // == max(minwidth, textwidth, sum(child.contentwidth))
+ public int contentheight = 0;
// Reflow ////////////////////////////////////////////////////////////////////////////////////////
/** should only be invoked on the root box */
// Reflow ////////////////////////////////////////////////////////////////////////////////////////
/** should only be invoked on the root box */
- public void reflow() { pack(); resize(x, y, maxwidth, maxheight); place(); }
-
+ public void reflow() {
+ pack();
+ resize(x, y,
+ test(HSHRINK) ? contentwidth : maxwidth,
+ test(VSHRINK) ? contentheight : maxheight);
+ place();
+ }
+
private static Box[] frontier = new Box[65535];
/** pack the boxes into rows and columns, compute contentwidth */
public void pack() {
private static Box[] frontier = new Box[65535];
/** pack the boxes into rows and columns, compute contentwidth */
public void pack() {
void set(int mask) { flags |= mask; }
void set(int mask, boolean setclear) { if (setclear) set(mask); else clear(mask); }
void clear(int mask) { flags &= ~mask; }
void set(int mask) { flags |= mask; }
void set(int mask, boolean setclear) { if (setclear) set(mask); else clear(mask); }
void clear(int mask) { flags &= ~mask; }