예제 #1
0
  private Window createStatisticWindow() {

    Window w = new Window();
    w.setIcon(IconHelper.createStyle("bogus"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("Statistics ");
    w.setSize(400, 400);

    w.setLayout(new AccordionLayout());

    ContentPanel cp = new ContentPanel();
    cp.setHeading("Most contacted friends this month");
    cp.setFrame(false);
    cp.setSize(300, 300);

    Frame frame = new Frame();
    frame.setUrl("chart.html");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    cp = new ContentPanel();
    cp.setHeading("Most contacted friends in total");
    cp.setFrame(false);
    cp.setSize(300, 300);

    frame = new Frame();
    frame.setUrl(
        "https://chart.googleapis.com/chart?cht=p3&chs=350x200&chd=t:70,30,10&&chl=Hollie|Emerson|Christinal");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    cp = new ContentPanel();
    cp.setHeading("Average sms per day last two weeks");
    cp.setFrame(false);
    cp.setSize(300, 300);

    frame = new Frame();
    frame.setUrl(
        "https://chart.googleapis.com/chart?cht=lc&chs=350x200&chd=t:25,50,70,90,25,44,56,34,23,56,0,0,34,5,5,103,3,2,6,13&&chl=1|2|3|4|5|6|7|8|9|10|11|12|13|14&chxt=x,y");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    return w;
  }
예제 #2
0
  private void onInit() {
    viewportPanel.setHeaderVisible(false);
    viewportPanel.setLayout(new BorderLayout());

    viewport.setLayout(new FitLayout());
    viewport.add(viewportPanel);
  }
예제 #3
0
  private void createViewDSInfoPanel() {
    BorderLayoutData data = new BorderLayoutData(Style.LayoutRegion.EAST, 475, 100, 750);
    data.setMargins(new Margins(1, 1, 1, 5));
    data.setCollapsible(true);

    viewDsInfoPanel = new ContentPanel();
    viewDsInfoPanel.setLayout(new CenterLayout());
    viewDsInfoPanel.setLayoutOnChange(true);
    //        filterPanel.setAnimCollapse(true);
    viewDsInfoPanel.setId("eastPanel");
    viewDsInfoPanel.setBodyBorder(false);
    viewDsInfoPanel.setIcon(HarvesterUI.ICONS.view_info_icon());
    viewDsInfoPanel.setHeading(HarvesterUI.CONSTANTS.viewDataSetInformation());
    LabelToolItem noDsSelectedLabel = new LabelToolItem(HarvesterUI.CONSTANTS.noDataSetSelected());
    noDsSelectedLabel.setStyleName("noDataSetSelected");
    viewDsInfoPanel.add(noDsSelectedLabel);

    mainBorderLayout.addListener(
        Events.Expand,
        new Listener<BorderLayoutEvent>() {
          @Override
          public void handleEvent(BorderLayoutEvent be) {
            if (be.getRegion().equals(Style.LayoutRegion.EAST)) setOnExpandDataSet();
          }
        });

    mainGridPanel.add(viewDsInfoPanel, data);
  }
예제 #4
0
파일: Menu.java 프로젝트: juanmav/SiuWeb
  private void adminMenu(ContentPanel accordionPanel) {
    /* Administracion */
    ContentPanel adminCP = new ContentPanel();
    adminCP.setAnimCollapse(false);
    adminCP.setHeading("Administracion");
    adminCP.setLayout(new RowLayout(Orientation.VERTICAL));

    Button area = new Button("ABM- Area");
    area.setWidth("100%");
    area.addListener(
        Events.OnClick,
        new Listener<BaseEvent>() {
          @Override
          public void handleEvent(BaseEvent be) {
            ABMArea a = new ABMArea();
            a.show();
          }
        });
    adminCP.add(area);
    Button tiporev = new Button("ABM- TipoRelevamiento");
    tiporev.setWidth("100%");
    adminCP.add(tiporev);

    Button tema = new Button("ABM- Tema");

    tema.setWidth("100%");
    adminCP.add(tema);

    accordionPanel.add(adminCP);
  }
예제 #5
0
  private Window createGeolocationWindow() {

    final Window w = new Window();
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setIcon(IconHelper.createStyle("accordion"));
    w.setHeading("Contact list");
    w.setWidth(500);
    w.setHeight(500);
    w.setLayout(new FitLayout());

    ContentPanel cp = new ContentPanel();
    cp.setAnimCollapse(false);
    cp.setHeading("Localize your friends");
    cp.setScrollMode(Scroll.NONE);
    cp.setLayout(new FitLayout());

    Frame frame = new Frame();
    frame.setUrl("geolocation.html");
    frame.setLayoutData(new FitLayout());
    cp.add(frame);

    w.add(cp);
    return w;
  }
예제 #6
0
  public ServerEditor() {
    // create content:
    content = new ContentPanel();
    content.setBodyBorder(false);
    content.setHeaderVisible(false);
    content.setScrollMode(Scroll.AUTO);
    //		content.setHeading("Properties");
    content.setButtonAlign(HorizontalAlignment.RIGHT);

    // da toolbar
    ToolBar toolbar = new ToolBar();
    TextToolItem save = new TextToolItem("Save", "icon-save");
    toolbar.add(save);
    toolbar.add(new SeparatorToolItem());
    content.setTopComponent(toolbar);

    tabFolder = new TabPanel();
    tabFolder.setTabScroll(true);

    addTabs(tabFolder);

    RowLayout layout = new RowLayout(Orientation.VERTICAL);
    content.setLayout(layout);
    content.add(tabFolder, new RowData(1, 1));
  }
예제 #7
0
 public ContentPanel getNewContentPanel() {
   ContentPanel contentPanel = new ContentPanel();
   contentPanel.setLayout(new FitLayout());
   contentPanel.setHeading(getPanelTitle());
   IconSupplier.setIcon(contentPanel, IconSupplier.getReportIconName());
   return contentPanel;
 }
예제 #8
0
 private ContentPanel getJobnamePanel() {
   if (jobnamePanel == null) {
     jobnamePanel = new ContentPanel();
     jobnamePanel.setWidth("314px");
     jobnamePanel.setHeading("Jobname & group");
     jobnamePanel.setLayout(new FitLayout());
     jobnamePanel.add(getFirstRowLeftSide(), new FitData(10));
   }
   return jobnamePanel;
 }
예제 #9
0
 private ContentPanel getApplicationPanel() {
   if (applicationPanel == null) {
     applicationPanel = new ContentPanel();
     applicationPanel.setSize("221px", "85px");
     applicationPanel.setHeading("Application");
     applicationPanel.setLayout(new FitLayout());
     applicationPanel.add(getLayoutContainer_1(), new FitData(10, 30, 10, 10));
   }
   return applicationPanel;
 }
예제 #10
0
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);

    ContentPanel inforPanel = new ContentPanel();
    //		 inforPanel.setHeading(this.getCurState().getAuction().getString(IAuction.AUCTION_NAME));
    HorizontalPanel infoContent = new HorizontalPanel();
    infoContent.setSpacing(20);
    Label sk = new Label("拍卖活动名称:");
    Label sv = new Label(this.getCurState().getAuction().getString(IAuction.AUCTION_NAME));
    Label ek = new Label("拍卖商品名称:");
    Label ev = new Label(this.getCurState().getAuction().getString(IAuction.GOOD_NAME));
    infoContent.add(sk);
    infoContent.add(sv);
    infoContent.add(ek);
    infoContent.add(ev);
    inforPanel.add(infoContent);

    BasePagingLoader loader = new PagingListService().getLoader(ModelNames.AUCTIONLOG);
    loader.load(0, 10);
    store = new ListStore<BeanObject>(loader);
    toolBar = new PagingToolBar(10);
    toolBar.bind(loader);

    List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
    final CheckBoxSelectionModel<BeanObject> smRowSelection =
        new CheckBoxSelectionModel<BeanObject>();
    columns.add(smRowSelection.getColumn());
    columns.add(new ColumnConfig(IAuctionLog.BID_USER, "买家", 150));
    columns.add(new ColumnConfig(IAuctionLog.BID_PRICE, "出价", 150));
    columns.add(new ColumnConfig(IAuctionLog.BID_TIME, "时间", 150));
    columns.add(new ColumnConfig(IAuctionLog.LOG_ID, "状态", 150));

    ColumnModel cm = new ColumnModel(columns);
    grid = new Grid<BeanObject>(store, cm);

    //        grid.setLoadMask(true);
    //        grid.setBorders(true);
    grid.setSelectionModel(smRowSelection);
    grid.addPlugin(smRowSelection);
    grid.setHeight(250);

    ContentPanel contentPanel = new ContentPanel();
    contentPanel.setFrame(true);
    contentPanel.setCollapsible(true);
    contentPanel.setAnimCollapse(false);
    contentPanel.setButtonAlign(HorizontalAlignment.CENTER);
    contentPanel.setIconStyle("icon-table");
    contentPanel.setLayout(new FitLayout());
    contentPanel.add(grid);
    contentPanel.setBottomComponent(toolBar);

    topPanel.add(inforPanel);
    topPanel.add(contentPanel);
    add(topPanel);
  }
