Package com.extjs.gxt.ui.client.util

Examples of com.extjs.gxt.ui.client.util.Margins


    cp.setLayout(new BorderLayout());

    BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 370);

    BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
    centerData.setMargins(new Margins(0, 5, 0, 0));

    cp.add(getChart(), centerData);
    cp.add(getDetails(), eastData);

    add(cp, new MarginData(20));
View Full Code Here


    RowLayout rl = new RowLayout();
    lc.setLayout(rl);
    lc.setSize(800, 600);

    RowData data;
    data = new RowData(1, 300, new Margins(10));
    ContentPanel cp = new ContentPanel(new FitLayout());
    cp.setHeading("Chart");
    cp.add(chart);
    lc.add(cp, data);

    data = new RowData(1, 1, new Margins(10));
    cp = new ContentPanel(new FitLayout());
    cp.setHeading("Teams Sales");
    cp.add(teamSalesGrid);
    lc.add(cp, data);

    data = new RowData(1, 60, new Margins(10));
    LayoutContainer bbar = new LayoutContainer(new RowLayout(Orientation.HORIZONTAL));
    bbar.add(reload);
    bbar.add(radForm, new RowData(1, -1));
    lc.add(bbar, data);
View Full Code Here

                adapterField.setId(nodeType.getName().replace(":","-") + "_" + field.getName().replace(":","-") + locale + (isWriteable?"-true":"-false"));
                adapterField.setWidth("98%");
                adapterField.setStyleAttribute("padding-left", "0");
                fields.put(field.getName(), adapterField);
                FormData fd = new FormData("98%");
                fd.setMargins(new Margins(0));
                if (remoteField != null) {
                    int i = 1;
                    for (Component component : fieldSet.getItems()) {
                        if (component.equals(remoteField)) {
                            fieldSet.insert(adapterField, i, fd);
View Full Code Here

        panel.setWidth("100%");
        panel.setHeight("100%");
        panel.setFrame(true);
        panel.setCollapsible(false);
        panel.setHeaderVisible(false);
        panel.add(searchForm, new RowData(1, -1, new Margins(0)));


        RpcProxy<PagingLoadResult<GWTJahiaNode>> proxy = new RpcProxy<PagingLoadResult<GWTJahiaNode>>() {
            @Override
            public void load(Object loadConfig, AsyncCallback<PagingLoadResult<GWTJahiaNode>> callback) {
                doSearch((PagingLoadConfig) loadConfig, callback);
            }
        };

        // loader
        loader = new BasePagingLoader<PagingLoadResult<GWTJahiaNode>>(proxy);
        loader.setRemoteSort(true);
        final PagingToolBar toolBar = new PagingToolBar(numberResults);
        toolBar.bind(loader);
        contentStore = new ListStore<GWTJahiaNode>(loader);

        List<GWTColumn> columnNames = new ArrayList<GWTColumn>();
        columnNames.add(new GWTColumn("icon",Messages.get("label.icon", ""),40));
        columnNames.add(new GWTColumn("displayName",Messages.get("label.name", "Name"),200));
        final NodeColumnConfigList columnConfigList = new NodeColumnConfigList(columnNames);
        columnConfigList.init();

        final Grid<GWTJahiaNode> grid = new Grid<GWTJahiaNode>(contentStore, new ColumnModel(columnConfigList));

        ContentPanel gridPanel = new ContentPanel();
        gridPanel.setLayout(new FitLayout());
        gridPanel.setBottomComponent(toolBar);
        gridPanel.setHeaderVisible(false);
        gridPanel.setFrame(false);
        gridPanel.setBodyBorder(false);
        gridPanel.setBorders(false);
        gridPanel.add(grid);

        panel.add(gridPanel, new RowData(1, 1, new Margins(0, 0, 20, 0)));
        tab.add(panel);
        displayGridSource = new DisplayGridDragSource(grid);
        grid.addListener(Events.OnDoubleClick, new Listener<BaseEvent>() {
            public void handleEvent(BaseEvent be) {
                EngineLoader.showEditEngine(editLinker, (GWTJahiaNode) ((GridEvent)be).getModel());
View Full Code Here

                        }
                    });
                }
            });
            RowData layoutData1 = new RowData(200, 30);
            layoutData1.setMargins(new Margins(3));
            tab.add(button, layoutData1);
            tab.add(grid, new RowData(1, 1));
            tab.setProcessed(true);
        }
        tab.layout();
