Example usage for com.google.gwt.user.client.ui DockPanel WEST

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

Introduction

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

Prototype

DockLayoutConstant WEST

To view the source code for com.google.gwt.user.client.ui DockPanel WEST.

Click Source Link

Document

Specifies that a widget be added at the west edge of the dock.

Usage

From source file:org.gwm.splice.client.dialog.MessageBox.java

License:Apache License

MessageBox(int icon, String title, String message, int buttons) {
    super(title);

    DockPanel panel = new DockPanel();
    panel.setSpacing(7);//  w ww  .  j av a 2  s .c  om

    panel.add(getIconImage(icon), DockPanel.WEST);
    panel.add(new HTML(message), DockPanel.CENTER);

    Button okButton = new Button("OK", this);
    panel.add(okButton, DockPanel.SOUTH);

    panel.setCellHorizontalAlignment(okButton, DockPanel.ALIGN_CENTER);
    panel.setCellVerticalAlignment(okButton, DockPanel.ALIGN_BOTTOM);

    panel.setHeight("100%");
    panel.setWidth("100%");
    setWidget(panel);

    setMaximizable(false);
    setMinimizable(false);
    //      setResizable(false);
    setWidth(300);
    setHeight(100);
}

From source file:org.gwtlib.client.ui.MessageBox.java

License:Apache License

private static MessageBox message(String caption, String message, boolean asHTML, int buttons,
        final MessageBoxListener listener, String imageStyleName) {
    final MessageBox mb = new MessageBox();
    mb.setText(caption);//  w  ww  .ja va 2 s. c  o m
    mb.setButtons(buttons, listener);
    HTML imageHTML = new HTML("");
    imageHTML.setStyleName(imageStyleName);
    mb._dockPanel.add(imageHTML, DockPanel.WEST);
    mb._dockPanel.add(asHTML ? new HTML(message) : new Label(message), DockPanel.CENTER);
    mb.center();
    return mb;
}

From source file:org.jboss.errai.widgets.client.layout.WSDropShadowLayout.java

License:Apache License

