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


Java SimplePanel类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.SimplePanel的典型用法代码示例。如果您正苦于以下问题:Java SimplePanel类的具体用法?Java SimplePanel怎么用?Java SimplePanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SimplePanel类属于com.google.gwt.user.client.ui包,在下文中一共展示了SimplePanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: afterInitialization

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
@AfterInitialization
public void afterInitialization() {
    authenticationServiceCaller.call(new RemoteCallback<User>() {
        @Override
        public void callback(User user) {
            Label userLabel = new Label(
                    "User logged in: username=" + user.getIdentifier() + ", roles=" + user.getRoles());
            RootPanel.get().add(userLabel);
            SimplePanel panel = new SimplePanel();
            Anchor logoutLink = new Anchor("Spring Security Logout URL", GWT.getHostPageBaseURL() + "logout");
            panel.add(logoutLink);
            RootPanel.get().add(panel);
            initBtns();
        }
    }).getUser();
}
 
开发者ID:expansel,项目名称:errai-spring-boot-sample,代码行数:17,代码来源:App.java

示例2: 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);
		}
	});
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:18,代码来源:SaveDatasetPanel.java

示例3: MockBall

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
/**
 * Creates a new MockBall component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockBall(SimpleEditor editor) {
  super(editor, TYPE, images.ball());

  // Initialize mock ball UI
  ballWidget = new SimplePanel();
  ballWidget.setStylePrimaryName("ode-SimpleMockComponent");

  // Create an appropriately sized ball
  canvas = new GWTCanvas(diameter, diameter);
  canvas.setPixelSize(diameter, diameter);
  canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
  fillCircle();
  ballWidget.setWidget(canvas);

  initComponent(ballWidget);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:22,代码来源:MockBall.java

示例4: Thumb

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
public Thumb() {
	visibleThumb = new SimplePanel();
	Element visibleElem = visibleThumb.getElement();
	Element touchElem = getElement();
	
	visibleThumb.setStylePrimaryName(THUMB_CLASS_NAME);
	
	BrowserUtils.setStyleAttributeAllBrowsers(visibleElem, "boxSizing", "border-box");
	BrowserUtils.setStyleAttributeAllBrowsers(touchElem, "boxSizing", "border-box");

	this.setWidget(visibleThumb);
	
	if (!isPassive)
	{
		visibleThumb.addStyleName(INTERACTIVE_CLASS_NAME);
	}
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:18,代码来源:SliderComponent.java

示例5: onKeyDown

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
@Override
public void onKeyDown(KeyDownEvent keyDownEvent) {

    if (keyDownEvent.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {

        SimplePanel panel = WidgetUtil.findWidget(WidgetUtil.getFocusedElement(), SimplePanel.class);

        if (panel != null) {
            WidgetUtil.focus(panel.getParent().getElement());

            // prevent further bubbling of the event as it has only
            // navigational purpose if thrown at this depth. A subsequent
            // press of ESC is not stopped, so ESC abort actions of the
            // application should work as soon as the focus is in
            // "navigational mode" on a grid-cell
            keyDownEvent.preventDefault();
            keyDownEvent.stopPropagation();
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:21,代码来源:EscKeyDownHandler.java

示例6: render

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
                   final SimplePanel panel) {
    if (componentConnector != null) {

        // render chart widgets deferred so measurements are correct. Do not render
        // normal component widgets deferred as it causes some flicker when rerendering the grid
        if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    panel.setWidget(componentConnector.getWidget());
                }
            });
        } else {
            panel.setWidget(componentConnector.getWidget());
        }
    } else {
        panel.clear();
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:ComponentRenderer.java

示例7: setNodeWidget

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
public void setNodeWidget(Widget nodeWidget) {
    this.nodeWidget = nodeWidget;

    addStyleName(CLASSNAME);

    nodeCaptionDiv = DOM.createDiv();
    nodeCaptionDiv.setPropertyString("className", CLASSNAME + "-caption");

    Element wrapper = DOM.createDiv();
    nodeCaptionSpan = DOM.createSpan();
    DOM.appendChild(getElement(), nodeCaptionDiv);
    DOM.appendChild(nodeCaptionDiv, wrapper);
    DOM.appendChild(wrapper, nodeCaptionSpan);

    if (BrowserInfo.get().isOpera()) {
        /*
         * Focus the caption div of the node to get keyboard navigation
         * to work without scrolling up or down when focusing a node.
         */
        nodeCaptionDiv.setTabIndex(-1);
    }

    FlowPanel nodeContent = new FlowPanel();
    nodeContent.setStylePrimaryName(CLASSNAME + "-content");
    setWidget(nodeContent);

    nodeWidgetRoot = new SimplePanel();
    nodeWidgetRoot.setStylePrimaryName(CLASSNAME + "-widget");
    nodeWidgetRoot.setWidget(nodeWidget);
    nodeContent.add(nodeWidgetRoot);

    childNodeContainer = new FlowPanel();
    childNodeContainer.setStyleName(CLASSNAME + "-children");
    nodeContent.add(childNodeContainer);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:36,代码来源:CubaWidgetsTreeWidget.java