예제 #11
0
 private ContentPanel getCpusPanel() {
   if (cpusPanel == null) {
     cpusPanel = new ContentPanel();
     cpusPanel.setSize("106px", "84px");
     cpusPanel.setHideCollapseTool(true);
     cpusPanel.setHeading("CPUs");
     cpusPanel.setLayout(new FitLayout());
     cpusPanel.add(getLayoutContainer(), new FitData(10));
   }
   return cpusPanel;
 }
예제 #12
0
 private ContentPanel getEmailPanel() {
   if (emailPanel == null) {
     emailPanel = new ContentPanel();
     emailPanel.setWidth("275px");
     emailPanel.setLayout(new FitLayout());
     emailPanel.setHeading("Email");
     emailPanel.setCollapsible(false);
     emailPanel.add(getFirstRowRightSide(), new FitData(10));
   }
   return emailPanel;
 }
예제 #13
0
 private ContentPanel getCommandLinePanel() {
   if (commandLinePanel == null) {
     commandLinePanel = new ContentPanel();
     commandLinePanel.setHideCollapseTool(true);
     commandLinePanel.setSize("413px", "196px");
     commandLinePanel.setLayout(new FitLayout());
     commandLinePanel.setHeading("Commandline");
     commandLinePanel.setCollapsible(true);
     commandLinePanel.add(getTextAreaContainer(), new FitData(10));
   }
   return commandLinePanel;
 }
예제 #14
0
파일: AppView.java 프로젝트: nmco/geofence
  /** Creates the south. */
  private void createSouth() {
    BorderLayoutData data =
        new BorderLayoutData(LayoutRegion.SOUTH, Constants.SOUTH_PANEL_DIMENSION + 25);
    // data.setMargins(new Margins(5, 5, 5, 5));
    // data.setHideCollapseTool(false);
    data.setMargins(new Margins(5, 0, 0, 0));
    data.setCollapsible(true);
    data.setSplit(false);

    /*
     * south = new ContentPanel(); south.setBodyBorder(false); south.setAnimCollapse(true);
     * south.setCollapsible(true); south.setLayout(new FitLayout());
     * south.setLayoutOnChange(true); south.setScrollMode(Scroll.AUTOY);
     * south.setHeaderVisible(true);
     * south.setHeading(I18nProvider.getMessages().accordionLabel());
     * south.setMonitorWindowResize(true); south.setLayoutOnChange(true); south.layout();
     */
    south = new ContentPanel();
    south.setBodyBorder(false);
    south.setLayout(new FitLayout());
    south.setScrollMode(Scroll.AUTOY);
    south.setHeaderVisible(true);
    // south.setHeading(I18nProvider.getMessages().accordionLabel());
    south.setMonitorWindowResize(true);
    south.setLayoutOnChange(true);
    south.layout();

    south.addListener(
        Events.Resize,
        new Listener<BaseEvent>() {

          public void handleEvent(BaseEvent be) {
            Dispatcher.forwardEvent(GeoGWTEvents.UPDATE_MAP_SIZE);
            // Dispatcher.forwardEvent(GeofenceEvents.UPDATE_SOUTH_SIZE);
          }
        });
    south.addListener(
        Events.Move,
        new Listener<BaseEvent>() {

          public void handleEvent(BaseEvent be) {
            Dispatcher.forwardEvent(GeoGWTEvents.UPDATE_MAP_SIZE);
            // Dispatcher.forwardEvent(GeofenceEvents.UPDATE_SOUTH_SIZE);
          }
        });
    this.tabWidget = new TabWidget();

    south.add(this.tabWidget);

    Dispatcher.forwardEvent(GeofenceEvents.ATTACH_BOTTOM_TAB_WIDGETS, this.tabWidget);

    center.add(south, data);
  }
