本文整理汇总了Java中com.google.gwt.user.client.ui.SimplePanel.add方法的典型用法代码示例。如果您正苦于以下问题:Java SimplePanel.add方法的具体用法?Java SimplePanel.add怎么用?Java SimplePanel.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.SimplePanel
的用法示例。
在下文中一共展示了SimplePanel.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
@Override
protected void init(){
grid = new DescribeGrid(labarr, "data");
verticalPanel.add(grid);
grid.addStyleName("bda-descgrid-savedata");
savebtn.setStyleName("bda-descgrid-savedata-submitbtn");
SimplePanel simPanel = new SimplePanel();
simPanel.add( savebtn );
simPanel.setStyleName("bda-descgrid-savedata-simpanel");
verticalPanel.add(simPanel);
savebtn.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
dbController.submitSaveDataset2DB(panel,SaveDatasetPanel.this, dataset,grid);
}
});
}
示例2: createCloseWidget
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Create close icon widget that contains an close notification icon.
*
* @return {@link SimplePanel} as close icon wrapper
*/
private SimplePanel createCloseWidget() {
SimplePanel closeWrapper = new SimplePanel();
SVGImage closeImage = new SVGImage(resources.closeIcon());
closeImage.addClickHandler(
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onClose(notification);
}
});
closeWrapper.add(closeImage);
closeWrapper.setStyleName(resources.notificationCss().notificationPopupCloseButtonWrapper());
closeWrapper.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId());
return closeWrapper;
}
示例3: createCloseWidget
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Create close icon widget that contains an close notification icon.
*
* @return {@link SimplePanel} as close icon wrapper
*/
private SimplePanel createCloseWidget() {
SimplePanel closeWrapper = new SimplePanel();
SVGImage closeImage = new SVGImage(resources.closeIcon());
closeImage.addClickHandler(
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
delegate.onClose(notification);
}
});
closeWrapper.add(closeImage);
closeWrapper.setStyleName(resources.notificationCss().notificationCloseButtonWrapper());
closeImage.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId());
return closeWrapper;
}
示例4: addXYPlot
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public static void addXYPlot(JscriptRequest jspr, String div) {
Map<String,String> paramMap= jspr.asMap();
WidgetFactory factory= Application.getInstance().getWidgetFactory();
TablePreview xyPrev= factory.createObserverUI(WidgetFactory.XYPLOT,paramMap);
xyPrev.bind(FFToolEnv.getHub());
SimplePanel panel= makeCenter();
panel.add(xyPrev.getDisplay());
FFToolEnv.addToPanel(div, panel, "XY Plot");
if (xyPrev.getDisplay() instanceof RequiresResize) {
final RequiresResize resizer= (RequiresResize)xyPrev.getDisplay();
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
resizer.onResize();
}
});
}
}
示例5: execute
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
@Override
public void execute() {
final DialogBox db = new DialogBox(false, true);
db.setText("About MIT App Inventor");
db.setStyleName("ode-DialogBox");
db.setHeight("200px");
db.setWidth("400px");
db.setGlassEnabled(true);
db.setAnimationEnabled(true);
db.center();
VerticalPanel DialogBoxContents = new VerticalPanel();
String html = MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) +
"<BR/>Use Companion: " + BlocklyPanel.getCompVersion();
Config config = Ode.getInstance().getSystemConfig();
String releaseNotesUrl = config.getReleaseNotesUrl();
if (!Strings.isNullOrEmpty(releaseNotesUrl)) {
html += "<BR/><BR/>Please see <a href=\"" + releaseNotesUrl +
"\" target=\"_blank\">release notes</a>";
}
String tosUrl = config.getTosUrl();
if (!Strings.isNullOrEmpty(tosUrl)) {
html += "<BR/><BR/><a href=\"" + tosUrl +
"\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>";
}
HTML message = new HTML(html);
SimplePanel holder = new SimplePanel();
Button ok = new Button("Close");
ok.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
db.hide();
}
});
holder.add(ok);
DialogBoxContents.add(message);
DialogBoxContents.add(holder);
db.setWidget(DialogBoxContents);
db.show();
}
示例6: createLabelPanel
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private void createLabelPanel() {
panelForItem =new SimplePanel();
panelForItem.setStylePrimaryName("listViewItemStyle");
panelForItem.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px",
ComponentConstants.LISTVIEW_PREFERRED_HEIGHT + "px");
panelForItem.add(labelInItem);
listViewWidget.add(panelForItem);
}
示例7: SearchResult
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public SearchResult() {
sp = new SimplePanel();
searchCompactResult = new SearchCompactResult();
searchFullResult = new SearchFullResult();
sp.add(searchFullResult);
status = new Status();
status.setStyleName("okm-StatusPopup");
initWidget(sp);
}
示例8: addContentWidgetWebKit
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected void addContentWidgetWebKit( final FlowPanel content, final Widget wid ) {
Widget widToAdd = wid;
//Somehow Chrome and Safari do not understand inline in this context, so we use float left
if( BrowserDetect.getBrowserDetect().isSafari() || BrowserDetect.getBrowserDetect().isChrome() ) {
SimplePanel panelWrap = new SimplePanel();
panelWrap.add( wid );
panelWrap.addStyleName( CommonResourcesContainer.FLOAT_LEFT_INSTEAD_OF_INLINE_STYLE );
widToAdd = panelWrap;
}
MessageTextToFlowPanel.addContentWidget( content, widToAdd, false );
}
示例9: createTitleWidget
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Create title widget that contains notification title.
*
* @return {@link SimplePanel} as title wrapper
*/
private SimplePanel createTitleWidget() {
SimplePanel titleWrapper = new SimplePanel();
Label titleLabel = new Label();
titleWrapper.add(titleLabel);
titleWrapper.setStyleName(resources.notificationCss().notificationPopupTitleWrapper());
titleWrapper.ensureDebugId(TITLE_DBG_ID + notification.getId());
return titleWrapper;
}
示例10: createContentWidget
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Create message widget that contains notification message.
*
* @return {@link SimplePanel} as message wrapper
*/
private SimplePanel createContentWidget() {
SimplePanel messageWrapper = new SimplePanel();
Label messageLabel = new Label();
messageWrapper.add(messageLabel);
messageWrapper.setStyleName(resources.notificationCss().notificationMessageWrapper());
messageWrapper.ensureDebugId(MESSAGE_WRAPPER_DBG_ID + notification.getId());
return messageWrapper;
}
示例11: processRequest
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected void processRequest(Request req, AsyncCallback<String> callback) {
TablePanel table = new HistoryTagsCmd.TagHistoryConfig(false).createAndLoadTable();
table.setHeight("400px");
SimplePanel p = new SimplePanel();
p.add(table);
GwtUtil.setStyle(p, "margin", "5px");
registerView(LayoutManager.DROPDOWN_REGION, p);
callback.onSuccess("");
}
示例12: makeDetailMsg
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private static Widget makeDetailMsg(String s, String msgStyle) {
// HTML message = new HTML(s);
HTML message = setScrollBar(s);
message.setStyleName(msgStyle);
SimplePanel panel = new SimplePanel();
panel.add(message);
// return new ScrollPanel(message);
return panel;
}
示例13: makeMsg
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private static Widget makeMsg(String s, String msgStyle) {
// String hStr= "<span style=\"font-size: 120%;\">";
// if(s.length() > 400){
// s = "<div style='width: 350px; height: 250px; overflow: auto;'>" + s + "</div>";
// }
// HTML message = new HTML(hStr+ s + "</span>");
HTML message = setScrollBar(s);
message.setStyleName(msgStyle);
SimplePanel panel = new SimplePanel();
panel.add(message);
//return new ScrollPanel(message);
return panel;
}
示例14: TablePanel
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public TablePanel(String name, Loader<TableDataView> loader) {
setInit(false);
this.name = name;
dataModel = new DataSetTableModel(loader);
dataModel.addHandler(modelEventHandler);
mainWrapper = new SimplePanel();
mainWrapper.addStyleName("mainWrapper");
mainWrapper.setSize("100%", "100%");
mainPanel.setSize("100%", "100%");
mainPanel.addStyleName("mainPanel");
DOM.setStyleAttribute(mainPanel.getElement(), "borderSpacing", "0px");
toolbarWrapper = new HorizontalPanel();
toolbarWrapper.setStyleName("firefly-toolbar");
stateId = name;
mainWrapper.add(mainPanel);
initWidget(mainWrapper);
sinkEvents(Event.ONMOUSEOVER);
WebEventManager.getAppEvManager().addListener(Name.DOWNLOAD_REQUEST_READY, new WebEventListener() {
public void eventNotify(WebEvent ev) {
if (ev.getName().equals(Name.DOWNLOAD_REQUEST_READY)) {
if (ev.getSource() instanceof DownloadRequest) {
downloadRequest = (DownloadRequest) ev.getSource();
}
}
}
});
helpButton.setVisible(false);
}
示例15: addCoveragePlot
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public static void addCoveragePlot(JscriptRequest jspr, String div) {
Map<String,String> paramMap= jspr.asMap();
WidgetFactory factory= Application.getInstance().getWidgetFactory();
if (paramMap.containsKey(CommonParams.CENTER_COLUMNS) || paramMap.containsKey(CommonParams.CORNER_COLUMNS)) {
if (!paramMap.containsKey(CommonParams.CENTER_COLUMNS)) {
paramMap.put(CommonParams.CENTER_COLUMNS, "ra,dec");
}
}
else {
paramMap.put(CommonParams.ENABLE_DEFAULT_COLUMNS, "true");
}
if (!paramMap.containsKey(CommonParams.CATALOGS_AS_OVERLAYS)) {
paramMap.put(CommonParams.CATALOGS_AS_OVERLAYS, "false");
}
if (paramMap.containsKey(WebPlotRequest.OVERLAY_POSITION)) {
enableAutoOverlays();
if (paramMap.containsKey("EVENT_WORKER_ID")) {
String s= paramMap.get("EVENT_WORKER_ID");
paramMap.put("EVENT_WORKER_ID",s+","+"target");
}
else {
paramMap.put("EVENT_WORKER_ID", "target");
}
}
TablePreview covPrev= factory.createObserverUI(WidgetFactory.COVERAGE_VIEW, paramMap);
covPrev.bind(FFToolEnv.getHub());
SimplePanel panel= makeCenter();
panel.add(covPrev.getDisplay());
FFToolEnv.addToPanel(div, panel, "Coverage");
}