Example usage for com.google.gwt.user.client.ui StackLayoutPanel StackLayoutPanel

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

Introduction

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

Prototype

public StackLayoutPanel(Unit unit) 

Source Link

Document

Creates an empty stack panel.

Usage

From source file:eml.studio.client.mvp.view.MonitorView.java

License:Open Source License

@Override
public Widget createMainLayout() {
    SplitLayoutPanel splitLayout = new SplitLayoutPanel();

    StackLayoutPanel stack = new StackLayoutPanel(Unit.EM);
    stack.setStyleName("sp");
    ScrollPanel leftcrp = new ScrollPanel();
    leftcrp.setSize("100%", "100%");
    VerticalPanel vPanel = new VerticalPanel();
    vPanel.setWidth("100%");

    programTree = ProgramTreeLoader.load(AppController.email);
    datasetTree = DatasetTreeLoader.load(AppController.email);
    jobTree = JobTreeLoader.load(AppController.email);
    resultTree = new SearchTree();
    initTabPanel();/*  w  w w  . jav  a2  s  .c o m*/
    DisclosurePanel distackleft = new DisclosureStackPanel("Search").asWidget();
    searchGrid = new SearchGrid(programTree, datasetTree, jobTree, resultTree);
    distackleft.setContent(searchGrid);
    SimplePanel tabSimPanel = new SimplePanel();
    tabSimPanel.add(tabPanel);

    vPanel.add(tabSimPanel);
    vPanel.add(distackleft);
    leftcrp.add(vPanel);
    stack.add(leftcrp, "", 0);

    StackLayoutPanel stackright = new StackLayoutPanel(Unit.EM);
    stackright.setStyleName("sp");
    DisclosurePanel distackright1 = new DisclosureStackPanel(Constants.studioUIMsg.jobPanelTitle()).asWidget();
    DisclosurePanel distackright2 = new DisclosureStackPanel(Constants.studioUIMsg.modulePanelTitle())
            .asWidget();
    ScrollPanel scvp = new ScrollPanel();
    VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.setWidth("100%");

    HorizontalPanel btnPanel = new HorizontalPanel();
    historyBtn.removeStyleName("gwt-Button");
    historyBtn.addStyleName("history-button-style");
    submitBtn.setEnabled(false);
    submitBtn.removeStyleName("gwt-Button");
    submitBtn.addStyleName("button-style");
    clearBtn.removeStyleName("gwt-Button");
    clearBtn.addStyleName("button-style");
    cloneBtn.removeStyleName("gwt-Button");
    cloneBtn.addStyleName("button-style");
    refreshBtn.removeStyleName("gwt-Button");
    refreshBtn.addStyleName("button-style");
    stopBtn.removeStyleName("gwt-Button");
    stopBtn.addStyleName("button-style");

    btnPanel.add(historyBtn);
    btnPanel.add(new HTML("  "));
    btnPanel.add(submitBtn);
    btnPanel.add(new HTML("  "));
    btnPanel.add(clearBtn);
    btnPanel.add(new HTML("  "));
    btnPanel.add(cloneBtn);
    btnPanel.add(new HTML("  "));
    btnPanel.add(stopBtn);
    btnPanel.add(new HTML("  "));
    btnPanel.add(refreshBtn);

    btnPanel2.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    btnPanel2.add(btnPanel);
    btnPanel2.addStyleName("btnPanel");

    splitLayout.addWest(stack, 200);

    jobDescGrid = new MonitorJobDescGrid();

    distackright1.setContent(jobDescGrid);
    distackright2.setContent(propPanel);
    verticalPanel.add(distackright1);
    verticalPanel.add(distackright2);
    scvp.add(verticalPanel);
    stackright.add(scvp, "", 0);
    splitLayout.addEast(stackright, 287);

    // Use different controllers in different classes
    setController(new MonitorController(Constants.CONTROLLER_WIDTH, Constants.CONTROLLER_HEIGHT));
    rebuiltLayoutPanel(getController());
    splitLayout.add(layoutPanel);

    return splitLayout;
}

From source file:es.upm.fi.dia.oeg.map4rdf.client.view.DashboardView.java

License:Open Source License

@Inject
public DashboardView(BrowserResources resources) {
    mapPanel = new LayoutPanel();
    splitPanel = new SplitLayoutPanel();
    leftPanel = new StackLayoutPanel(Unit.EM);
    centerPanel = new LayoutPanel();
    mainPopupPanel = new ScrollPanel();
    initWidget(createUi(resources));/*from   ww w .j  a v a  2s  .co m*/
}

From source file:net.cbtltd.client.form.LeaseForm.java