示例8: createIconWidget

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
/**
 * Create icon wrapper that contains an icon.
 *
 * @return {@link SimplePanel} as icon wrapper
 */
private SimplePanel createIconWidget() {
  SimplePanel iconWrapper = new SimplePanel();
  iconWrapper.setStyleName(resources.notificationCss().notificationPopupIconWrapper());
  iconWrapper.ensureDebugId(ICON_DBG_ID + notification.getId());
  return iconWrapper;
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:NotificationPopup.java

示例9: 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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:NotificationContainerItem.java

示例10: render

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
                   final SimplePanel panel)
{
    if (componentConnector != null) {

        // render chart widgets deferred so measurements are correct. Do not render
        // normal component widgets deferred as it causes some flicker when rerendering the grid
        if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    panel.setWidget(componentConnector.getWidget());
                }
            });
        } else {
            panel.setWidget(componentConnector.getWidget());
        }
    } else {
        panel.clear();
    }
}
 
开发者ID:datenhahn,项目名称:componentrenderer,代码行数:23,代码来源:ComponentRenderer.java

示例11: RolePropertyPage

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
public RolePropertyPage() {
	HorizontalPanel toolbar = new HorizontalPanel();
	toolbar.add( new Button( "Add User", new ClickHandler() {
		@Override
		public void onClick( ClickEvent event ) {
			onNewUserClicked();
		}
	} ) );
	
	userList = new UserList("");
	
	DockPanel dock = new DockPanel();
	dock.add( toolbar,DockPanel.NORTH );
	dock.add( userList, DockPanel.CENTER );
	
	tabPanel.add( new SimplePanel(), "Role Properties" );
	tabPanel.add( dock, "Users" );
	
	panel.setWidget( tabPanel );
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:21,代码来源:RolePropertyPage.java

示例12: generateLegend

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
protected void generateLegend(int i, String ras) {
	String c = "col" + i;
	HTMLPanel html = new HTMLPanel("<span id='" + c + "'></span>");
	SimplePanel p = new SimplePanel();
	p.setSize("20px", "20px");
	p.getElement().getStyle().setBackgroundColor(colorsArray[i]);
	p.setStyleName("colorBox");
	HorizontalPanel hp = new HorizontalPanel();
	hp.setStyleName("margin-bottom");
	hp.add(p);
	String htmlString = "<b>" + ras + "</b>";
	HTMLPanel htm = new HTMLPanel( htmlString );
	hp.add(htm);
	html.add(hp, c);
	legend.add(html);
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:17,代码来源:ComparisonPanel.java

示例13: generateIndicatorWidget

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
protected Widget generateIndicatorWidget(JSONObject v) {
	VerticalPanel panel = new VerticalPanel();
	GaugeImage img = new GaugeImage();
	img.setEvidence( v.get( "p" ).isString().stringValue(), v.get( "m" ).isString().stringValue() );
	SimplePanel pp = new SimplePanel();
	pp.setWidget(img);
	pp.setStyleName("contentResultsTable");
	panel.add(pp);
	panel.add( new HTML( 
			"Exposure: <font color='red'>" + 
					v.get( "e" ).isObject().get( "e" ).isNumber().doubleValue() +
			"</font>") );
	panel.setStyleName("headerTable");
	panel.setHeight("100%");
	return panel;
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:17,代码来源:ComparisonPanel.java

示例14: makeUI

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
public Widget makeUI() {
    final SimplePanel panel = new SimplePanel();
    GwtUtil.setStyle(panel, "lineHeight", "100px");

    UserServices.App.getInstance().getMissionConfig("planck", new BaseCallback() {
        @Override
        public void doSuccess(Object result) {
            MissionTag dt = (MissionTag) result;
            List<ImageSetTag> iltag = dt.getImagesetList();
            if (iltag.size() > 0) {
                FormTag ftag = iltag.get(0).getForm();
                Form form = GwtUtil.createSearchForm(ftag, null, null);
                form.setStyleName("shadow");
                panel.add(form);
            }
        }
    });

    return GwtUtil.wrap(panel, 50, 50, 50, 20);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:21,代码来源:DummyInventoryUI.java

示例15: makeUI

import com.google.gwt.user.client.ui.SimplePanel; //导入依赖的package包/类
public Widget makeUI() {
    spacialArea= new SpacialSelectUI(new SpacialSelectUI.TabChange() {
                public void onTabChange() {
                    adjustSpacialHeight();
                }
            });
    spacialArea.setSpacialOptions(new HashSet<SpacialType>(Arrays.asList(SpacialType.Cone, SpacialType.Box)), DataSetInfo.DataTypes.CATALOGS);
    spacialArea.updateSearchMax(3600);
    mainPanel.setSize("100%", "100%");

    topArea= new DockLayoutPanel(Style.Unit.PX);
    Widget spacialAreaWrap= new SimplePanel(spacialArea);
    topArea.add(spacialAreaWrap);
    mainPanel.addNorth(topArea, spacialArea.getHeightRequired());
    DOM.getParent(topArea.getElement()).addClassName("change-height-transition");
    return mainPanel;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:18,代码来源:LSSTCatalogSearchUI.java


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