View Full Code Here

                            @Override
                            public void componentSelected(ButtonEvent ce) {
                                com.google.gwt.user.client.Window.open(basePath + format, "_blank", "");
                            }
                        });
                        buttonPanel.add(btn, new RowData(-1, -1, new Margins(2)));
                    }
                    layout();
                }
               
                @Override
View Full Code Here

                name = new AdapterField(panel);
                name.setFieldLabel(Messages.get("label.systemName", "System name"));

                FormData fd = new FormData("98%");
                fd.setMargins(new Margins(0));
                nameFieldSet.add(name, fd);
                if(engine.getNode() !=null && engine.getNode().isLocked()) {
                    nameText.setReadOnly(true);
                    if(autoUpdateName!=null) {
                        autoUpdateName.setEnabled(false);
View Full Code Here

    setHeaderVisible(false);
   
    txtfldTitle = new TextField<String>();
    txtfldTitle.setAllowBlank(false);
    FormData fd_txtfldTitle = new FormData("100%");
    fd_txtfldTitle.setMargins(new Margins(2, 20, 2, 2));
    add(txtfldTitle, fd_txtfldTitle);
    txtfldTitle.setFieldLabel("Title");
    txtfldTitle.getMessages().setBlankText("Title is required");
   
    txtrDescription = new TextArea();
    txtrDescription.setAllowBlank(false);
    FormData fd_txtrDescription = new FormData("100% -150");
    fd_txtrDescription.setMargins(new Margins(2, 20, 2, 2));
    add(txtrDescription, fd_txtrDescription);
    txtrDescription.setFieldLabel("Description");
    txtrDescription.getMessages().setBlankText("Description is required");
   
    txtfldLink = new TextField<String>();
    txtfldLink.setRegex("^http\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(/\\S*)?$");
    txtfldLink.setAllowBlank(false);
    FormData fd_txtfldLink = new FormData("100%");
    fd_txtfldLink.setMargins(new Margins(2, 20, 2, 2));
    add(txtfldLink, fd_txtfldLink);
    txtfldLink.setFieldLabel("Link");
    txtfldLink.getMessages().setBlankText("Link is required");
    txtfldLink.getMessages().setRegexText("The link field must be a URL e.g. http://www.example.com/rss.xml");
   
View Full Code Here

          addFeed(tfUrl.getValue());
        }
      }
    });
    BorderLayoutData bld_tfUrl = new BorderLayoutData(LayoutRegion.CENTER);
    bld_tfUrl.setMargins(new Margins(2, 20, 2, 2));
    add(tfUrl, bld_tfUrl);
    tfUrl.setFieldLabel("New TextField");
   
    Button btnAdd = new Button("Add");
    btnAdd.addSelectionListener(new SelectionListener<ButtonEvent>() {
      public void componentSelected(ButtonEvent ce) {
        addFeed(tfUrl.getValue());
      }
    });
    BorderLayoutData bld_btnAdd = new BorderLayoutData(LayoutRegion.EAST, 50);
    bld_btnAdd.setMargins(new Margins(2, 2, 2, 2));
    add(btnAdd, bld_btnAdd);
   
    Text txtEnterAFeed = new Text("Enter a feed url");
    BorderLayoutData bld_txtEnterAFeed = new BorderLayoutData(LayoutRegion.NORTH, 20);
    bld_txtEnterAFeed.setMargins(new Margins(2, 2, 2, 2));
    add(txtEnterAFeed, bld_txtEnterAFeed);
   
  }
View Full Code Here

        ((TriggerField<? extends Object>) f).setMonitorTab(true);
      }
      f.setWidth(cm.getColumnWidth(i));
      HBoxLayoutData ld = new HBoxLayoutData();
      if (i == 0) {
        ld.setMargins(new Margins(0, 1, 2, 1));
      } else if (i == len - 1) {
        ld.setMargins(new Margins(0, 0, 2, 1));
      } else {
        ld.setMargins(new Margins(0, 1, 2, 2));
      }

      f.setMessageTarget("tooltip");
      // needed because we remove it from the celleditor
      clearParent(f);
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.util.Margins

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.