예제 #15
0
 private void emptyDataSetPanel() {
   // Only do when visible to enhance performance
   if (viewDsInfoPanel.isExpanded()) {
     viewDsInfoPanel.removeAll();
     LabelToolItem noDsSelectedLabel =
         new LabelToolItem(HarvesterUI.CONSTANTS.noDataSetSelected());
     noDsSelectedLabel.setStyleName("noDataSetSelected");
     viewDsInfoPanel.setLayout(new CenterLayout());
     viewDsInfoPanel.setHeading(HarvesterUI.CONSTANTS.viewDataSetInformation());
     viewDsInfoPanel.add(noDsSelectedLabel);
   }
 }
예제 #16
0
파일: Menu.java 프로젝트: juanmav/SiuWeb
  private void reportesMenu(ContentPanel accordionPanel) {
    /* Reportes */

    ContentPanel reportesCP = new ContentPanel();
    reportesCP.setAnimCollapse(false);
    reportesCP.setHeading("Reportes");
    reportesCP.setLayout(new RowLayout(Orientation.VERTICAL));

    Button insp = new Button("Inspecciones");
    insp.setWidth("100%");
    reportesCP.add(insp);

    accordionPanel.add(reportesCP);
  }
예제 #17
0
  /** This widget can be used to display the actions that are considered relevant */
  public WidgetSpecialActions() {
    Listener<ComponentEvent> l =
        new Listener<ComponentEvent>() {
          public void handleEvent(ComponentEvent ce) {
            DataList l = (DataList) ce.component;
            ServiceVisualizerManager.displayService(l.getSelectedItem().getId());
          }
        };
    ContentPanel frame = new ContentPanel();
    frame.setFrame(true);
    frame.setCollapsible(true);
    frame.setAnimCollapse(false);
    frame.setHeading("Interesting actions");

    final DataList list = new DataList();
    list.setFlatStyle(true);

    list.addListener(Events.SelectionChange, l);

    DataListItem item = new DataListItem();
    item.setText("Get Twitter followers");
    item.setId("http://soa4all.eu/twitter/getFollowers");
    list.add(item);

    item = new DataListItem();
    item.setText("Watson Search");
    item.setId("http://soa4all.eu/watson/search");
    list.add(item);

    item = new DataListItem();
    item.setText("BT Scenario 1");
    item.setStyleAttribute("color", "#00FF00");
    item.setId("http://soa4all.eu/composed/BTscenario1");
    list.add(item);

    item = new DataListItem();
    item.setText("Get Twitter Follower (Semantic)");
    item.setId("http://soa4all.eu/twitter/getFollowersSemantic");
    list.add(item);

    item = new DataListItem();
    item.setText("Profile Details (Fake Service)");
    item.setId("http://soa4all.eu/twitter/getProfileDetails");
    list.add(item);

    frame.setLayout(new FitLayout());
    frame.add(list);

    initWidget(frame);
  }
예제 #18
0
  private void initUI() {
    long time = new java.util.Date().getTime();
    GWT.log("Initializing the UI ", null);

    permissions = Registry.get(Constants.LOGIN_USER_PERMISSIONS);

    //		container = new LayoutContainer();
    container = new ContentPanel();
    container.setLayout(new BorderLayout());
    container.setHeading("User Profile");

    formButtonContainer = new LayoutContainer();
    formButtonContainer.setScrollMode(Scroll.AUTO);

    TableLayout identlayout = new TableLayout(2);
    identlayout.setWidth("100%");
    identlayout.setCellSpacing(5);
    identlayout.setCellVerticalAlign(VerticalAlignment.TOP);

    TableLayout formlayout = new TableLayout(2);
    formlayout.setWidth("100%");
    formlayout.setCellSpacing(5);
    formlayout.setCellVerticalAlign(VerticalAlignment.TOP);

    formContainer = new LayoutContainer();
    //			formContainer.setBorders(true);
    formContainer.setLayout(formlayout);
    leftFormPanel = setupUserLeftForm("", 1);
    rightFormPanel = setupUserRightForm("", 8);

    formContainer.add(leftFormPanel);
    formContainer.add(rightFormPanel);
    buttonPanel = setupButtonPanel(17);

    formButtonContainer.add(formContainer);
    formButtonContainer.add(buttonPanel);

    // check permissions
    checkPermissins();

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
    data.setMargins(new Margins(4, 2, 4, 2));
    container.add(formButtonContainer, data);

    LayoutContainer wrapper = (LayoutContainer) Registry.get(Constants.CENTER_PANEL);
    wrapper.removeAll();
    wrapper.add(container);
    wrapper.layout();
    GWT.log("Done Initializing the UI in " + (new java.util.Date().getTime() - time), null);
  }
