Java 类com.google.gwt.event.logical.shared.OpenHandler 实例源码

项目:QMAClone    文件:PanelThreadList.java   
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);
    }
}
项目:unitimes    文件:CurriculaCourses.java   
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);
}
项目:LAS    文件:BaseUI.java   
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);
}
项目:ephesoft    文件:DocumentTree.java   
/**
 * 
 */
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));
            }
        }
    });
}
项目:unitime    文件:CurriculaCourses.java   
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);
}
项目:unitimes    文件:UniTimeDialogBox.java   
public HandlerRegistration addOpenHandler(OpenHandler<UniTimeDialogBox> handler) {
    return addHandler(handler, OpenEvent.getType());
}
项目:LAS    文件:WindowBox.java   
@Override
public HandlerRegistration addOpenHandler(OpenHandler<WindowBox> handler) {
    return addHandler(handler, OpenEvent.getType());
}
项目:LAS    文件:DatasetButton.java   
public HandlerRegistration addOpenHandler(OpenHandler<TreeItem> handler) {
    return datasetWidget.addOpenHandler(handler);
}
项目:kie-docker-ci    文件:KieCalendar.java   
public HandlerRegistration addOpenHandler(final OpenHandler<Appointment> appointmentOpenHandler) {
    return calendar.addOpenHandler(appointmentOpenHandler);
}
项目:r01fb    文件:TreeView.java   
@Override
public final HandlerRegistration addOpenHandler(final OpenHandler<TreeViewItem> handler) {
    return this.addHandler(handler,
                           OpenEvent.getType());
}
项目:gerrit    文件:ComplexDisclosurePanel.java   
@Override
public HandlerRegistration addOpenHandler(OpenHandler<DisclosurePanel> h) {
  return main.addOpenHandler(h);
}
项目:unitime    文件:UniTimeDialogBox.java   
public HandlerRegistration addOpenHandler(OpenHandler<UniTimeDialogBox> handler) {
    return addHandler(handler, OpenEvent.getType());
}
项目:appformer    文件:Tree.java   
@Override
public HandlerRegistration addOpenHandler(final OpenHandler<T> handler) {
    return addHandler(handler,
                      OpenEvent.getType());
}
项目:appformer    文件:AbstractLazyStackPanelHeader.java   
public HandlerRegistration addOpenHandler(OpenHandler<AbstractLazyStackPanelHeader> handler) {
    return addHandler(handler,
                      OpenEvent.getType());
}
项目:appformer    文件:DecoratedDisclosurePanel.java   
public HandlerRegistration addOpenHandler(OpenHandler<DisclosurePanel> openHandler) {
    return widget.addOpenHandler(openHandler);
}
项目:platypus-js    文件:WindowPanel.java   
@Override
public HandlerRegistration addOpenHandler(OpenHandler<WindowUI> handler) {
    return addHandler(handler, OpenEvent.getType());
}
项目:platypus-js    文件:WindowPopupPanel.java   
@Override
public HandlerRegistration addOpenHandler(OpenHandler<WindowUI> handler) {
    return window.addHandler(handler, OpenEvent.getType());
}
项目:platypus-js    文件:AutoCloseBox.java   
@Override
public HandlerRegistration addOpenHandler(OpenHandler<AutoCloseBox> handler) {
    return addHandler(handler, OpenEvent.getType());
}
项目:gwt-traction    文件:TractionDialogBox.java   
@Override
   public HandlerRegistration addOpenHandler(OpenHandler<TractionDialogBox> handler) {
return addHandler(handler, OpenEvent.getType());
   }