@Override
public void initialize() {
    AbstractField.CSS.ensureInjected();
    CSS.ensureInjected();/*from   w w  w  .j a  va2s  . c  om*/

    final ScrollPanel scroll = new ScrollPanel();
    add(scroll);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.addStyleName(AbstractField.CSS.cbtAbstractWidth());
    panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    scroll.add(panel);

    final HorizontalPanel content = new HorizontalPanel();
    panel.add(content);

    createActions();

    content.add(createContent());
    stackPanel = new StackLayoutPanel(com.google.gwt.dom.client.Style.Unit.EM);
    content.add(stackPanel);

    stackPanel.addSelectionHandler(new SelectionHandler<Integer>() {
        @Override
        public void onSelection(SelectionEvent<Integer> event) {
            if (event.getSelectedItem() != 0 && leaseField.noValue()) {
                AbstractField.addMessage(Level.ERROR, CONSTANTS.leaseError(), leaseField);
            }
            refreshStackPanel();
        }
    });

    stackPanel.addStyleName(CSS.stackStyle());
    stackPanel.add(createText(), CONSTANTS.textLabel(), 1.5);
    stackPanel.add(createMaintenance(), CONSTANTS.maintenanceLabel(), 1.5);
    stackPanel.add(createFinancial(), CONSTANTS.financeLabel(), 1.5);
    onRefresh();
    onReset(Lease.State.Created.name());
}

From source file:net.cbtltd.client.form.OrganizationForm.java

License:Open Source License

public void initialize() {
    AbstractField.CSS.ensureInjected();
    CSS.ensureInjected();// w  w  w.  j  a  va 2s  . c  o m

    final ScrollPanel scroll = new ScrollPanel();
    add(scroll);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.addStyleName(AbstractField.CSS.cbtAbstractWidth());
    panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    scroll.add(panel);
    final HorizontalPanel content = new HorizontalPanel();
    panel.add(content);

    createActions();

    content.add(createContent());
    stackPanel = new StackLayoutPanel(com.google.gwt.dom.client.Style.Unit.EM);
    stackPanel.setVisible(false);
    stackPanel.addSelectionHandler(new SelectionHandler<Integer>() {
        public void onSelection(SelectionEvent<Integer> event) {
            refreshStackPanel();
        }
    });
    stackPanel.addStyleName(CSS.stackStyle());
    content.add(stackPanel);

    createDescription = createDescription();
    createContracttext = createContracttext();
    createContracttable = createContracttable();
    createActor = createActor();
    createTax = createTax();
    createFinance = createFinance();
    createLicense = createLicence();
    createPartner = createPartner();
    createLocale = createDefaults();
    createWorkflow = createWorkflow();
    createDiscounttable = createDiscounttable();
    initRegisterLink();
    onRefresh();
    onReset(Organization.CREATED);
}

From source file:net.cbtltd.client.form.PartyForm.java

public void initialize() {
    AbstractField.CSS.ensureInjected();
    CSS.ensureInjected();//w w w.  j av  a 2 s . co m

    final ScrollPanel scroll = new ScrollPanel();
    add(scroll);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.addStyleName(AbstractField.CSS.cbtAbstractWidth());
    panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    scroll.add(panel);
    final HorizontalPanel content = new HorizontalPanel();
    panel.add(content);

    createActions();

    content.add(createContent());
    stackPanel = new StackLayoutPanel(com.google.gwt.dom.client.Style.Unit.EM);
    content.add(stackPanel);
    stackPanel.setVisible(true);
    stackPanel.addSelectionHandler(new SelectionHandler<Integer>() {
        public void onSelection(SelectionEvent<Integer> event) {
            if (event.getSelectedItem() != 0 && partyField.noValue()) {
                AbstractField.addMessage(Level.ERROR, CONSTANTS.partyError(), partyField);
            }
            refreshStackPanel();
        }
    });
    stackPanel.addStyleName(CSS.stackStyle());
    stackPanel.add(createDescription(), CONSTANTS.descriptionLabel(), 1.5);
    stackPanel.add(createContact(), CONSTANTS.contactLabel(), 1.5);
    stackPanel.add(createReservation(), CONSTANTS.reservationLabel(), 1.5);
    stackPanel.add(createRelation(), CONSTANTS.relationLabel(), 1.5);
    //      stackPanel.add(createFinance(), CONSTANTS.financesLabel(), 1.5);
    stackPanel.add(createEventJournal(), CONSTANTS.eventjournalLabel(), 1.5);
    onRefresh();
    onReset(Party.CREATED);
    //      Window.alert("initialized");
}

