本文整理汇总了Java中com.google.gwt.user.client.ui.RootPanel.add方法的典型用法代码示例。如果您正苦于以下问题:Java RootPanel.add方法的具体用法?Java RootPanel.add怎么用?Java RootPanel.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.RootPanel
的用法示例。
在下文中一共展示了RootPanel.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onModuleLoad
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
@Override
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get("main");
final Button button = new Button("Click me");
rootPanel.add(button);
ObservableEx.fromKeyboardEvent(button.getElement(), "keydown")
.map(event -> event.ctrlKey)
.take(5)
.subscribe(v -> log("ctrlKey " + v));
ObservableEx.fromMouseEvent(button.getElement(), "click")
.map(event -> event.clientX)
.take(5)
.subscribe(v -> log("clientX " + v));
}
示例2: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
String id = panel.getElement().getInnerText();
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
RPC.execute(new SolverAllocatedMemoryRpcRequest(id), new AsyncCallback<SolverAllocatedMemoryRpcResponse>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(SolverAllocatedMemoryRpcResponse result) {
setWidget(new Label(result.getValue()));
}
});
}
示例3: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public static AriaSuggestBox insert(RootPanel panel) {
String config = panel.getElement().getAttribute("configuration");
final String onchange = panel.getElement().getAttribute("onchange");
AriaTextBox text = new AriaTextBox(panel.getElement().getFirstChildElement());
text.getElement().setAttribute("autocomplete", "off");
AriaSuggestBox box = new AriaSuggestBox(text, new CourseNumbersSuggestBox(config));
if (onchange != null)
box.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
ToolBox.eval(onchange);
}
});
panel.add(box);
return box;
}
示例4: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
String studentId = panel.getElement().getInnerText().trim();
panel.getElement().setInnerText(null);
panel.add(this);
sSectioningService.lookupStudent(iOnline, studentId, new AsyncCallback<ClassAssignmentInterface.Student>() {
@Override
public void onSuccess(Student result) {
if (result != null) {
panel.setVisible(true);
setStudent(result);
if (SectioningCookie.getInstance().getEnrollmentCoursesDetails()) {
refresh();
} else {
clear();
iHeader.clearMessage();
iHeader.setCollapsible(false);
}
}
}
@Override
public void onFailure(Throwable caught) {}
});
}
示例5: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
initCallbacks();
iOfferingId = Long.valueOf(panel.getElement().getInnerText());
if (ReservationCookie.getInstance().getReservationCoursesDetails()) {
refresh();
} else {
clear(false);
iHeader.clearMessage();
iHeader.setCollapsible(false);
}
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
addReservationClickHandler(new ReservationClickHandler() {
@Override
public void onClick(ReservationClickedEvent evt) {
ToolBox.open(GWT.getHostPageBaseURL() + "gwt.jsp?page=reservation&id=" + evt.getReservation().getId() + "&reservations=" + getReservationIds());
}
});
}
示例6: setPreloader
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void setPreloader() {
RootPanel preloaderWidget = rootPanelDelegate.getRootPanel(MAIN_PRELOADER_ID);
if (preloaderWidget == null) {
ImageResource progressImage = progressBundle.getProgressImage();
mainPreloader = new Image(progressImage);
} else {
mainPreloader = Image.wrap(preloaderWidget.getElement());
}
RootPanel rootPanel = rootPanelDelegate.getRootPanel();
rootPanel.add(mainPreloader);
int halfWidth = windowDelegate.getClientWidth() / 2;
int halfHeight = windowDelegate.getClientHeight() / 2;
centerMainPreloader(halfWidth, halfHeight, mainPreloader.getElement());
}
示例7: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
iInstructorId = panel.getElement().getInnerText();
if (InstructorCookie.getInstance().isShowTeachingAssignments()) {
refresh();
}
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
}
示例8: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
iOfferingId = Long.valueOf(panel.getElement().getInnerText());
if (InstructorCookie.getInstance().isShowTeachingRequests()) {
refresh();
}
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
}
示例9: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
initCallbacks();
iOfferingId = Long.valueOf(panel.getElement().getInnerText());
iCourseName = null;
if (CurriculumCookie.getInstance().getCurriculaCoursesDetails()) {
refresh();
} else {
iHeader.clearMessage();
iHeader.setCollapsible(false);
}
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
}
示例10: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public static SingleDateSelector insert(RootPanel panel) {
String format = panel.getElement().getAttribute("format");
final String onchange = panel.getElement().getAttribute("onchange");
String error = panel.getElement().getAttribute("error");
AriaTextBox text = new AriaTextBox(panel.getElement().getFirstChildElement());
SingleDateSelector selector = new SingleDateSelector(text, null, false);
if (format != null)
selector.iFormat = DateTimeFormat.getFormat(format);
if (onchange != null)
selector.addValueChangeHandler(new ValueChangeHandler<Date>() {
@Override
public void onValueChange(ValueChangeEvent<Date> event) {
ToolBox.eval(onchange);
}
});
if (text.getText() != null && !text.getText().isEmpty()) {
Date date = null;
try {
date = selector.iFormat.parse(text.getText());
} catch (IllegalArgumentException e) {}
if (date != null)
selector.setValue(date);
}
if (error != null && !error.isEmpty())
selector.setErrorHint(error);
panel.add(selector);
return selector;
}
示例11: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
iOfferingId = Long.valueOf(panel.getElement().getInnerText());
if (iOfferingId >= 0 && iShowFilter)
iHeader.setHeaderTitle(MESSAGES.studentsTable());
if (SectioningCookie.getInstance().getEnrollmentCoursesDetails()) {
refresh();
} else {
clear();
iHeader.clearMessage();
iHeader.setCollapsible(false);
}
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
}
示例12: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(RootPanel panel) {
String title = panel.getElement().getInnerText();
if (title != null && !title.isEmpty())
iLabel.setValue(new PageNameInterface(title));
panel.getElement().setInnerText("");
panel.add(iLabel);
setPageName(title);
}
示例13: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
load(Long.valueOf(panel.getElement().getInnerText()));
panel.getElement().setInnerText(null);
panel.add(this);
panel.setVisible(true);
}
示例14: insert
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
panel.add(this);
panel.setVisible(true);
}
示例15: attach
import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
private void attach(final RootPanel rootPanel) {
rootPanel.add(this);
}