예제 #19
0
  public LibraryData(HorizontalPanel lp, DrakeGeneticsServiceAsync drakeGeneticsService) {
    this.libraryPanel = lp;

    final DrakeGeneticsServiceAsync dgs = drakeGeneticsService;
    drakeGeneticsService.getLibrary(
        new AsyncCallback<LibraryNode>() {
          public void onSuccess(LibraryNode results) {
            getTreeModelSucceeded(results, dgs);
          }

          public void onFailure(Throwable caught) {
            getTreeModelFailed(caught);
          }
        });

    treePanel.setHeaderVisible(true);
    treePanel.setLayout(new FitLayout());
    treePanel.setHeading("Publications");

    tree.setDisplayProperty("name");
    tree.setWidth(200);
    // tree.setHeight(450);
    tree.setHeight(670);
    tree.addListener(
        Events.OnClick,
        new Listener<TreePanelEvent<ModelData>>() {

          public void handleEvent(TreePanelEvent<ModelData> be) {
            ModelData item = be.getItem();
            String url = (String) item.get("url");
            if (url != null && !url.equals("")) {
              if (url.startsWith("/")) {
                url = url.substring(1);
              }
              libraryDocumentPanel.setUrl(GWT.getHostPageBaseURL() + url);
            }
          }
        });

    treePanel.add(tree);

    libraryPanel.add(treePanel);

    libraryDocumentPanel.setHeaderVisible(false);
    libraryDocumentPanel.setWidth(494);
    // libraryDocumentPanel.setHeight(451);
    libraryDocumentPanel.setHeight(671);
    libraryDocumentPanel.setUrl(GWT.getHostPageBaseURL() + "Library/index.html");
    libraryPanel.add(libraryDocumentPanel);
  }
예제 #20
0
 private ContentPanel getWalltimeContainer() {
   if (walltimeContainer == null) {
     walltimeContainer = new ContentPanel();
     walltimeContainer.setHeight("83px");
     walltimeContainer.setHideCollapseTool(true);
     walltimeContainer.setHeading("Walltime");
     walltimeContainer.setCollapsible(true);
     FitLayout fitLayout = new FitLayout();
     fitLayout.setExtraStyle("");
     walltimeContainer.setLayout(fitLayout);
     walltimeContainer.add(getWallTimeFormPanel(), new FitData(0));
   }
   return walltimeContainer;
 }
예제 #21
0
파일: Menu.java 프로젝트: juanmav/SiuWeb
  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    setLayout(new FlowLayout(10));

    ContentPanel accordionPanel = new ContentPanel();
    accordionPanel.setHeading("Menu Siu");
    accordionPanel.setBodyBorder(false);
    accordionPanel.setLayout(new AccordionLayout());
    accordionPanel.setHeight(500);
    tablero(accordionPanel);
    reportesMenu(accordionPanel);
    adminMenu(accordionPanel);
    populateMenu(accordionPanel);
    add(accordionPanel);
  }
예제 #22
0
 private ContentPanel getStageFileList() {
   if (stageFileList == null) {
     stageFileList = new ContentPanel();
     stageFileList.setBodyBorder(false);
     stageFileList.setBorders(true);
     stageFileList.setSize("177px", "195px");
     stageFileList.setHideCollapseTool(true);
     stageFileList.setLayout(new FitLayout());
     stageFileList.add(getListView(), new FitData(10));
     stageFileList.setHeading("Job directory");
     stageFileList.setCollapsible(true);
     stageFileList.addButton(getRemoveFileButton());
     stageFileList.addButton(getAddFileButton());
   }
   return stageFileList;
 }