From source file:net.cbtltd.client.form.ProductForm.java

public void initialize() {
    AbstractField.CSS.ensureInjected();
    CSS.ensureInjected();/*from www  .  ja v  a2  s. c om*/

    final ScrollPanel scroll = new ScrollPanel();
    add(scroll);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.addStyleName(AbstractField.CSS.cbtAbstractWidth());
    panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    scroll.add(panel);
    final HorizontalPanel content = new HorizontalPanel();
    panel.add(content);

    createActions();
    content.add(createContent());
    stackPanel = new StackLayoutPanel(com.google.gwt.dom.client.Style.Unit.EM);
    content.add(stackPanel);
    stackPanel.addSelectionHandler(new SelectionHandler<Integer>() {
        public void onSelection(SelectionEvent<Integer> event) {
            if (event.getSelectedItem() != 0 && productField.noValue()) {
                AbstractField.addMessage(Level.ERROR, CONSTANTS.productError(), productField);
            }
            refreshStackPanel();
        }
    });
    stackPanel.addStyleName(CSS.stackStyle());
    stackPanel.add(createDescription(), CONSTANTS.descriptionLabel(), 1.5);
    stackPanel.add(createText(), CONSTANTS.textLabel(), 1.5);
    stackPanel.add(mapField, CONSTANTS.mapLabel(), 1.5);
    stackPanel.add(imageGallery, CONSTANTS.imageLabel(), 1.5);
    stackPanel.add(createPrice(), CONSTANTS.priceLabel(), 1.5);
    stackPanel.add(createTax(), CONSTANTS.taxLabel(), 1.5);
    stackPanel.add(createYield(), CONSTANTS.yieldLabel(), 1.5);
    stackPanel.add(createFeature(), CONSTANTS.featureLabel(), 1.5);
    stackPanel.add(createAsset(), CONSTANTS.assetLabel(), 1.5);
    stackPanel.add(createAudit(), CONSTANTS.auditLabel(), 1.5);
    stackPanel.add(createAlert(), CONSTANTS.alertLabel(), 1.5);

    productTable = createProduct();
    //      stackPanel.add(createService(), CONSTANTS.serviceLabel(), 1.5);
    createService();
    onRefresh();
    onReset(Product.CREATED);
    triggerResize();
}

From source file:net.cbtltd.client.form.ReservationForm.java

@Override
public void initialize() {
    AbstractField.CSS.ensureInjected();
    CSS.ensureInjected();/* w w w.  j a v a  2  s .  c  om*/

    final ScrollPanel scroll = new ScrollPanel();
    add(scroll);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.addStyleName(AbstractField.CSS.cbtAbstractWidth());
    panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    scroll.add(panel);

    final HorizontalPanel content = new HorizontalPanel();
    panel.add(content);

    createActions();

    content.add(createContent());
    stackPanel = new StackLayoutPanel(com.google.gwt.dom.client.Style.Unit.EM);
    content.add(stackPanel);

    stackPanel.addSelectionHandler(new SelectionHandler<Integer>() {
        @Override
        public void onSelection(SelectionEvent<Integer> event) {
            if (event.getSelectedItem() != 0 && reservationField.noValue()) {
                AbstractField.addMessage(Level.ERROR, CONSTANTS.reservationError(), reservationField);
            }
            refreshStackPanel();
        }
    });

    stackPanel.addStyleName(CSS.stackStyle());
    stackPanel.add(createHospitality(), CONSTANTS.hospitalityLabel(), 1.5);
    stackPanel.add(createFeature(), CONSTANTS.featureLabel(), 1.5);
    stackPanel.add(createMaintenance(), CONSTANTS.maintenanceLabel(), 1.5);
    stackPanel.add(createFinancial(), CONSTANTS.financeLabel(), 1.5);
    createService();
    //      stackPanel.add(createService(), CONSTANTS.serviceLabel(), 1.5);
    onRefresh();
    onReset(Reservation.State.Provisional.name());
}

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

License:Apache License

/**
 * onModuleLoad is the entry point method.
 *//*  www  .  j a v 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:uk.ac.ebi.fg.annotare2.web.gwt.editor.client.view.experiment.info.ExperimentalDesignsDialog.java

License:Apache License

private Widget createContent(List<OntologyTermGroup> groups) {
    StackLayoutPanel stackPanel = new StackLayoutPanel(Style.Unit.PX);
    stackPanel.setWidth("100%");
    for (OntologyTermGroup group : groups) {
        stackPanel.add(createSectionContent(group), fromSafeConstant(group.getName()), 25);
    }/*  ww w.  j av a2 s . c  o m*/
    return stackPanel;
}