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