public WSDropShadowLayout(Widget wrappedWidget) {
    DockPanel dockPanel = new DockPanel();

    /**//  w  w w  .j ava  2 s . co m
     * Bad hack to avoid rendering shadow when IE is present.
     */
    if (getUserAgent().indexOf("msie") == -1) {
        HorizontalPanel top = new HorizontalPanel();
        top.setWidth("100%");

        dockPanel.add(top, DockPanel.NORTH);
        dockPanel.setCellWidth(top, "100%");

        SimplePanel topLeftCorner = new SimplePanel();
        topLeftCorner.setStyleName("WSDropShadow-topLeftCorner");
        top.add(topLeftCorner);

        SimplePanel topLeft = new SimplePanel();
        topLeft.setStyleName("WSDropShadow-topLeft");
        top.add(topLeft);

        SimplePanel topMiddle = new SimplePanel();
        topMiddle.setStyleName("WSDropShadow-topMiddle");
        top.add(topMiddle);
        top.setCellWidth(topMiddle, "100%");

        SimplePanel topRight = new SimplePanel();
        topRight.setStyleName("WSDropShadow-topRight");
        top.add(topRight);

        SimplePanel topRightCorner = new SimplePanel();
        topRightCorner.setStyleName("WSDropShadow-topRightCorner");
        top.add(topRightCorner);

        HorizontalPanel bottom = new HorizontalPanel();
        bottom.setWidth("100%");
        dockPanel.add(bottom, DockPanel.SOUTH);
        dockPanel.setCellWidth(bottom, "100%");

        SimplePanel bottomLeftCorner = new SimplePanel();
        bottomLeftCorner.setStyleName("WSDropShadow-bottomLeftCorner");
        bottom.add(bottomLeftCorner);

        SimplePanel bottomLeft = new SimplePanel();
        bottomLeft.setStyleName("WSDropShadow-bottomLeft");
        bottom.add(bottomLeft);

        SimplePanel bottomMiddle = new SimplePanel();
        bottomMiddle.setStyleName("WSDropShadow-bottomMiddle");
        bottom.add(bottomMiddle);
        bottom.setCellWidth(bottomMiddle, "100%");

        SimplePanel bottomRight = new SimplePanel();
        bottomRight.setStyleName("WSDropShadow-bottomRight");
        bottom.add(bottomRight);

        SimplePanel bottomRightCorner = new SimplePanel();
        bottomRightCorner.setStyleName("WSDropShadow-bottomRightCorner");
        bottom.add(bottomRightCorner);

        VerticalPanel left = new VerticalPanel();
        left.setHeight("100%");
        dockPanel.add(left, DockPanel.WEST);
        dockPanel.setCellHeight(left, "100%");

        SimplePanel leftTop = new SimplePanel();
        leftTop.setStyleName("WSDropShadow-leftTop");
        left.add(leftTop);

        SimplePanel leftMiddle = new SimplePanel();
        leftMiddle.setHeight("100%");
        leftMiddle.setStyleName("WSDropShadow-leftMiddle");
        left.add(leftMiddle);
        left.setCellHeight(leftMiddle, "100%");

        SimplePanel leftBottom = new SimplePanel();
        leftBottom.setStyleName("WSDropShadow-leftBottom");
        left.add(leftBottom);

        VerticalPanel right = new VerticalPanel();
        right.setHeight("100%");
        dockPanel.add(right, DockPanel.EAST);
        dockPanel.setCellHeight(right, "100%");

        SimplePanel rightTop = new SimplePanel();
        rightTop.setStyleName("WSDropShadow-rightTop");
        right.add(rightTop);

        SimplePanel rightMiddle = new SimplePanel();
        rightMiddle.setHeight("100%");
        rightMiddle.setStyleName("WSDropShadow-rightMiddle");
        right.add(rightMiddle);
        right.setCellHeight(rightMiddle, "100%");

        SimplePanel rightBottom = new SimplePanel();
        rightBottom.setStyleName("WSDropShadow-rightBottom");
        right.add(rightBottom);

    }
    dockPanel.add(wrappedWidget, DockPanel.CENTER);
    dockPanel.setCellWidth(wrappedWidget, "100%");
    dockPanel.setCellHeight(wrappedWidget, "100%");

    initWidget(dockPanel);
}

From source file:org.jboss.errai.widgets.client.WSModalDialog.java

License:Apache License

public WSModalDialog(String title) {
    window = new WSWindowPanel(title);

    dockPanel = new DockPanel();
    dockPanel.setWidth("400px");

    dockPanel.add(new Image(imageBundle.redFlag()), DockPanel.WEST);
    dockPanel.add(message, DockPanel.CENTER);

    message.getElement().getStyle().setProperty("padding", "0px");

    HorizontalPanel buttonPanel = new HorizontalPanel();

    okButton = new Button("OK");
    okListener = new ClickCallbackListener(this, AcceptsCallback.MESSAGE_OK);
    okButton.addClickHandler(okListener);

    buttonPanel.add(okButton);/*from  www. jav  a2 s . co  m*/

    cancelButton = new Button("Cancel");
    cancelListener = new ClickCallbackListener(this, AcceptsCallback.MESSAGE_CANCEL);
    cancelButton.addClickHandler(cancelListener);

    dockPanel.add(cancelButton, DockPanel.SOUTH);

    buttonPanel.add(cancelButton);

    dockPanel.add(buttonPanel, DockPanel.SOUTH);
    dockPanel.setCellHorizontalAlignment(buttonPanel, DockPanel.ALIGN_RIGHT);
    dockPanel.setCellHeight(buttonPanel, "45px");

    window.add(dockPanel);
}

From source file:org.jboss.errai.workspaces.client.layout.WorkspaceLayout.java

License:Apache License

