本文整理汇总了Java中com.google.gwt.event.logical.shared.OpenEvent类的典型用法代码示例。如果您正苦于以下问题:Java OpenEvent类的具体用法?Java OpenEvent怎么用?Java OpenEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OpenEvent类属于com.google.gwt.event.logical.shared包,在下文中一共展示了OpenEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addDocDisplayItemsAndHandlers
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
/**
* @param docBean
* @param docTitleLabel
* @param docType
* @param icon
* @param docItem
*/
private void addDocDisplayItemsAndHandlers(final Document docBean, Label docTitleLabel, Label docType, Label icon,
final TreeItem docItem) {
String docDisplayProperty = getDocDisplayProperty(docBean, presenter.batchDTO.getDocDisplayName());
DocumentTreeItem documentTreeItem = new DocumentTreeItem(docItem, docBean, icon, docDisplayProperty);
addDocTreeItem(documentTreeItem);
docItem.setTitle(documentTreeItem.documentTitle);
docTitleLabel.setText(documentTreeItem.documentTitle);
docType.setText(documentTreeItem.displayName);
docTitleLabel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
if (docItem.getState()) {
docItem.setState(Boolean.FALSE);
} else {
OpenEvent.fire(docTree, docItem);
}
}
});
}
示例2: onOpen
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
@Override
public void onOpen(final OpenEvent<Appointment> event) {
showLoadingView();
final Appointment appt = event.getTarget();
final String imageId = appt.getId();
dockerService.getImage(imageId, new AsyncCallback<KieImage>() {
@Override
public void onFailure(final Throwable caught) {
showError(caught);
}
@Override
public void onSuccess(final KieImage result) {
if (result != null) {
final List<KieImage> list = new ArrayList<KieImage>(1);
list.add(result);
imagesProvider.setList(list);
redrawTable();
showAllImagesPanel();
} else {
showError(Constants.INSTANCE.notAvailable());
}
hideLoadingView();
}
});
}
示例3: show
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
/**
* Overrides show to call {@link #adjustGlassSize()} if the dialog
* is already showing and fires an {@link OpenEvent} after the
* normal show.
*/
@Override
public void show() {
boolean fireOpen = !isShowing();
super.show();
// adjust the size of the glass
if (isShowing()) {
adjustGlassSize();
}
// fire the open event
if (fireOpen) {
OpenEvent.fire(this, this);
}
}
示例4: onSuccess
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
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);
}
}
示例5: addBlankLine
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
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);
}
示例6: show
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
@Override
public void show() {
boolean fireOpen = !isShowing();
super.show();
if (fireOpen) {
OpenEvent.fire(this, this);
}
}
示例7: show
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
@Override
public void show() {
boolean fireOpen = !isShowing();
super.show();
if (fireOpen) {
OpenEvent.fire(this, this);
}
}
示例8: onOpen
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
@Override
public void onOpen(OpenEvent<TreeItem> event) {
TreeItem item = event.getTarget();
currentlySelected = item;
if ( item.getChild(0).getText().equals(DatasetWidget.LOADING) ) {
CategorySerializable cat = (CategorySerializable) item.getUserObject();
Util.getRPCService().getCategories(cat.getID(), null, categoryCallback);
}
}
示例9: onOpen
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
@Override
public void onOpen(OpenEvent<DisclosurePanel> event) {
for (Iterator panelIt = xPanels.iterator(); panelIt.hasNext();) {
OutputPanel panel = (OutputPanel) panelIt.next();
panel.setAnnotationsOpen(true);
}
}
示例10: addDocTreeOpenHandler
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
/**
*
*/
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));
}
}
});
}
示例11: _fireExpandOrCollapseEvent
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
void _fireExpandOrCollapseEvent(final boolean expand) {
if (_tree != null) {
if (expand) {
OpenEvent.fire(_tree,this);
TreeViewItemExpandEvent.fire(_tree,this);
} else {
CloseEvent.fire(_tree,this);
TreeViewItemCollapseEvent.fire(_tree,this);
}
}
}
示例12: fireStateChanged
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
void fireStateChanged(final T item,
final T.State state) {
if (state.equals(T.State.OPEN)) {
OpenEvent.fire(this,
item);
} else {
CloseEvent.fire(this,
item);
}
onSelection(item,
true);
}
示例13: onTitleClicked
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
private void onTitleClicked() {
if (expanded) {
CloseEvent.fire(this,
this);
} else {
OpenEvent.fire(this,
this);
}
}
示例14: onTreeOpen
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
@UiHandler("tree")
void onTreeOpen(OpenEvent<TreeItem> event) {
TreeItem item = event.getTarget();
if(item.getText().length() > 1) return; // search field hack
String first = item.getText();
presenter.loadUsers(first, item);
}
示例15: addOpenHandler
import com.google.gwt.event.logical.shared.OpenEvent; //导入依赖的package包/类
public HandlerRegistration addOpenHandler(OpenHandler<UniTimeDialogBox> handler) {
return addHandler(handler, OpenEvent.getType());
}