/** * Sets whether this panel always shows its scroll bars, or only when * necessary. * * @param alwaysShow <code>true</code> to show scroll bars at all times */ public void setAlwaysShowScrollBars(boolean alwaysShow) { getScrollableElement().getStyle().setOverflow(alwaysShow ? Overflow.SCROLL : Overflow.AUTO); }
@Override public StylesBuilder overflow(Overflow value) { delegate.assertCanAddStyleProperty().setOverflow(value); return this; }
public void execute() { outerElem.getStyle().setOverflow(Overflow.AUTO); } });
dialogContents.getElement().getStyle().setOverflow(Overflow.AUTO); setWidget(dialogContents); endpointProfileRecordPanel.setHeight("320px"); endpointProfileRecordPanel.getElement().getStyle().setPropertyPx("maxHeight", 320); endpointProfileRecordPanel.getElement().getStyle().setOverflow(Overflow.AUTO); serverProfileRecordPanel.setHeight("320px"); serverProfileRecordPanel.getElement().getStyle().setPropertyPx("maxHeight", 320); serverProfileRecordPanel.getElement().getStyle().setOverflow(Overflow.AUTO);
@Override protected void onUpdate(double progress) { if (opening) { double curHeight = progress * height; animFrame.getStyle().setHeight(curHeight, Unit.PX); } else { double curHeight = (1.0 - progress) * height; animFrame.getStyle().setHeight(curHeight, Unit.PX); } // Remind IE6 that we want the overflow to be hidden. animFrame.getStyle().setOverflow(Overflow.HIDDEN); animFrame.getStyle().setPosition(Position.RELATIVE); }
/** * Ensure that the animation frame exists and return it. * * @return the animation frame */ Element ensureAnimationFrame() { if (animationFrame == null) { animationFrame = Document.get().createDivElement(); animationFrame.getStyle().setOverflow(Overflow.HIDDEN); animationFrame.getStyle().setDisplay(Display.NONE); getElement().appendChild(animationFrame); } return animationFrame; }
public Element attachChild(Element parent, Element child, Element before) { DivElement container = Document.get().createDivElement(); container.appendChild(child); container.getStyle().setPosition(Position.ABSOLUTE); container.getStyle().setOverflow(Overflow.HIDDEN); fillParent(child); Element beforeContainer = null; if (before != null) { beforeContainer = before.getParentElement(); assert beforeContainer.getParentElement() == parent : "Element to insert before must be a sibling"; } parent.insertBefore(container, beforeContainer); return container; }
@Override public void setContentScrollType(final ScrollType type) { final Style style = sessionContainer.getElement().getStyle(); switch (type) { case AUTO: style.setOverflow(Style.Overflow.AUTO); break; case CUSTOM: style.setOverflow(Style.Overflow.HIDDEN); } }
public HeaderPanel() { // Create the outer element Element elem = Document.get().createDivElement().cast(); elem.getStyle().setPosition(Position.RELATIVE); elem.getStyle().setOverflow(Overflow.HIDDEN); setElement(elem); // Create a delegate to handle resize from the header and footer. ResizeLayoutPanel.Impl.Delegate resizeDelegate = new ResizeLayoutPanel.Impl.Delegate() { public void onResize() { scheduledLayout(); } }; // Create the header container. headerContainer = createContainer(); headerContainer.getStyle().setTop(0.0, Unit.PX); headerImpl.init(headerContainer, resizeDelegate); elem.appendChild(headerContainer); // Create the footer container. footerContainer = createContainer(); footerContainer.getStyle().setBottom(0.0, Unit.PX); footerImpl.init(footerContainer, resizeDelegate); elem.appendChild(footerContainer); // Create the content container. contentContainer = createContainer(); contentContainer.getStyle().setOverflow(Overflow.HIDDEN); contentContainer.getStyle().setTop(0.0, Unit.PX); contentContainer.getStyle().setHeight(0.0, Unit.PX); elem.appendChild(contentContainer); }
scrollable.getStyle().setOverflow(Overflow.SCROLL); scrollable.appendChild(containerElem); scrollableLayer = layout.attachChild(scrollable); getElement().getStyle().setOverflow(Overflow.HIDDEN);
/** * Sets whether this panel always shows its scroll bars, or only when * necessary. * * @param alwaysShow <code>true</code> to show scroll bars at all times */ public void setAlwaysShowScrollBars(boolean alwaysShow) { getScrollableElement().getStyle().setOverflow(alwaysShow ? Overflow.SCROLL : Overflow.AUTO); }
this.pageSize = builder.pageSize; initWidget(new SplitLayoutPanel()); getElement().getStyle().setOverflow(Overflow.AUTO); setStyleName(this.style.cellBrowserWidget());
@Override protected void onStart() { content.getElement().getStyle().setOverflow(Overflow.HIDDEN); super.onStart(); }
private void initializeContainerWidget() { this.setStylePrimaryName("leaflet-control-search"); // this.addStyleName("leaflet-bar"); this.addStyleName("leaflet-control"); this.getElement().getStyle().setOverflow(Overflow.VISIBLE); // this.setWidth("100%"); // this.setHeight("100%"); }
tableHeaderScroller.getStyle().setOverflow(Overflow.HIDDEN); tableFooterScroller.getStyle().setOverflow(Overflow.HIDDEN);
@Override protected void onComplete() { super.onComplete(); content.setVisible(isExpanding); content.getElement().getStyle().setOverflow(Overflow.VISIBLE); content.setHeight("100%"); } }
/** * Recalculate the height and width of a native scrollbar. */ private static void maybeRecalculateNativeScrollbarSize() { // Check if the size has already been calculated. if (nativeHeight > -1) { return; } // Create a scrollable element and attach it to the body. Element scrollable = Document.get().createDivElement(); scrollable.getStyle().setPosition(Position.ABSOLUTE); scrollable.getStyle().setTop(-1000.0, Unit.PX); scrollable.getStyle().setLeft(-1000.0, Unit.PX); scrollable.getStyle().setHeight(100.0, Unit.PX); scrollable.getStyle().setWidth(100.0, Unit.PX); scrollable.getStyle().setOverflow(Overflow.SCROLL); scrollable.getStyle().setProperty("direction", "rtl"); Document.get().getBody().appendChild(scrollable); // Add some content. Element content = Document.get().createDivElement(); content.setInnerText("content"); scrollable.appendChild(content); // Measure the height and width. nativeHeight = scrollable.getOffsetHeight() - scrollable.getClientHeight(); nativeWidth = scrollable.getOffsetWidth() - scrollable.getClientWidth(); nativeRtl = (content.getAbsoluteLeft() > scrollable.getAbsoluteLeft()); // Detach the scrollable element. scrollable.removeFromParent(); }
expandable.getStyle().setHeight(100.0, Unit.PCT); expandable.getStyle().setWidth(100.0, Unit.PCT); expandable.getStyle().setOverflow(Overflow.SCROLL); expandable.getStyle().setZIndex(-1); elem.appendChild(expandable); collapsible.getStyle().setHeight(100.0, Unit.PCT); collapsible.getStyle().setWidth(100.0, Unit.PCT); collapsible.getStyle().setOverflow(Overflow.SCROLL); collapsible.getStyle().setZIndex(-1); elem.appendChild(collapsible);
@Test public void testSetContentScrollTypeCustom() { tested.setContentScrollType(SessionPresenter.View.ScrollType.CUSTOM); verify(sessionContainerElementStyle).setOverflow(Style.Overflow.HIDDEN); }
private Widget buildTitle( final String title, final IsWidget titleDecoration ) { final SpanElement spanElement = Document.get().createSpanElement(); spanElement.getStyle().setWhiteSpace( Style.WhiteSpace.NOWRAP ); spanElement.getStyle().setOverflow( Style.Overflow.HIDDEN ); spanElement.getStyle().setTextOverflow( Style.TextOverflow.ELLIPSIS ); spanElement.getStyle().setDisplay( BLOCK ); final String titleWidget = (titleDecoration instanceof Image) ? titleDecoration.toString() : ""; spanElement.setInnerHTML(titleWidget + " " + title.replaceAll( " ", "\u00a0" ) ); return new DragArea() {{ add( spanElement ); }}; }