private Panel createLayout(final String id) {
    Widget area;/*from  w  ww .  j a  v a  2s .com*/
    mainLayoutPanel.add(createHeader(), DockPanel.NORTH);

    tabDragController = new PickupDragController(RootPanel.get(), false);
    tabDragController.setBehaviorBoundaryPanelDrop(false);
    tabDragController.addDragHandler(new TabDragHandler(this));

    mainLayoutPanel.add(area = createNavigator(), DockPanel.WEST);
    mainLayoutPanel.setCellHeight(area, "100%");
    mainLayoutPanel.setCellVerticalAlignment(area, HasVerticalAlignment.ALIGN_TOP);

    mainLayoutPanel.add(area = createAppPanel(), DockPanel.CENTER);
    mainLayoutPanel.setCellHeight(area, "100%");
    mainLayoutPanel.setCellWidth(area, "100%");
    mainLayoutPanel.setCellVerticalAlignment(area, HasVerticalAlignment.ALIGN_TOP);

    currSizeW = Window.getClientWidth();
    currSizeH = Window.getClientHeight();

    RootPanel.get(id).setPixelSize(currSizeW, currSizeH);
    mainLayoutPanel.setPixelSize(currSizeW, currSizeH);

    addResizeHandler(new ResizeHandler() {
        public void onResize(ResizeEvent event) {
            RootPanel.get(id).setPixelSize(event.getWidth(), event.getHeight());
            mainLayoutPanel.setPixelSize(event.getWidth(), event.getHeight());

            fireWorkspaceSizeChangeListeners(event.getWidth() - currSizeW, event.getHeight() - currSizeH);

            currSizeW = event.getWidth();
            currSizeH = event.getHeight();

            /**
             * Need to handle height and width of the TabPanel here.
             */

            LayoutHint.hintAll();
        }
    });

    LayoutHint.attach(tabPanel, new LayoutHintProvider() {
        public int getHeightHint() {
            return Window.getClientHeight() - tabPanel.getAbsoluteTop() - 20;
        }

        public int getWidthHint() {
            return Window.getClientWidth() - tabPanel.getAbsoluteLeft() - 10;
        }
    });

    return mainLayoutPanel;
}

From source file:org.kuali.continuity.admin.main.client.CriticalFunction.java

License:Educational Community License

