List of usage examples for com.google.gwt.user.client.ui HorizontalSplitPanel getLeftWidget
public Widget getLeftWidget()
From source file:org.pentaho.gwt.widgets.client.splitpanel.SplitPanelUtil.java
License:Open Source License
public static void setHorizontalSplitPanelScrolling(HorizontalSplitPanel hsplit, boolean enableLeft, boolean enableRight) { Element splitElement = hsplit.getElement(); Element leftElement = hsplit.getLeftWidget().getElement(); while (leftElement != splitElement && leftElement != null) { leftElement = leftElement.getParentElement(); DOM.setStyleAttribute((com.google.gwt.user.client.Element) leftElement, "overflowX", //$NON-NLS-1$ enableLeft ? "auto" : "hidden"); //$NON-NLS-1$ //$NON-NLS-2$ DOM.setStyleAttribute((com.google.gwt.user.client.Element) leftElement, "overflowY", //$NON-NLS-1$ enableLeft ? "auto" : "hidden"); //$NON-NLS-1$ //$NON-NLS-2$ }/* w ww.j a v a2 s . c o m*/ Element rightElement = hsplit.getRightWidget().getElement(); while (rightElement != splitElement && rightElement != null) { rightElement = rightElement.getParentElement(); DOM.setStyleAttribute((com.google.gwt.user.client.Element) rightElement, "overflowX", //$NON-NLS-1$ enableRight ? "auto" : "hidden"); //$NON-NLS-1$ //$NON-NLS-2$ DOM.setStyleAttribute((com.google.gwt.user.client.Element) rightElement, "overflowY", //$NON-NLS-1$ enableRight ? "auto" : "hidden"); //$NON-NLS-1$ //$NON-NLS-2$ } }
From source file:org.pentaho.gwt.widgets.client.utils.ElementUtils.java
License:Open Source License
public static void removeScrollingFromSplitPane(Widget panel) { if (!panel.isAttached()) { // throw new IllegalStateException("Operation not allowed while element not on DOM"); }/*from w w w . ja v a 2 s .c om*/ if ((panel instanceof HorizontalSplitPanel || panel instanceof VerticalSplitPanel) == false) { throw new IllegalArgumentException("Widget not expected SplitPane type"); //$NON-NLS-1$ } if (panel instanceof HorizontalSplitPanel) { HorizontalSplitPanel hp = (HorizontalSplitPanel) panel; removeScrollingFromUpTo(hp.getLeftWidget().getElement(), hp.getElement()); removeScrollingFromUpTo(hp.getRightWidget().getElement(), hp.getElement()); } else { VerticalSplitPanel vp = (VerticalSplitPanel) panel; removeScrollingFromUpTo(vp.getTopWidget().getElement(), vp.getElement()); removeScrollingFromUpTo(vp.getBottomWidget().getElement(), vp.getElement()); } }