/** * Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. */ public synchronized void invalidateLayout(Container c) { if (isResetWhenInvalidate() || componentCountChanged(c)) { layoutReset(); } }
boolean reset = false; if (layoutManager instanceof JideBoxLayout) { reset = ((JideBoxLayout) layoutManager).isResetWhenInvalidate(); ((JideBoxLayout) layoutManager).setResetWhenInvalidate(true);
/** * Lays out the <code>JideSplitPane</code> layout based on the preferred size children components, or based on the * proportions if proportional layout is on. This will likely result in changing the divider location. */ public void resetToPreferredSizes() { if (getLayout() instanceof JideBoxLayout) { boolean old = ((JideBoxLayout) getLayout()).isResetWhenInvalidate(); try { ((JideBoxLayout) getLayout()).setResetWhenInvalidate(true); ((JideBoxLayout) getLayout()).invalidateLayout(this); } finally { ((JideBoxLayout) getLayout()).setResetWhenInvalidate(old); } } doLayout(); }