Example usage for com.google.gwt.user.client.ui SplitLayoutPanel addSouth

List of usage examples for com.google.gwt.user.client.ui SplitLayoutPanel addSouth

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui SplitLayoutPanel addSouth.

Prototype

public void addSouth(Widget widget, double size) 

Source Link

Document

Adds a widget to the south edge of the dock.

Usage

From source file:com.google.gwt.sample.showcase.client.content.panels.CwSplitLayoutPanel.java

License:Apache License

/**
 * Initialize this example./*from  w  ww .java2 s  .  com*/
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
    // Create a Split Panel
    SplitLayoutPanel splitPanel = new SplitLayoutPanel(5);
    splitPanel.ensureDebugId("cwSplitLayoutPanel");
    splitPanel.getElement().getStyle().setProperty("border", "3px solid #e7e7e7");

    // Add text all around.
    splitPanel.addNorth(new Label(constants.cwSplitLayoutPanelNorth1()), 50);
    splitPanel.addSouth(new Label(constants.cwSplitLayoutPanelSouth1()), 50);
    splitPanel.addEast(new Label(constants.cwSplitLayoutPanelEast()), 100);
    splitPanel.addWest(new Label(constants.cwSplitLayoutPanelWest()), 100);
    splitPanel.addNorth(new Label(constants.cwSplitLayoutPanelNorth2()), 50);
    splitPanel.addSouth(new Label(constants.cwSplitLayoutPanelSouth2()), 50);

    // Add scrollable text to the center.
    String centerText = constants.cwSplitLayoutPanelCenter();
    for (int i = 0; i < 3; i++) {
        centerText += " " + centerText;
    }
    Label centerLabel = new Label(centerText);
    ScrollPanel centerScrollable = new ScrollPanel(centerLabel);
    splitPanel.add(centerScrollable);

    // Return the content
    return splitPanel;
}

From source file:edu.caltech.ipac.firefly.ui.previews.DataSourceCoveragePreview.java

public DataSourceCoveragePreview(DataSourceCoverageData covData) {
    super(covData.getTitle(), covData.getTip());
    _covData = covData;// w w  w  .ja  v  a  2  s. c om
    setName(covData.getTitle());
    String group = covData.getGroup();
    MiniPlotWidget mpw = new MiniPlotWidget(group);
    mpw.setImageSelection(true);
    mpw.setRemoveOldPlot(false);
    _plotDeck = new DisableablePlotDeckPanel(_prop.getName("noplot"), mpw, true);
    if (covData.getEnableDetails()) {
        _detailsView = new ScrollPanel(_details);
        SplitLayoutPanel display = new SplitLayoutPanel();
        display.addSouth(_detailsView, 120);
        GwtUtil.setStyle(_detailsView, "borderTop", "1px solid gray");
        GwtUtil.setStyle(_detailsView, "paddingTop", "3px");
        display.add(_plotDeck);
        setDisplay(display);
    } else {
        setDisplay(_plotDeck);
    }

}

From source file:org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator.java

License:Apache License

/**
 * onModuleLoad is the entry point method.
 *///from ww  w . jav a  2  s.c  o m
@SuppressWarnings("deprecation")
public void onModuleLoad() {

    widgets = new ArrayList<NodeWidget>();
    nodeCount = new EnumMap<OozieWorkflowGenerator.NodeType, Integer>(NodeType.class);

    // start DiagramController (gwt-links library)
    controller = new OozieDiagramController(1300, 600);
    //controller.showGrid(true); // Display a background grid

    // start PickUpDragContoller (gwt-Drag-and-Drop library)
    dragController = new PickupDragController(controller.getView(), true);

    // register the dragController in GWT-Links
    controller.registerDragController(dragController);

    // panel for Property Table
    propPanel = new AbsolutePanel();

    // stack Layout for left-side tree-view
    StackLayoutPanel stack = new StackLayoutPanel(Unit.EM);

    // create left tree-view panel
    stack.add(initNodeTree(), new HTML("Nodes"), 2);
    stack.add(initWrkflowTree(), new HTML("Workflow"), 2);

    initWidget();

    // Create a three-pane layout with splitters.
    SplitLayoutPanel p = new SplitLayoutPanel();

    Panel east = new AbsolutePanel();

    // Create a top panel under menu to hold button (e.g, generate xml)
    AbsolutePanel btnpanl = new AbsolutePanel();
    Button btn = createXMLButton();
    btnpanl.add(btn);

    // p.addNorth(initMenu(), 30);
    // p.addEast(east, 250);

    p.addSouth(propPanel, 300);
    p.addWest(stack, 150);
    p.addSouth(btnpanl, 30);
    //((OozieDiagramController) controller).setXmlPanel(east);
    p.add(controller.getView());

    // Attach the LayoutPanel to the RootLayoutPanel.
    RootLayoutPanel rp = RootLayoutPanel.get();
    rp.add(p);

}

From source file:org.nuxeo.opensocial.container.client.view.FolderPickerWidget.java

License:Open Source License

private SplitLayoutPanel initSplitPanel() {
    SplitLayoutPanel splitPanel = new SplitLayoutPanel();
    splitPanel.setWidth("764px");
    splitPanel.setHeight("508px");

    splitPanel.addWest(initPreviewPanel(), 188);
    splitPanel.addSouth(initMenu(), 26);
    splitPanel.add(initFolderListPanel());

    return splitPanel;
}

From source file:org.pentaho.plugins.asd.client.ActionSequenceView.java

License:Open Source License

public void onModuleLoad() {
    ActionSequenceEditorPane editorPane = new ActionSequenceEditorPane(1, Unit.CM);

    SplitLayoutPanel splitPanel = new SplitLayoutPanel();
    splitPanel.addWest(new ActionPickerPane(editorPane.getCanvas()), 175);
    splitPanel.addSouth(new HTML("log"), 200);
    splitPanel.add(editorPane);/*from w  w w .j  a v a 2s  .c  o  m*/
    RootLayoutPanel.get().add(splitPanel);
}

From source file:org.rstudio.studio.client.application.ui.RequestLogVisualization.java

License:Open Source License

public RequestLogVisualization() {
    overviewPanel_ = new LayoutPanel();
    overviewPanel_.getElement().getStyle().setProperty("borderRight", "2px dashed #888");
    scrollPanel_ = new ScrollPanelWithClick(overviewPanel_);
    scrollPanel_.setSize("100%", "100%");
    scrollPanel_.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            detail_.setWidget(instructions_);
        }//from w w w .  j av a  2  s . c o  m
    });

    SplitLayoutPanel outerPanel = new SplitLayoutPanel();
    outerPanel.getElement().getStyle().setBackgroundColor("white");
    outerPanel.getElement().getStyle().setZIndex(500);
    outerPanel.getElement().getStyle().setOpacity(0.9);

    detail_ = new SimplePanel();
    detail_.getElement().getStyle().setBackgroundColor("#FFE");

    instructions_ = new HTML();
    instructions_.setHTML("<p>Click on a request to see details. Click on the "
            + "background to show these instructions again.</p>" + "<h4>Available commands:</h4>" + "<ul>"
            + "<li>Esc: Close</li>" + "<li>P: Play/pause</li>" + "<li>E: Export</li>" + "<li>I: Import</li>"
            + "<li>+/-: Zoom in/out</li>" + "</ul>");
    detail_.setWidget(instructions_);

    outerPanel.addSouth(detail_, 200);
    outerPanel.add(scrollPanel_);

    initWidget(outerPanel);

    handlerRegistration_ = Event.addNativePreviewHandler(this);

    timer_ = new Timer() {
        @Override
        public void run() {
            refresh(true, false);
        }
    };

    refresh(true, true);
}