public void onModuleLoad() {

    RootPanel rootPanel = RootPanel.get("gwtRoot");
    rootPanel.setWidth("642");
    Element screenelement = DOM.getElementById("itemdata");
    Element formelement = DOM.getElementById("formelement");
    Element pluralelement = DOM.getElementById("plural");
    String panelHeight = "250px";
    String planBoxWidth = "275px";

    String pageInfo = screenelement.getTitle();
    String pageTitle = screenelement.getTitle();
    String proxyUrl = "./items.lst";
    itemService = (SimpleServiceAsync) GWT.create(SimpleService.class);

    rootPanel.add(dockPanel);//from ww  w. j a  v  a  2 s . c  o  m

    // set token
    String token = Cookies.getCookie(CSRF_TOKEN);
    csrfToken.setValue(token);
    rootPanel.add(csrfToken);

    dockPanel.add(horizontalPanel, DockPanel.NORTH);
    horizontalPanel.setSize("601px", panelHeight);
    VerticalPanel leftPanel = new VerticalPanel();
    leftPanel.add(new Label("Available Plans"));
    leftPanel.add(availablePlanListBox);

    horizontalPanel.add(leftPanel);

    availablePlanListBox.setWidth(planBoxWidth);
    availablePlanListBox.setVisibleItemCount(listBoxHeight);
    availablePlanListBox.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            if (availablePlanListBox.getSelectedIndex() >= 0)
                if (availablePlanListBox.getSelectedIndex() <= availablePlanListBox.getItemCount()) {
                    int index = availablePlanListBox.getSelectedIndex();
                    Integer planId = Integer.parseInt(availablePlanListBox.getValue(index));

                    criticalFunctionLabel.setText(" - " + availablePlanListBox.getItemText(index));
                    itemService.getStringArray("function", planId, callbackGetFunctions);
                }
        }

    });
    examplePlanListBox.setWidth(planBoxWidth);
    examplePlanListBox.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            int index = examplePlanListBox.getSelectedIndex();
            if (index >= 0)
                if (index < examplePlanListBox.getItemCount()) {
                    // Window.alert("" +
                    // examplePlanListBox.getSelectedIndex()
                    // + " " + examplePlanListBox.getItemCount());
                    Integer planId = Integer.parseInt(examplePlanListBox.getValue(index));

                    //Window.alert("Before getting plans for plan id " + planId);
                    // criticalFunctionLabel.setText(" - "+examplePlanListBox
                    // .getItemText(index));
                    criticalFunctionLabel.setText(" - " + examplePlanListBox.getItemText(index));
                    itemService.getStringArray("function", planId, callbackGetFunctions);
                }
        }
    });
    availablePlanListBox.addChangeListener(new ChangeListener() {

        public void onChange(Widget arg0) {
            // Window.alert("Double click "+availablePlanListBox.getItemText(
            // availablePlanListBox.getSelectedIndex()));
            addMethod();

        }
    });
    examplePlanListBox.addChangeListener(new ChangeListener() {

        public void onChange(Widget arg0) {
            // Window.alert("Double click "+availablePlanListBox.getItemText(
            // availablePlanListBox.getSelectedIndex()));
            removeMethod();

        }
    });
    itemRootName = pageInfo.toLowerCase();

    VerticalPanel topFiller = new VerticalPanel();
    String midwid = "90px";
    topFiller.setSize(midwid, "90px");
    topFiller.add(new Label(" "));
    midPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    midPanel.add(topFiller);
    horizontalPanel.add(midPanel);

    midPanel.add(addButton);
    addButton.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            // Get plan from Available Plan List
            // Remove it and add it to example plan List
            addMethod();

        }
    });
    // addButton.setText("Add >");

    VerticalPanel midFiller = new VerticalPanel();
    midFiller.setSize(midwid, "12px");
    midFiller.add(new Label(" "));
    midPanel.add(midFiller);
    midPanel.add(removeButton);
    removeButton.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            // Get selected item from example Plan List
            // Remove it from selected List and add it to
            // Available list.
            removeMethod();

        }
    });
    // removeButton.setText("< Remove ");
    VerticalPanel rightPanel = new VerticalPanel();
    rightPanel.add(new Label("Selected Plans"));
    rightPanel.add(examplePlanListBox);
    horizontalPanel.add(rightPanel);

    examplePlanListBox.setVisibleItemCount(listBoxHeight);
    examplePlanListBox.addClickListener(new ClickListener() {
        public void onClick(final Widget arg0) {
            // Show functions for the current plan.
            //itemService.getStringArray("function", thisInstitution,callbackGetPlans);
        }
    });

    horizontalPanel_1.setSize("601px", "128px");
    VerticalPanel bottom = new VerticalPanel();
    AbsolutePanel bottomLabelPanel = new AbsolutePanel();
    // HorizontalPanel bottomLabelPanelLeft = new HorizontalPanel();

    // bottomLabelPanelLeft.setWidth("220px");
    // bottomLabelPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // bottomLabelPanelLeft.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // bottomLabelPanel.add(bottomLabelPanelLeft);

    final Label cfTitle = new Label("Critical Functions of Plan");
    bottomLabelPanel.add(cfTitle, 0, 0);

    cfTitle.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // functionLabelPanel.add(spacer);
    criticalFunctionLabel.setStyleName("AttentionClass2");
    bottomLabelPanel.add(criticalFunctionLabel, 140, 0);
    criticalFunctionLabel.setWidth("341px");
    bottomLabelPanel.setHeight("12px");
    criticalFunctionLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // criticalFunctionLabel.setText("Hi there Joe Smudley");

    // HorizontalPanel functionLabelPanel = new HorizontalPanel();
    // functionLabelPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    // functionLabelPanel.setWidth("136px");

    // bottomLabelPanel.add(functionLabelPanel, 409, 0);

    bottom.add(bottomLabelPanel);
    bottom.add(criticalFunctionsListBox);
    horizontalPanel_1.add(bottom);
    criticalFunctionsListBox.setWidth("642px");
    criticalFunctionsListBox.setVisibleItemCount(10);

    // Button Bar
    backButton.setText("Back");
    backButton.setStyleName("ButtonClass");
    backButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            redirect("/continuity/admin/adminHome");
        }
    });
    viewButton.setText("View User-Screen");
    viewButton.setStyleName("ButtonClass");
    viewButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            redirect("/continuity/plan/getCriticalFunctionExamples");
        }
    });
    saveButton.setText("Save Selections");
    saveButton.setStyleName("ButtonClass");

    saveButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            NamedItem item = new NamedItem();
            item.setId(currentId);
            // Create plan list
            String planString = "";
            String comma = "";
            for (int i = 0; i < examplePlanListBox.getItemCount(); i++) {
                String planId = examplePlanListBox.getValue(i);
                planString += comma + planId;
                comma = ",";
            }
            item.setName(planString);
            item.setCsrfToken(csrfToken.getValue());
            itemService.updateItem("function", item, callbackUpdate);
        }
    });

    buttonBar.add(left, DockPanel.WEST);
    left.setWidth("200px");
    right.setWidth("440px");
    right.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    left.add(backButton);
    right.add(saveButton);
    right.add(viewButton);
    buttonBar.add(right, DockPanel.EAST);

    buttonBar.setSize(screenWidth, "58px");
    dockPanel.add(buttonBar, DockPanel.SOUTH);
    dockPanel.add(horizontalPanel_1, DockPanel.SOUTH);
    // Begin load process.
    // Get Function Example list
    itemService.getItem("function", thisInstitution, callbackLoad);

    // formGrid.addFormItem("Order", orderBox);

}

