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


Java DockLayoutPanel.addWest方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.DockLayoutPanel.addWest方法的典型用法代码示例。如果您正苦于以下问题:Java DockLayoutPanel.addWest方法的具体用法?Java DockLayoutPanel.addWest怎么用?Java DockLayoutPanel.addWest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.DockLayoutPanel的用法示例。


在下文中一共展示了DockLayoutPanel.addWest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GwtRulerComposite

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的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

示例2: ShellView

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的package包/类
public ShellView() {
  shell = new DockLayoutPanel(Style.Unit.PX);

  header = new SimpleLayoutPanel();
  navigation = new SimpleLayoutPanel();
  content = new SimpleLayoutPanel();

  shell.addNorth(header, 75);
  shell.addWest(navigation, 275);
  shell.add(content);

  initWidget(shell);
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:14,代码来源:ShellView.java

示例3: addPreviewTab

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的package包/类
protected void addPreviewTab() {
	DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
	Button b = new Button("Save!", new ClickHandler() {
	      public void onClick(ClickEvent event) {
	        Window.alert("This will save...");
	      }
	    });
	p.addNorth(new HTML("header"), 2);
	p.addSouth(new HTML("footer"), 2);
	p.addWest(b, 10);
	p.add(new HTML("Here we will display the preview"));
	p.setWidth(Window.getClientWidth()/5*4+"px");
	p.setHeight(Window.getClientHeight()/5*4+"px");
	main.add(p, "preview & save");
}
 
开发者ID:metafora-project,项目名称:CAVilLag,代码行数:16,代码来源:CAVilLag.java

示例4: ExtendedDockPanel

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的package包/类
/**
 * Extended dock panel
 */
public ExtendedDockPanel() {
	dockPanel = new DockLayoutPanel(Unit.PX);
	folderSelectPopup = new FolderSelectPopup();
	enableKeyShorcuts();

	// Object initialization
	topPanel = new TopPanel();
	leftBorderPanel = new VerticalBorderPanel();
	rightBorderPanel = new VerticalBorderPanel();
	bottomPanel = new BottomPanel();

	// Desktop panels initialization
	desktop = new Desktop();

	// Search panels initialization
	search = new Search();

	// Dashboard panel initialization
	dashboard = new Dashboard();

	// Administration panel initialization
	administration = new Administration();

	// set inner component's size
	setWidgetsSize();

	actualView = UIDockPanelConstants.DESKTOP;

	// Creates the dockPanel
	dockPanel.addNorth(topPanel, TopPanel.PANEL_HEIGHT);
	dockPanel.addSouth(bottomPanel, BottomPanel.PANEL_HEIGHT);
	dockPanel.addWest(leftBorderPanel, VERTICAL_BORDER_PANEL_WIDTH);
	dockPanel.addEast(rightBorderPanel, VERTICAL_BORDER_PANEL_WIDTH);
	dockPanel.add(desktop);

	Window.addResizeHandler(new ResizeHandler() {
		@Override
		public void onResize(ResizeEvent event) {
			setWidgetsSize();
			Main.get().mainPanel.topPanel.toolBar.windowResized(); // splitter changes
		}
	});

	initWidget(dockPanel);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:49,代码来源:ExtendedDockPanel.java

示例5: onModuleLoad

import com.google.gwt.user.client.ui.DockLayoutPanel; //导入方法依赖的package包/类
/**
 * This is the entry point method.
 */
@Override
public void onModuleLoad() {
    DebugInfo.setDebugIdPrefix("");
    GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        @Override
        public void onUncaughtException(final Throwable e) {
            GWT.log("Uncaught error", e);
            Window.alert("Error. Go to see the logs");
        }
    });

    DockLayoutPanel container = new DockLayoutPanel(Unit.PX);
    container.setSize("100%", "100%");

    container.addNorth(new Label("GWT-D3 : A thin GWT wrapper around D3.",
            false), 20);
    container.addNorth(new Label("D3 API version: " + D3.version(), false),
            20);

    FlowPanel p = new FlowPanel();
    ComplexPanel buttonContainer = new VerticalPanel();
    buttonContainer.add(new TestButton());
    // TODO no sliders !
    // buttonContainer.add(new DemoButton("Arc", ArcDemo.factory()));
    buttonContainer.add(new DemoButton("Axis Component", AxisComponent.factory()));
    buttonContainer.add(new DemoButton("Line Demo", LineDemo.factory()));
    buttonContainer.add(new DemoButton("Symbol Demo", SymbolDemo.factory()));
    buttonContainer.add(new DemoButton("General Update Pattern I", GeneralUpdatePattern1.factory()));
    buttonContainer.add(new DemoButton("General Update Pattern II", GeneralUpdatePattern2.factory()));
    buttonContainer.add(new DemoButton("General Update Pattern III", GeneralUpdatePattern3.factory()));
    buttonContainer.add(new DemoButton("Arc Tween", ArcTween.factory()));
    buttonContainer.add(new DemoButton("Focus And Context", FocusAndContext.factory()));
    buttonContainer.add(new DemoButton("Chord diagram", ChordDiagram.factory()));
    buttonContainer.add(new DemoButton("Lorenz System", LorenzSystem.factory()));

    // TODO no sliders !
    // buttonContainer.add(new DemoButton("Shape Tweening",
    // ShapeTweeningDemo.factory()));
    // GEOM
    buttonContainer.add(new DemoButton("Convex Hull", HullDemo.factory()));
    buttonContainer.add(new DemoButton("Mitchell's Best Candidate", MitchellBestCandidate.factory()));
    buttonContainer.add(new DemoButton("Voronoi Tessellation", VoronoiTessellationDemo.factory()));

    buttonContainer.add(new DemoButton("Drag Multiples", DragMultiples.factory()));
    buttonContainer.add(new DemoButton("Zoom", ZoomDemo.factory()));

    buttonContainer.add(new DemoButton("Cluster Dendogram", ClusterDendogram.factory()));
    buttonContainer.add(new DemoButton("Radial Reingold–Tilford Tree", RadialReingoldTilfordTree.factory()));
    // BRUSHES
    buttonContainer.add(new DemoButton("Brush As Slider", BrushAsSliderDemo.factory()));
    buttonContainer.add(new DemoButton("Scatterplot Matrix Brushing", ScatterplotMatrixDemo.factory()));
    buttonContainer.add(new DemoButton("Ordinal Brushing", OrdinalBrushingDemo.factory()));
    buttonContainer.add(new DemoButton("Brush Transitions", BrushTransitionsDemo.factory()));

    p.add(buttonContainer);
    container.addWest(p, 200);

    demoContainer = new FlowPanel();
    demoContainer.ensureDebugId(D3Demo.DEMO_CONTAINER_ID);
    demoContainer.setSize("100%", "100%");
    demoContainer.getElement().getStyle().setOverflow(Overflow.AUTO);
    container.add(demoContainer);

    RootLayoutPanel.get().add(container);

    container.forceLayout();
}
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:71,代码来源:D3Demo.java


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