com.google.gwt.dom.client.Style.Overflow Java Examples
The following examples show how to use
com.google.gwt.dom.client.Style.Overflow.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TeachingRequestDetailPage.java From unitime with Apache License 2.0 | 6 votes |
public void showRequestDetail(Long id) { iAssignmentTable.clearTable(1); LoadingWidget.getInstance().show(MESSAGES.waitLoadTeachingRequestDetail()); ToolBox.setMaxHeight(iScroll.getElement().getStyle(), Math.round(0.9 * Window.getClientHeight()) + "px"); RPC.execute(new TeachingRequestDetailRequest(id), new AsyncCallback<TeachingRequestInfo>() { @Override public void onFailure(Throwable caught) { LoadingWidget.getInstance().hide(); UniTimeNotifications.error(MESSAGES.failedToLoadTeachingRequestDetail(caught.getMessage()), caught); ToolBox.checkAccess(caught); } @Override public void onSuccess(TeachingRequestInfo result) { LoadingWidget.getInstance().hide(); populate(result, null, null); GwtHint.hideHint(); center(); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); } }); }
Example #2
Source File: TeachingRequestDetailPage.java From unitime with Apache License 2.0 | 6 votes |
public void showInstructorDetail(Long id) { iAssignmentTable.clearTable(1); LoadingWidget.getInstance().show(MESSAGES.waitLoadTeachingRequestDetail()); ToolBox.setMaxHeight(iScroll.getElement().getStyle(), Math.round(0.9 * Window.getClientHeight()) + "px"); RPC.execute(new TeachingAssignmentsDetailRequest(id), new AsyncCallback<InstructorInfo>() { @Override public void onFailure(Throwable caught) { LoadingWidget.getInstance().hide(); UniTimeNotifications.error(MESSAGES.failedToLoadTeachingRequestDetail(caught.getMessage()), caught); ToolBox.checkAccess(caught); } @Override public void onSuccess(InstructorInfo result) { LoadingWidget.getInstance().hide(); populate(null, null, result); GwtHint.hideHint(); center(); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); } }); }
Example #3
Source File: ApproveDialog.java From unitime with Apache License 2.0 | 6 votes |
public void show(List<EventMeetingRow> meetings, ApproveEventRpcRequest.Operation operation) { iTable.setValue(meetings); switch (operation) { case APPROVE: setText(MESSAGES.dialogApprove()); break; case REJECT: setText(MESSAGES.dialogReject()); break; case INQUIRE: setText(MESSAGES.dialogInquire()); break; case CANCEL: setText(MESSAGES.dialogCancel()); break; } iFooter.setEnabled("approve", operation == ApproveEventRpcRequest.Operation.APPROVE); iFooter.setEnabled("reject", operation == ApproveEventRpcRequest.Operation.REJECT); iFooter.setEnabled("inquire", operation == ApproveEventRpcRequest.Operation.INQUIRE); iFooter.setEnabled("cancel", operation == ApproveEventRpcRequest.Operation.CANCEL); iFileUpload.check(); center(); if (iStandardNotes.getItemCount() == 0) iNotes.setFocus(true); else iStandardNotes.setFocus(true); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); }
Example #4
Source File: AddMeetingsDialog.java From unitime with Apache License 2.0 | 6 votes |
public void showDialog(Long eventId, List<MeetingConflictInterface> conflicts) { iStep = Math.max(1, (Window.getClientWidth() - 100) / 105); ToolBox.setMaxHeight(iScrollRooms.getElement().getStyle(), (Window.getClientHeight() - 100) + "px"); ToolBox.setMaxHeight(iScrollDates.getElement().getStyle(), (Window.getClientHeight() - 100) + "px"); int nrMonths = Math.max(1, Math.min(5, (Window.getClientWidth() - 100) / 225)); iDates.setWidth((225 * nrMonths) + "px"); iConflicts = conflicts; iResponse = null; iEventId = eventId; setWidget(iDatesForm); center(); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); iDates.setFocus(true); }
Example #5
Source File: DatasetWidget.java From EasyML with Apache License 2.0 | 6 votes |
public DatasetWidget(Dataset dataset, String widget_uuid) { super(dataset.getName(), widget_uuid); outNodeShapes.add(new OutNodeShape(this, 0)); label.setText(""); nameLabel.setText(dataset.getName()); label.setStyleName("filebackground"); label.setPixelSize(30, 42); nameLabel.setWidth("100%"); abspanel.add(nameLabel, 30, 0); abspanel.getElement().getStyle().setOverflow(Overflow.VISIBLE); canvas.setPixelWidth(30); canvas.setPixelHeight(45); canvas.setCoordSize(30, 45); this.dataset = dataset; ptable = new DatasetPropertyTable(dataset); }
Example #6
Source File: PasteBufferImpl.java From incubator-retired-wave with Apache License 2.0 | 6 votes |
/** * Sets up the PasteBuffer DOM. * * Implementations should call positionPasteBuffer */ protected void setupDom() { element = Document.get().createDivElement(); // For some reason setting display to none prevents this trick from working // instead, we move it away from view, so it's still "visible" // NOTE(user): We setwhitespace pre-wrap prevents the browser from // collapsing sequences of whitespace. This is important to ensure that the // spaces after a start tag, or before an end tag are preserved through copy/paste. // Also, we can't use DomHelper.setContentEditable as setting -webkit-user-modify // to read-write-plaintext-only will force the pasted content to plain text and // kill all formatting and semantic paste. // This trick doesn't work in Firefox, because the pre-wrap attribute is not // preserved through copy, to fix this in Firefox, we'll need to manually // replace spaces with element.setAttribute("contentEditable", "true"); JsoView.as(element.getStyle()).setString("white-space", "pre-wrap"); // DomHelper.setContentEditable(element, true, false); element.getStyle().setOverflow(Overflow.HIDDEN); positionPasteBuffer(element); Document.get().getBody().appendChild(element); }
Example #7
Source File: PasteBufferImpl.java From swellrt with Apache License 2.0 | 6 votes |
/** * Sets up the PasteBuffer DOM. * * Implementations should call positionPasteBuffer */ protected void setupDom() { element = Document.get().createDivElement(); // For some reason setting display to none prevents this trick from working // instead, we move it away from view, so it's still "visible" // NOTE(user): We setwhitespace pre-wrap prevents the browser from // collapsing sequences of whitespace. This is important to ensure that the // spaces after a start tag, or before an end tag are preserved through copy/paste. // Also, we can't use DomHelper.setContentEditable as setting -webkit-user-modify // to read-write-plaintext-only will force the pasted content to plain text and // kill all formatting and semantic paste. // This trick doesn't work in Firefox, because the pre-wrap attribute is not // preserved through copy, to fix this in Firefox, we'll need to manually // replace spaces with element.setAttribute("contentEditable", "true"); JsoView.as(element.getStyle()).setString("white-space", "pre-wrap"); // DomHelper.setContentEditable(element, true, false); element.getStyle().setOverflow(Overflow.HIDDEN); positionPasteBuffer(element); Document.get().getBody().appendChild(element); }
Example #8
Source File: DemoUtils.java From gwt-ol with Apache License 2.0 | 6 votes |
/** * Create a MapBox logo. * * @return MapBox logo */ public static Control createMapboxLogo() { ControlOptions controlOptions = new ControlOptions(); LinkElement mapboxLogo = Document.get().createLinkElement(); mapboxLogo.setHref("https://mapbox.com/about/maps"); mapboxLogo.setTarget("_blank"); mapboxLogo.getStyle().setPosition(Position.ABSOLUTE); mapboxLogo.getStyle().setLeft(2, Unit.PX); mapboxLogo.getStyle().setBottom(5, Unit.PX); mapboxLogo.getStyle().setWidth(126, Unit.PX); mapboxLogo.getStyle().setHeight(40, Unit.PX); mapboxLogo.getStyle().setDisplay(Display.BLOCK); mapboxLogo.getStyle().setOverflow(Overflow.HIDDEN); mapboxLogo.getStyle().setBackgroundImage("url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAAoCAMAAAAFWtJHAAAAwFBMVEUAAAAAAAAAAABtbW0AAAAAAAAAAAAAAAAAAAAAAAClpaUAAADp6ekAAAD5+fna2toAAAAMDAzv7+/Nzc0AAAA2Njb8/Pz9/f3T09MAAAAAAAD7+/sAAAArKyuxsbH39/fs7OwbGxuIiIjz8/N8fHyenp7u7u74+PgAAAC8vLxWVlbx8fF1dXXl5eVcXFyUlJTQ0NDFxcVCQkLAwMC4uLj19fXo6OjW1tarq6ve3t77+/vi4uL6+vrKysrNzc3///8w7gSSAAAAP3RSTlMAOQNdPSYBPywKexLLGPCxNEHXnzFL+v2nGwf1IEiE6dBFad9jd9PuLo1V2mDDV3Cjl06SiuXIq4C3973ym6BQMVUPAAAEXElEQVR4Ae2WCVP6OBiH05L0l1IqrVbkKHJ54I0oHn+PfP9vtUle0z/YdhbH2XVnd58ZnRJIeHiPJOx//mH4vQSAN+8FjAhFxgHIaPvJeZ99hxwEElon5iAQbj85Y98g8ODwjEOMAvGFyeE3FEKgodTBqj0BJGN9DhyNd5Ta3ean9QEopfaA+LsKhnEKRExqg4FSP6Og7oEkAjBWnxSCgBX4xF+kcLoPcOBQrSv0e5kH7s1j37jECQieCTPiFGxL5VHw2zQWCee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zPseQG9N/vzilrMIjoStE3++zvle4eSurw7XEe76ynI4aq+v7lEyt1x5awiFlFLQbHKIpabnM3eJLym4Szzzc/du7SU+zOXv9UNpECH7IoH/gecURPlN9vdQpeD47yhIFNX0U0QgvID9nENm+yxk/xb+AGAjNfRZuk9qAAAAAElFTkSuQmCC)"); controlOptions.setElement(mapboxLogo); return new Control(controlOptions); }
Example #9
Source File: MaterialCutOut.java From gwt-material-addins with Apache License 2.0 | 5 votes |
public MaterialCutOut() { super(Document.get().createDivElement(), AddinsCssName.MATERIAL_CUTOUT); focusElement = Document.get().createDivElement(); getElement().appendChild(focusElement); getElement().getStyle().setOverflow(Overflow.HIDDEN); getElement().getStyle().setDisplay(Display.NONE); }
Example #10
Source File: MobileUniTimeFrameDialogImpl.java From unitime with Apache License 2.0 | 5 votes |
@Override public void openDialog(String title, String source, String width, String height, boolean noCacheTS) { if (isShowing()) hideDialog(); GwtHint.hideHint(); iScrollLeft = Window.getScrollLeft(); iScrollTop = Window.getScrollTop(); Window.scrollTo(0, 0); LoadingWidget.getInstance().show("Loading " + title + " ..."); setText(title); if (noCacheTS) { String hash = null; int hashIdx = source.lastIndexOf('#'); if (hashIdx >= 0) { hash = source.substring(hashIdx); source = source.substring(0, hashIdx); } iFrame.setUrl(source + (source.indexOf('?') >= 0 ? "&" : "?") + "noCacheTS=" + new Date().getTime() + (hash == null ? "" : hash)); } else { iFrame.setUrl(source); } iCheckLoadingWidgetIsShowing.schedule(30000); History.newItem(title, false); iPopup.setPopupPosition(0, 0); iPopup.show(); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); }
Example #11
Source File: CourseFinderDialog.java From unitime with Apache License 2.0 | 5 votes |
@Override public void findCourse() { iFilter.setAriaLabel(isAllowFreeTime() ? ARIA.courseFinderFilterAllowsFreeTime() : ARIA.courseFinderFilter()); AriaStatus.getInstance().setText(ARIA.courseFinderDialogOpened()); if (iTabs != null) for (CourseFinderTab tab: iTabs) tab.changeTip(); center(); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { iFilter.setFocus(true); } }); }
Example #12
Source File: CellTreeNodeView.java From consulo with Apache License 2.0 | 5 votes |
/** * 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; }
Example #13
Source File: ScrollPanel.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 5 votes |
private void reset() { this.getElement().getStyle().setOverflow(Overflow.AUTO); if (this.offsetTop != null && this.offsetBottom != null) { this.getElement().getStyle().setHeight( Document.get().getClientHeight() - this.offsetTop.intValue() - this.offsetBottom.intValue(), Unit.PX); } if (this.offsetLeft != null && this.offsetRight != null) { this.getElement().getStyle().setWidth( Document.get().getClientWidth() - this.offsetLeft.intValue() - this.offsetRight.intValue(), Unit.PX); } }
Example #14
Source File: InputFile.java From putnami-web-toolkit with GNU Lesser General Public License v3.0 | 5 votes |
UploadForm() { this.formPanel.getElement().getStyle().setHeight(0, Unit.PX); this.formPanel.getElement().getStyle().setWidth(0, Unit.PX); this.formPanel.getElement().getStyle().setOverflow(Overflow.HIDDEN); this.formPanel.add(this.fileUpload); this.fileUpload.setName("data"); this.handlerRegistrations.add(this.fileUpload.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { uploadData(fileUpload.getElement()); } })); }
Example #15
Source File: SuggestionsBox.java From unitime with Apache License 2.0 | 4 votes |
@Override public void center() { super.center(); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); }
Example #16
Source File: CellBrowser.java From consulo with Apache License 2.0 | 4 votes |
protected <T> CellBrowser(Builder<T> builder) { super(builder.viewModel); if (template == null) { template = GWT.create(Template.class); } Resources resources = builder.resources(); this.style = resources.cellBrowserStyle(); this.style.ensureInjected(); this.cellListResources = new CellListResourcesImpl(resources); this.loadingIndicator = builder.loadingIndicator; this.pagerFactory = builder.pagerFactory; this.pageSize = builder.pageSize; initWidget(new SplitLayoutPanel()); getElement().getStyle().setOverflow(Overflow.AUTO); setStyleName(this.style.cellBrowserWidget()); // Initialize the open and close images strings. ImageResource treeOpen = resources.cellBrowserOpen(); ImageResource treeClosed = resources.cellBrowserClosed(); openImageHtml = getImageHtml(treeOpen); closedImageHtml = getImageHtml(treeClosed); imageWidth = Math.max(treeOpen.getWidth(), treeClosed.getWidth()); minWidth = imageWidth + 20; // Add a placeholder to maintain the scroll width. scrollLock = Document.get().createDivElement(); scrollLock.getStyle().setPosition(Position.ABSOLUTE); scrollLock.getStyle().setVisibility(Visibility.HIDDEN); scrollLock.getStyle().setZIndex(-32767); scrollLock.getStyle().setTop(0, Unit.PX); if (LocaleInfo.getCurrentLocale().isRTL()) { scrollLock.getStyle().setRight(0, Unit.PX); } else { scrollLock.getStyle().setLeft(0, Unit.PX); } scrollLock.getStyle().setHeight(1, Unit.PX); scrollLock.getStyle().setWidth(1, Unit.PX); getElement().appendChild(scrollLock); // Associate the first view with the rootValue. appendTreeNode(getNodeInfo(builder.rootValue), builder.rootValue); // Catch scroll events. sinkEvents(Event.ONSCROLL); }
Example #17
Source File: DebugDialog.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
LogPanel(InMemoryLogSink log) { this.log = log; logContainer.getStyle().setWidth(800, Unit.PX); logContainer.getStyle().setHeight(500, Unit.PX); logContainer.getStyle().setOverflow(Overflow.SCROLL); }
Example #18
Source File: DebugDialog.java From swellrt with Apache License 2.0 | 4 votes |
LogPanel(InMemoryLogSink log) { this.log = log; logContainer.getStyle().setWidth(800, Unit.PX); logContainer.getStyle().setHeight(500, Unit.PX); logContainer.getStyle().setOverflow(Overflow.SCROLL); }
Example #19
Source File: UniTimeFrameDialogImpl.java From unitime with Apache License 2.0 | 4 votes |
public void center() { super.center(); iCheckLoadingWidgetIsShowing.schedule(30000); RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN); AriaStatus.getInstance().setText(ARIA.dialogOpened(getText())); }
Example #20
Source File: TableAggregationRow.java From cuba with Apache License 2.0 | 4 votes |
public TableAggregationRow(TableWidget tableWidget) { this.tableWidget = tableWidget; String primaryStyleName = tableWidget.getStylePrimaryName(); DivElement wrapElement = Document.get().createDivElement(); wrapElement.setClassName(primaryStyleName + "-arow-wrap"); setElement(wrapElement); container = Document.get().createDivElement(); container.setClassName(primaryStyleName + "-arow"); container.getStyle().setOverflow(Overflow.HIDDEN); wrapElement.appendChild(container); }