From source file:org.kuali.continuity.admin.main.client.MainViewer.java

License:Educational Community License

public void doModuleLoad() {
    super.onModuleSetup();

    // Element gwtRoot= DOM.getElementById("gwtRoot");
    // rootPanel = RootPanel.get("gwtRoot");
    RootPanel rootPanel = RootPanel.get("gwtRoot");

    // Window.alert("Start at: "+rootPanel.getTitle());
    // Defaults for SimpleGridView
    textBox.setWidth("341px");
    orderBox.setWidth("40px");

    // Button Bar
    buttonBar.add(left, DockPanel.WEST);
    left.setWidth("200px");
    right.setWidth("440px");
    left.add(backButton);//from  www .j  av a 2s  .co  m
    buttonBar.add(right, DockPanel.EAST);
    HTML spacer = new HTML("&nbsp;");
    right.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    right.add(insertButton);
    right.add(updateButton);
    right.add(deleteButton);

    // Add button listeners.

    insertButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);

            boolean ok = Window.confirm("Insert new  entry: " + textBox.getText() + ": are you sure?");
            currentActiveItem = gridPanel.getActiveItem();
            if (ok) {
                buttonPressed = "insert";

                getFormController().insert(itemRootName, updateItemCallback);
            }

        }
    });
    updateButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            if (currentId <= 0) {
                setError("Record selection required");
                showErr(true);
            } else {
                currentActiveItem = gridPanel.getActiveItem();
                boolean ok = Window.confirm("Update entry: " + textBox.getText() + ": are you sure?");
                if (ok) {
                    buttonPressed = "update";
                    getFormController().update(itemRootName, updateItemCallback);
                }
            }

        }
    });

    deleteButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            if (currentId <= 0) {
                setError("Record selection required");
                showErr(true);
            } else {
                currentActiveItem = gridPanel.getActiveItem();
                boolean ok = Window.confirm(delAskMsg + textBox.getText() + ": are you sure?");
                if (ok) {
                    buttonPressed = "delete";
                    // Item item = new Item();
                    formController.delete(itemRootName, updateItemCallback);
                }
            }
        }
    });

    // Build up Main dock panel
    rootPanel.add(dockPanel);
    dockPanel.setWidth("642px");
    spacerBar.setSize(screenWidth, "10px");

    // Page heading
    // headingLabel.setHTML("<p>&nbsp;</p>");
    // headingBar.add(headingLabel);
    // headingBar.setSize(screenWidth,"30px");
    dockPanel.add(headingBar, DockPanel.NORTH);
    headingBar.setHeight("2px");
    headingBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);

    // Add panels below the gridpanel
    if (showButtonRow) {
        dockPanel.add(buttonBar, DockPanel.SOUTH);
    }

    dockPanel.add(errorTextPanel, DockPanel.SOUTH);
    dockPanel.add(errorPanel, DockPanel.SOUTH);

    errorPanel.setSize(screenWidth, "12px");
    errorTextPanel.setSize(screenWidth, "12px");

    buttonBar.setSize(screenWidth, "58px");
    dockPanel.add(formPanel, DockPanel.SOUTH);
    dockPanel.add(spacerBar, DockPanel.SOUTH);
    formPanel.add(flexForm);
    loadErrorSetup(errorPanel, errorTextPanel);

    loadErrorSetup(errorPanel, errorTextPanel);

    CSS.swapStyleSheet("theme", "js/ext/resources/css/xtheme-gray.css");

}

