• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LayoutPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: EditorMultiPartStackViewImpl

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
@Inject
public EditorMultiPartStackViewImpl(
    SplitEditorPartViewFactory splitEditorPartViewFactory,
    EmptyEditorsPanel emptyEditorsPanel,
    EditorPlaceholderWidget editorPlaceholderWidget) {
  this.splitEditorPartViewFactory = splitEditorPartViewFactory;
  this.emptyEditorsPanel = emptyEditorsPanel;
  this.splitEditorParts = HashBiMap.create();
  this.editorPlaceholderWidget = editorPlaceholderWidget;

  contentPanel = new LayoutPanel();
  contentPanel.setSize("100%", "100%");
  contentPanel.ensureDebugId("editorMultiPartStack-contentPanel");
  initWidget(contentPanel);
  contentPanel.add(emptyEditorsPanel);
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:EditorMultiPartStackViewImpl.java


示例2: onModuleLoad

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
/**
 * Entry point for the application.
 */
@Override
public void onModuleLoad() {
  projectService = GWT.create(ProjectRpc.class);
  userService = GWT.create(UserRpc.class);
  dataService = GWT.create(DataRpc.class);

  contentPanel = new LayoutPanel();
  RootLayoutPanel.get().add(contentPanel);

  // Handle history changes. (Such as clicking a navigation hyperlink.)
  History.addValueChangeHandler(new ValueChangeHandler<String>() {
    @Override
    public void onValueChange(ValueChangeEvent<String> event) {
      String historyToken = event.getValue();
      handleUrl(historyToken);
    }
  });

  handleUrl(History.getToken());
}
 
开发者ID:rodion-goritskov,项目名称:test-analytics-ng,代码行数:24,代码来源:TaEntryPoint.java


示例3: GwtRulerComposite

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param parent
 *            a widget which will be the parent of the new instance (cannot
 *            be null)
 * @param style
 *            the style of widget to construct
 * @see Composite#Composite(org.eclipse.swt.widgets.Composite, int)
 */
// public GwtRulerComposite(Composite parent, int style) {
// super(parent, style);
// addDisposeListener(new DisposeListener() {
// public void widgetDisposed(DisposeEvent e) {
// disposeResources();
// }
// });
// }

public GwtRulerComposite(LayoutPanel element) {
	super(null, SWT.NONE);
	this.rootElement = element;
	// create dock panel here with rulers
	dockLayoutPanel = new DockLayoutPanel(Unit.PX);
	dockLayoutPanel.getElement().setId("INNER_DOCK_LAYOUT_PANEL");
	rootElement.add(dockLayoutPanel);

	northPanel = new DockLayoutPanel(Unit.PX);
	northPanel.getElement().setId("NORTH_DOCK_LAYOUT_PANEL");
	dockLayoutPanel.addNorth(northPanel, 19);

	northPanel.addWest(createPickle(), 19);

	topPartInDockPanel = new Composite(null, SWT.NONE);
	LayoutPanel topPanel = (LayoutPanel) topPartInDockPanel
			.getNativeWidget();
	topPanel.getElement().setId("TOP_RULER");
	northPanel.add(topPanel);
	northPanel.forceLayout();

	westPartInDockPanel = new Composite(null, SWT.NONE);
	westPanel = (LayoutPanel) westPartInDockPanel.getNativeWidget();
	westPanel.getElement().setId("LEFT_RULER");
	dockLayoutPanel.addWest(westPanel, 19);

	view = (LayoutPanel) getGwtWidget();
	dockLayoutPanel.add(view);
	dockLayoutPanel.forceLayout();
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:50,代码来源:GwtRulerComposite.java


示例4: onResize

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
@Override
public void onResize() {
	final Element realParent = (Element) ((LayoutPanel) canvas.getParent())
			.getWidgetContainerElement(canvas);

	int pw = realParent.getClientWidth();
	int ph = realParent.getClientHeight();

	// in case of trouble :)
	// canvas.setPixelSize(pw, ph);

	canvas.setCoordinateSpaceWidth(pw);
	canvas.setCoordinateSpaceHeight(ph);

	canvas.getElement().getStyle().setProperty("DIRTY", "dirty");

	IFigure rootFigure = getLightweightSystem().getRootFigure();
	rootFigure.revalidate();
	rootFigure.repaint();
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:21,代码来源:FigureCanvas.java


示例5: Text

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public Text(Composite parent, int style) {
	this(new TextArea(), parent, style);
	textArea = (TextArea) getGwtWidget();
	panel = (LayoutPanel) getParent().getGwtWidget().getParent();
	panel.add(textArea);
	textArea.addBlurHandler(new BlurHandler() {

		@Override
		public void onBlur(BlurEvent event) {
			setText(textArea.getText());
			textArea.removeFromParent();
			sendEvent(SWT.Modify);
			sendEvent(SWT.FocusOut);
		}
	});
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:17,代码来源:Text.java


示例6: ViewWithToolbar

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public ViewWithToolbar(final PartStackUIResources resources) {
    container = new DockLayoutPanel(Style.Unit.PX);
    initWidget(container);
    container.setSize("100%", "100%");
    toolBar = new LayoutPanel();
    toolBar.addStyleName(resources.partStackCss().ideBasePartToolbar());
    container.addNorth(toolBar, 20);

    // this hack used for adding box shadow effect to toolbar
    toolBar.getElement().getParentElement().getStyle().setOverflow(Style.Overflow.VISIBLE);
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:12,代码来源:ViewWithToolbar.java


示例7: testPanels

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
@Test
public void testPanels() throws Exception {
  invokeAllAccessibleMethods(new AbsolutePanel() {});
  invokeAllAccessibleMethods(new CellPanel() {});
  invokeAllAccessibleMethods(new ComplexPanel() {});
  invokeAllAccessibleMethods(new DeckLayoutPanel() {});
  invokeAllAccessibleMethods(new DeckPanel() {});
  invokeAllAccessibleMethods(new DecoratorPanel() {});
  invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
  invokeAllAccessibleMethods(new DockPanel() {});
  invokeAllAccessibleMethods(new FlowPanel() {});
  invokeAllAccessibleMethods(new FocusPanel() {});
  invokeAllAccessibleMethods(new HorizontalPanel() {});
  invokeAllAccessibleMethods(new HTMLPanel("") {});
  invokeAllAccessibleMethods(new LayoutPanel() {});
  invokeAllAccessibleMethods(new PopupPanel() {});
  invokeAllAccessibleMethods(new RenderablePanel("") {});
  invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
  invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
  invokeAllAccessibleMethods(new SimplePanel() {});
  invokeAllAccessibleMethods(new SplitLayoutPanel() {});
  invokeAllAccessibleMethods(new StackPanel() {});
  invokeAllAccessibleMethods(new VerticalPanel() {});
}
 
开发者ID:google,项目名称:gwtmockito,代码行数:25,代码来源:GwtMockitoWidgetBaseClassesTest.java


示例8: Timeline

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public Timeline(Canvas canvas, ScrollPanel scroll, LayoutPanel viewPanel) {
	logger.setLevel(Level.INFO);

	this.canvas = canvas;
	this.scroll = scroll;
	this.viewPanel = viewPanel;

	landmarks = new Vector<Landmark>();
	landmarkbars = new Vector<LandmarkBar>();

	startTime = new Date();
	currentTime = new Date();

	lenghtOfAMinute = 1000;

	color = CssColor.make("rgba(" + 0 + ", " + 0 + "," + 255 + ", " + 1
			+ ")");

	canvas.setWidth(minWidth + "px");
	canvas.setCoordinateSpaceWidth(minWidth);

	canvas.setHeight(minHeight + "px");
	canvas.setCoordinateSpaceHeight(minHeight);

	timer = new Timer() {
		@Override
		public void run() {
			updateTime();
			drawTimeline();
		}
	};
	timer.scheduleRepeating(5000);

	updateTime();
	drawTimeline();
}
 
开发者ID:metafora-project,项目名称:ReflectionTool,代码行数:37,代码来源:Timeline.java


示例9: onLoad

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

	LayoutPanel layoutPanel = new LayoutPanel();
	controller = new ReportingController(eventBus, rpcService);
	layoutPanel.add(controller.createView());
	ReportingPresenter reportingPresenter = controller.getPresenter();
	reportingPresenter.bind();

	final RootPanel rootPanel = new RootPanel(layoutPanel, rpcService);

	rootPanel.getHeader().addTab("Batch Class Management", "BatchClassManagement.html", false);
	rootPanel.getHeader().addTab("Batch Instance Management", "BatchInstanceManagement.html", false);
	rootPanel.getHeader().addTab("Workflow Management", "CustomWorkflowManagement.html", false);
	rootPanel.getHeader().addTab("Folder Management", "FolderManager.html", false);
	rootPanel.getHeader().addNonClickableTab("Reports", "Reporting.html");
	rootPanel.getHeader().getTabBar().selectTab(4);
	rootPanel.addStyleName("set_position");
	rootPanel.getHeader().setEventBus(eventBus);

	rpcService.getUserName(new EphesoftAsyncCallback<String>() {

		@Override
		public void onSuccess(final String userName) {
			rootPanel.getHeader().setUserName(userName);
		}

		@Override
		public void customFailure(final Throwable arg0) {
			// Username cannot be set if the call failed.
		}
	});

	RootLayoutPanel rootLayoutPanel = RootLayoutPanel.get();
	rootLayoutPanel.clear();
	rootLayoutPanel.add(rootPanel);

}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:39,代码来源:ReportingEntryPoint.java


示例10: SplitLayoutPanelView

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public SplitLayoutPanelView() {
    layout = new SplitLayoutPanel(2);

    centerPanel = new LayoutPanel();
    westPanel = new LayoutPanel();

    // TODO (hbraun): the actual width should become meta data. i.e. passed through the position object
    layout.addWest(westPanel,
                   217);
    layout.add(centerPanel);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:12,代码来源:SplitLayoutPanelView.java


示例11: GWTPTabPanel

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
/**
 * Create a new GWTPTabPanel.
 * 
 * @param placeManager the place manager to use when processing tab
 *            selections.
 */
public GWTPTabPanel(final PlaceManager placeManager) {
    _layout = new LayoutPanel();
    _layout.addStyleName("fill-layout"); //$NON-NLS-1$

    _tabBar = new DefaultTabLayoutPanel(40, Unit.PX);
    // _tabBar = new TabBar();
    _tabBar.addSelectionHandler(new SelectionHandler<Integer>() {
        @Override
        public void onSelection(SelectionEvent<Integer> event) {
            if (_modifyingTabs) {
                // add/remove tab may change the selection
                return;
            }
            if (event.getSelectedItem() < 0) {
                // TODO: WHAT????
                return;
            }
            final PlaceRequest current = placeManager.getCurrentPlaceRequest();
            final String selectedToken = _tabs.get(event.getSelectedItem()).getTargetHistoryToken();
            final String currentToken = current == null ? null : current.getNameToken();
            if (!selectedToken.equals(currentToken)) {
                placeManager.revealPlace(new PlaceRequest(selectedToken));
            }
        }
    });

    _content = new LayoutPanel();
    _content.setStyleName("fill-layout"); //$NON-NLS-1$

    _layout.add(_tabBar);
    _layout.add(_content);

    ((LayoutPanel) _layout).setWidgetTopHeight(_tabBar, 0, Unit.PX, 40, Unit.PX);
    ((LayoutPanel) _layout).setWidgetTopHeight(_content, 40, Unit.PX, 100, Unit.PCT);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:42,代码来源:GWTPTabPanel.java


示例12: createPickle

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
private LayoutPanel createPickle() {
	LayoutPanel pickle = new LayoutPanel();
	pickle.getElement().setId("PICKLE");
	pickle.setPixelSize(19, 19);
	Style style = pickle.getElement().getStyle();
	style.setBackgroundColor("rgb(230,230,230)");
	return pickle;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:9,代码来源:GwtRulerComposite.java


示例13: propertyChange

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
	com.google.gwt.canvas.client.Canvas canvas = (com.google.gwt.canvas.client.Canvas) getNativeWidget();
	LayoutPanel canvasParent = (LayoutPanel) canvas.getParent();
	if (isInPalette(canvas)) {
		return;
	}
	int defWidth = canvasParent.getOffsetWidth();
	RangeModel model = (RangeModel) evt.getSource();
	int maxVal = model.getMaximum();
	int minVal = model.getMinimum();
	int value = model.getValue();
	int size = maxVal - minVal;
	LayoutPanel simplePanel = getSimplePanel();
	simplePanel.setWidth(size + "px");
	ScrollPanel parent = (ScrollPanel) simplePanel.getParent();
	Element canvasContainerElement = canvasParent
			.getWidgetContainerElement(canvas);
	if ((minVal < 0 || maxVal > defWidth) && defWidth > 0
			&& scrollbarsVisible == false) {
		canvasContainerElement.getStyle().setBottom(SCROLL_SIZE,
				Unit.PX);
		onResize();
		scrollbarsVisible = true;
	} else if (minVal >= 0 && maxVal <= defWidth
			&& scrollbarsVisible == true) {
		canvasContainerElement.getStyle().setBottom(0, Unit.PX);
		onResize();
		scrollbarsVisible = false;
	}
	parent.setHorizontalScrollPosition(value - minVal);
	// There is a missing event that isn't sent:
	scroll(parent);
	getLightweightSystem().getRootFigure().repaint();
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:36,代码来源:FigureCanvas.java


示例14: MenuOneLevelView

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public MenuOneLevelView(LayoutPanel parent, int level, boolean hiddenMenu) {
    this.hiddenMenu = hiddenMenu;
    getElement().setId("OneLevel-" + level);
    parent.add(this);
    menu.addStyleName(ResourceHelper.getRes().style().menu());
    menuBorder.addStyleName(ResourceHelper.getRes().style().menuBorder());
    menu.getElement().setId("OneLevel-" + level + "-Menu");
    getElement().getStyle().setOverflow(Overflow.VISIBLE);
    init();
}
 
开发者ID:inepex,项目名称:ineform,代码行数:11,代码来源:MenuOneLevelView.java


示例15: TabLayoutPanelCopy

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
/**
  * Creates an empty tab panel.
  *
  * @param barHeight the size of the tab bar
  * @param barUnit the unit in which the tab bar size is specified
  */
 public TabLayoutPanelCopy(double barHeight, Unit barUnit) {
   LayoutPanel panel = new LayoutPanel();
   initWidget(panel);

   // Add the tab bar to the panel.
   panel.add(tabBar);
   panel.setWidgetLeftRight(tabBar, 0, Unit.PX, 0, Unit.PX);
   panel.setWidgetTopHeight(tabBar, 0, Unit.PX, barHeight, barUnit);
   panel.setWidgetVerticalPosition(tabBar, Alignment.END);

   // Add the deck panel to the panel.
   // CHANGE4: styles again: deckPanel.addStyleName(CONTENT_CONTAINER_STYLE);
   panel.add(deckPanel);
   panel.setWidgetLeftRight(deckPanel, 0, Unit.PX, 0, Unit.PX);
   panel.setWidgetTopBottom(deckPanel, barHeight, barUnit, 0, Unit.PX);

   // Make the tab bar extremely wide so that tabs themselves never wrap.
   // (Its layout container is overflow:hidden)

// CHANGE5: Adapt the TabBar Style element to our needs
   Style tabBarStyle = tabBar.getElement().getStyle();
   tabBarStyle.setHeight(barHeight, barUnit);
   tabBarStyle.setWidth(BIG_ENOUGH_TO_NOT_WRAP, Unit.PX);

// CHANGE6: We don't want the standard GWT styles
   // tabBar.setStyleName("gwt-TabLayoutPanelTabs");
   // setStyleName("gwt-TabLayoutPanel");
 }
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:35,代码来源:TabLayoutPanelCopy.java


示例16: getLayoutPanel

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public LayoutPanel getLayoutPanel() {
	return layoutPanel;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:4,代码来源:MonitorView.java


示例17: setLayoutPanel

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public void setLayoutPanel(LayoutPanel layoutPanel) {
	this.layoutPanel = layoutPanel;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:4,代码来源:MonitorView.java


示例18: getReportTablePanel

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
public LayoutPanel getReportTablePanel() {
	return reportTablePanel;
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:4,代码来源:ReportingView.java


示例19: getLayoutPanel

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
/**
 * @return the layoutPanel
 */
public LayoutPanel getLayoutPanel() {
	return layoutPanel;
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:7,代码来源:DependencyManagementView.java


示例20: LayoutPanelView

import com.google.gwt.user.client.ui.LayoutPanel; //导入依赖的package包/类
@Inject
public LayoutPanelView() {
    layout = new LayoutPanel();
    layout.setStyleName("fill-layout");
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:LayoutPanelView.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AuthoritiesExtractor类代码示例发布时间:2022-05-21
下一篇:
Java GeneralSwipeAction类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap