当前位置: 首页>>代码示例>>Java>>正文


Java RootPanel.add方法代码示例

本文整理汇总了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));        
}
 
开发者ID:timofeevda,项目名称:gwt-rxjs-jsinterop,代码行数:17,代码来源:OnPageTest.java

示例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()));
		}
	});
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:17,代码来源:SolverAllocatedMemory.java

示例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;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:17,代码来源:CourseNumbersSuggestBox.java

示例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) {}
	});
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:24,代码来源:StudentScheduleTable.java

示例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());
		}
	});
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:21,代码来源:ReservationTable.java

示例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());
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:16,代码来源:ContentPreloader.java

示例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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:10,代码来源:TeachingAssignmentsWidget.java

示例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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:10,代码来源:TeachingRequestsWidget.java

示例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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:15,代码来源:CourseCurriculaTable.java

示例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;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:29,代码来源:SingleDateSelector.java

示例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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:16,代码来源:EnrollmentTable.java

示例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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:UniTimePageLabel.java

示例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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:RoomNoteChanges.java

示例14: insert

import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
public void insert(final RootPanel panel) {
	panel.add(this);
	panel.setVisible(true);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:5,代码来源:UniTimeVersion.java

示例15: attach

import com.google.gwt.user.client.ui.RootPanel; //导入方法依赖的package包/类
private void attach(final RootPanel rootPanel) {
	rootPanel.add(this);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:4,代码来源:UniTimeMobileMenu.java


注:本文中的com.google.gwt.user.client.ui.RootPanel.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。