예제 #23
0
  private void createGestureTypeList() {
    ContentPanel gestureTypesContainer = new ContentPanel();
    gestureTypesContainer.setHeaderVisible(false);
    gestureTypesContainer.setLayout(new FitLayout());
    // overflow-auto style is for IE hack.
    gestureTypesContainer.addStyleName("overflow-auto");
    gestureTypesContainer.setBorders(false);
    gestureTypesContainer.setBodyBorder(false);

    ListStore<BeanModel> gestureStore = new ListStore<BeanModel>();
    GestureType[] gestureTypes = GestureType.values();
    existsGestureTypeModels = new ArrayList<BeanModel>();

    for (int i = 0; i < gestureTypes.length; i++) {
      Gesture gesture = new Gesture(gestureTypes[i]);
      gesture.setOid(IDUtil.nextID());
      gestureMaps.put(gestureTypes[i].toString(), gesture);
      BeanModel gestureBeanModel = gesture.getBeanModel();
      gestureStore.add(gestureBeanModel);
      for (Gesture existGesture : gestures) {
        if (gestureTypes[i].equals(existGesture.getType())) {
          gestureMaps.put(existGesture.getType().toString(), existGesture);
          existsGestureTypeModels.add(gestureBeanModel);
        }
      }
    }

    gestureTypeListView =
        new CheckBoxListViewExt<BeanModel>() {
          @Override
          protected void afterRender() {
            super.afterRender();
            for (BeanModel checkedModel : existsGestureTypeModels) {
              this.setChecked(checkedModel, true);
            }
          }
        };
    gestureTypeListView.setStore(gestureStore);
    gestureTypeListView.setDisplayProperty("type");
    gestureTypeListView.setStyleAttribute("overflow", "auto");
    gestureTypesContainer.add(gestureTypeListView);

    BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
    westData.setMargins(new Margins(0, 5, 0, 0));
    add(gestureTypesContainer, westData);
  }
예제 #24
0
  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    ContentPanel cp = new ContentPanel();
    cp.setHeading("Charts Gallery");
    cp.setFrame(true);
    cp.setSize(700, 350);
    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));
  }
예제 #25
0
  private ContentPanel createScreenPairList(GroupRef groupRef) {
    TouchPanelDefinition touchPanel = groupRef.getPanel().getTouchPanelDefinition();

    ContentPanel screenContainer = new ContentPanel();
    screenContainer.setHeaderVisible(false);
    screenContainer.setWidth(260);
    screenContainer.setHeight(150);
    screenContainer.setLayout(new FitLayout());
    // overflow-auto style is for IE hack.
    screenContainer.addStyleName("overflow-auto");

    screenPairListView = new CheckBoxListView<BeanModel>();
    ListStore<BeanModel> store = new ListStore<BeanModel>();

    List<BeanModel> otherModels = new ArrayList<BeanModel>();
    List<BeanModel> screenPairModels = BeanModelDataBase.screenTable.loadAll();
    List<BeanModel> selectedModels = new ArrayList<BeanModel>();
    for (ScreenPairRef screenRef : groupRef.getGroup().getScreenRefs()) {
      selectedModels.add(screenRef.getScreen().getBeanModel());
    }
    for (BeanModel screenPairModel : screenPairModels) {
      if (((ScreenPair) screenPairModel.getBean()).getTouchPanelDefinition().equals(touchPanel)) {
        store.add(screenPairModel);
        screenPairListView.getSelectionModel().select(screenPairModel, true);
      } else if (((ScreenPair) screenPairModel.getBean())
          .getTouchPanelDefinition()
          .getCanvas()
          .equals(touchPanel.getCanvas())) {
        otherModels.add(screenPairModel);
      }
    }

    store.add(otherModels);
    for (BeanModel selectedModel : selectedModels) {
      screenPairListView.setChecked(selectedModel, true);
    }
    screenPairListView.setStore(store);
    screenPairListView.setDisplayProperty("panelName");
    screenPairListView.setStyleAttribute("overflow", "auto");
    screenPairListView.setSelectStyle("screen-view-item-sel");
    screenContainer.add(screenPairListView);
    return screenContainer;
  }
예제 #26
0
 /**
  * ******************************************************* View Info Side Panel Functions
  * ********************************************************
  */
 private void editPanelInfo(DataSourceUI dataSourceUI) {
   // Only do when visible to enhance performance
   if (viewDsInfoPanel.isExpanded()) {
     DataSetSideViewInfo dataSetViewInfo = new DataSetSideViewInfo();
     dataSetViewInfo.createForm(dataSourceUI);
     viewDsInfoPanel.removeAll();
     viewDsInfoPanel.setLayout(new FitLayout());
     viewDsInfoPanel.add(dataSetViewInfo);
     viewDsInfoPanel.setHeading(
         HarvesterUI.CONSTANTS.viewDataSet()
             + ": "
             + dataSourceUI.getDataSourceSet()
             + " ("
             + HarvesterUI.CONSTANTS.dataProvider()
             + ": "
             + dataSourceUI.getDataSetParent().getName()
             + ")");
   }
 }
예제 #27
0
  protected void buildTable() {

    columns = new TableColumn[7];

    columns[0] = new TableColumn("Scientific Name", .27f);
    columns[0].setMinWidth(75);
    columns[0].setMaxWidth(300);

    columns[1] = new TableColumn("Common Name", .27f);
    columns[1].setMaxWidth(300);
    columns[1].setMinWidth(75);
    columns[1].setAlignment(HorizontalAlignment.LEFT);

    columns[2] = new TableColumn("Level", .1f);
    columns[2].setMaxWidth(50);
    columns[2].setMaxWidth(100);

    columns[3] = new TableColumn("Category", .1f);
    columns[3].setMaxWidth(50);
    columns[3].setMaxWidth(50);
    columns[3].setAlignment(HorizontalAlignment.RIGHT);

    columns[4] = new TableColumn("id", 0);
    columns[4].setHidden(true);

    columns[5] = new TableColumn("Family", .13f);
    columns[5].setMinWidth(75);
    columns[5].setMaxWidth(100);
    columns[5].setAlignment(HorizontalAlignment.RIGHT);

    columns[6] = new TableColumn("Genus", .13f);
    columns[6].setMinWidth(75);
    columns[6].setMaxWidth(100);
    columns[6].setAlignment(HorizontalAlignment.RIGHT);

    TableColumnModel cm = new TableColumnModel(columns);
    table.setColumnModel(cm);

    expandableResults.setLayout(new BorderLayout());
    expandableResults.add(table, new BorderLayoutData(LayoutRegion.CENTER));
    expandableResults.add(toolbar, new BorderLayoutData(LayoutRegion.SOUTH, 30));
  }
예제 #28
0
  private void createMainPanel() {
    mainGridPanel =
        new ContentPanel() {
          @Override
          protected void onResize(int width, int height) {
            super.onResize(width, height);
            mainGridPanel.layout(true);
            mainDataGrid.repaint();
            mainDataGrid.getView().refresh(false);
          }
        };

    mainBorderLayout = new BorderLayout();
    mainGridPanel.setLayout(mainBorderLayout);
    mainGridPanel.setHeaderVisible(false);

    browseFilterPanel = (BrowseFilterPanel) Registry.get("browseFilterPanel");

    createViewDSInfoPanel();
  }
예제 #29
0
  public ContentPanel initWeiget() {
    ContentPanel panel = new ContentPanel();
    //		TabPanel tabpanel = new TabPanel();
    //
    //		tabpanel.setAutoWidth(true);
    //
    //		tabpanel.setAutoHeight(true);
    //		TabItem normal = new TabItem("商品分类");
    //
    //		normal.add(CreateGcode());
    //
    //
    //
    //		tabpanel.add(normal);

    TableLayout tl = new TableLayout(2);

    panel.setLayout(tl);
    TableData td = new TableData();
    td.setColspan(1);
    td.setRowspan(4);
    td.setVerticalAlign(VerticalAlignment.TOP);
    TableData td1 = new TableData();
    td1.setColspan(1);
    td1.setRowspan(1);
    td1.setVerticalAlign(VerticalAlignment.TOP);
    TableData td2 = new TableData();
    td2.setColspan(1);
    td2.setRowspan(1);
    td2.setVerticalAlign(VerticalAlignment.TOP);
    td2.setHorizontalAlign(HorizontalAlignment.LEFT);
    panel.add(CreateGcode(), td);
    panel.add(CreateGcodeAttrgroup(), td1);
    panel.add(CreateGcodeAttr(), td2);

    setMaincomponent(gcodeegrid);
    registerMainStore(gcodestore);
    this.registerStore(gcodestore);

    return panel;
  }
  @Override
  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
    setLayout(new FitLayout());

    ContentPanel content = new ContentPanel();
    content.setHeaderVisible(false);
    content.setBodyBorder(false);
    content.setLayout(new FitLayout());

    grid = createGrid();
    content.add(grid);

    // 添加工具栏
    ToolBar toolBar = new ToolBar();
    Button printButton = new Button("打印", Resources.ICONS.printer());
    toolBar.add(printButton);

    content.setTopComponent(toolBar);
    add(content);
  }