From source file:org.kuali.continuity.admin.main.client.MainViewerAL.java

License:Educational Community License

public void doModuleLoad() {
    super.onModuleSetup();

    //Element gwtRoot= DOM.getElementById("gwtRoot");
    //rootPanel = RootPanel.get("gwtRoot");
    RootPanel rootPanel = RootPanel.get("gwtRoot");

    // Window.alert("Start at: "+rootPanel.getTitle());
    // Defaults for SimpleGridView
    textBox.setWidth("341px");
    orderBox.setWidth("40px");

    // Button Bar
    buttonBar.add(left, DockPanel.WEST);
    left.setWidth("200px");
    right.setWidth("440px");
    left.add(backButton);/*w  ww . java2 s .  c o  m*/
    buttonBar.add(right, DockPanel.EAST);
    HTML spacer = new HTML("&nbsp;");
    right.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    // right.add(insertButton);
    // right.add(updateButton);
    // right.add(deleteButton);

    // Add button listeners.

    insertButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);

            boolean ok = Window.confirm("Insert new  entry: " + textBox.getText() + ": are you sure?");
            if (ok) {

                getFormController().insert(itemRootName, updateItemCallback);
            }

        }
    });
    updateButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);

            boolean ok = Window.confirm("Update entry: " + textBox.getText() + ": are you sure?");
            if (ok) {
                getFormController().update(itemRootName, updateItemCallback);
            }

        }
    });
    deleteButton.addClickListener(new ClickListener() {
        public void onClick(final Widget sender) {
            showErr(false);
            boolean ok = Window.confirm("Delete  entry: " + textBox.getText() + ": are you sure?");
            if (ok) {

                Item item = new Item();
                formController.delete(itemRootName, item, updateItemCallback);
            }

        }
    });

    // Build up Main dock panel
    rootPanel.add(dockPanel);
    dockPanel.setWidth("642px");
    spacerBar.setSize(screenWidth, "10px");

    // Page heading
    // headingLabel.setHTML("<p>&nbsp;</p>");
    // headingBar.add(headingLabel);
    // headingBar.setSize(screenWidth,"30px");
    dockPanel.add(headingBar, DockPanel.NORTH);
    headingBar.setHeight("2px");
    headingBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);

    // Add panels below the gridpanel
    // if (showButtonRow) {
    dockPanel.add(buttonBar, DockPanel.SOUTH);
    // }

    dockPanel.add(errorTextPanel, DockPanel.SOUTH);
    dockPanel.add(errorPanel, DockPanel.SOUTH);

    errorPanel.setSize(screenWidth, "24px");
    buttonBar.setSize(screenWidth, "58px");
    dockPanel.add(formPanel, DockPanel.SOUTH);
    dockPanel.add(spacerBar, DockPanel.SOUTH);
    formPanel.add(flexForm);
    loadErrorSetup(errorPanel, errorTextPanel);
    CSS.swapStyleSheet("theme", "js/ext/resources/css/xtheme-gray.css");

}

