當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。