public void onSuccess(List<PacketBbsThread> result) { for (final PacketBbsThread thread : result) { final LazyPanel lazyPanel = new LazyPanel() { @Override protected Widget createWidget() { DecoratorPanel decoratorPanel = new DecoratorPanel(); decoratorPanel.setWidget(new PanelThread((int) thread.id, thread.title)); return decoratorPanel; } }; OpenHandler<DisclosurePanel> openHandler = new OpenHandler<DisclosurePanel>() { @Override public void onOpen(OpenEvent<DisclosurePanel> event) { lazyPanel.ensureWidget(); } }; DisclosurePanel disclosurePanel = new DisclosurePanel(thread.title); disclosurePanel.setContent(lazyPanel); disclosurePanel.addOpenHandler(openHandler); add(disclosurePanel); } }
public void addBlankLine() { List<Widget> line = new ArrayList<Widget>(); HorizontalPanel hp = new HorizontalPanel(); line.add(hp); CurriculaCourseSelectionBox cx = new CurriculaCourseSelectionBox(); cx.setWidth("130px"); cx.addCourseSelectionHandler(iCourseChangedHandler); if (cx.getCourseFinder() instanceof HasOpenHandlers) ((HasOpenHandlers<PopupPanel>)cx.getCourseFinder()).addOpenHandler(new OpenHandler<PopupPanel>() { @Override public void onOpen(OpenEvent<PopupPanel> event) { iTable.clearHover(); } }); if (!iEditable) cx.setEnabled(false); line.add(cx); for (int col = 0; col < iClassifications.getClassifications().size(); col++) { ShareTextBox ex = new ShareTextBox(col, null, null); if (!iEditable) ex.setReadOnly(true); line.add(ex); EnrollmentLabel note = new EnrollmentLabel(col, null, null, null, null, null, null); line.add(note); } int row = iTable.addRow("", line); iTable.getRowFormatter().addStyleName(row, "unitime-NoPrint"); if (iVisibleCourses != null) iTable.getRowFormatter().setVisible(row, false); for (int col = 0; col < line.size(); col++) if (!iTable.getCellFormatter().isVisible(0, col)) iTable.getCellFormatter().setVisible(row, col, false); }
public void setDatasetOpenHandler(OpenHandler<TreeItem> handler) { // There is no default open handler, so if it's null don't remove it. if (xRegisterDatasetOpenHandler != null) { xRegisterDatasetOpenHandler.removeHandler(); } xRegisterDatasetOpenHandler = xDatasetButton.addOpenHandler(handler); }
/** * */ private void addDocTreeOpenHandler() { docTree.addOpenHandler(new OpenHandler<TreeItem>() { @Override public void onOpen(OpenEvent<TreeItem> arg0) { TreeItem target = arg0.getTarget(); String title = target.getTitle(); String text = target.getText(); presenter.document = getdocTreeItemByTitle(arg0.getTarget().getTitle()).document; boolean isAlreadySelected = setDocumentSelected(arg0.getTarget()); List<Page> pageList = presenter.document.getPages().getPage(); for (Page page : pageList) { String identifier = page.getIdentifier(); PageImage pageImage = pageImageMap.get(identifier); RotatableImage image = pageImage.getImage(); if (!page.isIsRotated()) { image.setUrl(presenter.batchDTO.getAbsoluteURLFor(page.getThumbnailFileName()), page.getDirection()); } else { image.setUrl(presenter.batchDTO.getAbsoluteURLForRotatedImage(page.getThumbnailFileName(), page.getDirection() .toString()), page.getDirection()); } } presenter.page = presenter.document.getPages().getPage().get(0); setPageSelected(getPageImageById(presenter.page.getIdentifier()).image, false); int itemCount = presenter.getView().getRvPanel().getReviewPanel().documentTypes.getItemCount(); if (target.getChildCount() > 0 && !(title.isEmpty() && text.isEmpty())) { scrollIntoView(target.getElement()); } if (!isAlreadySelected || itemCount == 0) { DocumentTree.this.fireEvent(new DocExpandEvent(presenter.document)); } else { DocumentTree.this.fireEvent(new DocExpandEvent(presenter.document, false)); } } }); }
public HandlerRegistration addOpenHandler(OpenHandler<UniTimeDialogBox> handler) { return addHandler(handler, OpenEvent.getType()); }
@Override public HandlerRegistration addOpenHandler(OpenHandler<WindowBox> handler) { return addHandler(handler, OpenEvent.getType()); }
public HandlerRegistration addOpenHandler(OpenHandler<TreeItem> handler) { return datasetWidget.addOpenHandler(handler); }
public HandlerRegistration addOpenHandler(final OpenHandler<Appointment> appointmentOpenHandler) { return calendar.addOpenHandler(appointmentOpenHandler); }
@Override public final HandlerRegistration addOpenHandler(final OpenHandler<TreeViewItem> handler) { return this.addHandler(handler, OpenEvent.getType()); }
@Override public HandlerRegistration addOpenHandler(OpenHandler<DisclosurePanel> h) { return main.addOpenHandler(h); }
@Override public HandlerRegistration addOpenHandler(final OpenHandler<T> handler) { return addHandler(handler, OpenEvent.getType()); }
public HandlerRegistration addOpenHandler(OpenHandler<AbstractLazyStackPanelHeader> handler) { return addHandler(handler, OpenEvent.getType()); }
public HandlerRegistration addOpenHandler(OpenHandler<DisclosurePanel> openHandler) { return widget.addOpenHandler(openHandler); }
@Override public HandlerRegistration addOpenHandler(OpenHandler<WindowUI> handler) { return addHandler(handler, OpenEvent.getType()); }
@Override public HandlerRegistration addOpenHandler(OpenHandler<WindowUI> handler) { return window.addHandler(handler, OpenEvent.getType()); }
@Override public HandlerRegistration addOpenHandler(OpenHandler<AutoCloseBox> handler) { return addHandler(handler, OpenEvent.getType()); }
@Override public HandlerRegistration addOpenHandler(OpenHandler<TractionDialogBox> handler) { return addHandler(handler, OpenEvent.getType()); }