From source file:org.kuali.continuity.admin.main.client.SimpleGridViewer.java

License:Educational Community License

public void onModuleLoad(String gridname, String proxyUrl, ColumnModel columnModel, RecordDef recordDef,
        Object placeholder) {//from w w w. ja  va  2  s. c  o m
    // this.formController = formController;
    doModuleLoad();

    // Initialize ItemService.

    JsonReader reader = new JsonReader(recordDef);
    reader.setRoot("items");
    reader.setId("id");

    dataProxy = new HttpProxy("./items.lst"); // Temp
    store = new Store(dataProxy, reader);
    store.setDefaultSort("order", SortDir.ASC);
    gridPanel.addGridRowListener(rowlistener);
    gridPanel.setTitle(gridname);
    gridPanel.setColumnModel(columnModel);
    gridPanel.setTrackMouseOver(true);
    gridPanel.setLoadMask(true);
    gridPanel.setSelectionModel(new RowSelectionModel());
    gridPanel.setStripeRows(true);
    gridPanel.setIconCls("grid-icon");
    gridPanel.setEnableColumnResize(true);
    GridView view = new GridView();
    view.setForceFit(true);
    gridPanel.setView(view);
    gridPanel.setStore(store);
    gridPanel.setSize("642px", gpheight);

    dockPanel.add(gridPanel, DockPanel.WEST);
    orderBox.setMaxLength(3);
    orderBox.setWidth("25px");
    gridPanel.addListener(new PanelListenerAdapter() {
        public void onRender(Component component) {

            store.load(0, pageSize);
        }
    });
    store.setBaseParams(urlParams);

    gridLoad(1, 1, "orderNo", itemRootName, store);

}

From source file:org.kuali.continuity.admin.main.client.SimpleGridViewerS.java

License:Educational Community License

/**
 * This isn't really an onModuleLoad method but is designated as such
 * because it will be called by the main Module's onModuleLoad. Note that it
 * has several parameters.//  ww  w .  j av  a  2 s  .  co m
 *
 * @param gridname
 *            The name to be applied to the grid
 * @param proxyUrl
 *            The location of the Service that supports this grid manager.
 * @param columnModel
 *            The column model that is used by this grid (if not the
 *            default).
 */

public void onModuleLoad(String gridname, String proxyUrl, ColumnModel columnModel, RecordDef recordDef) {
    // this.formController = formController;
    doModuleLoad();

    // Initialize ItemService.

    JsonReader reader = new JsonReader(recordDef);
    reader.setRoot("items");
    reader.setId("id");

    dataProxy = new HttpProxy("./items.lst"); // Temp
    store = new Store(dataProxy, reader);
    store.setDefaultSort("order", SortDir.ASC);
    gridPanel.addGridRowListener(rowlistener);
    gridPanel.setTitle(gridname);
    gridPanel.setColumnModel(columnModel);
    gridPanel.setTrackMouseOver(true);
    gridPanel.setLoadMask(true);
    gridPanel.setSelectionModel(new RowSelectionModel());
    gridPanel.setStripeRows(true);
    gridPanel.setIconCls("grid-icon");
    gridPanel.setEnableColumnResize(true);
    GridView view = new GridView();
    view.setForceFit(true);
    gridPanel.setView(view);
    gridPanel.setStore(store);
    gridPanel.setSize("642px", "200px");

    dockPanel.add(gridPanel, DockPanel.WEST);
    orderBox.setMaxLength(2);
    orderBox.setWidth("20px");
    gridPanel.addListener(new PanelListenerAdapter() {
        public void onRender(Component component) {

            store.load(0, pageSize);
        }
    });
    store.setBaseParams(urlParams);
    gridLoad(1, 1, "id", itemRootName, store);

}