Example #1
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);
  }
Example #2
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);
   }
 }
  public RightPropertiesPanel() {

    setHeading(Constants.MENU_PROPS);
    setLayout(new FitLayout());

    ToolBar toolBarSelection = new ToolBar();
    LabelToolItem labelComponents = new LabelToolItem("Component:   ");
    toolBarSelection.add(labelComponents);
    labelComponents.setVisible(true);
    setTopComponent(toolBarSelection);

    listComponents = new SimpleComboBox<String>();
    updateFileList("Folders", listComponents);
    listComponents.add(Constants.COMPONENT_SPMANAGERWEB_NAME);
    listComponents.add("Test");
    listComponents.setForceSelection(true);
    listComponents.setEditable(false);
    listComponents.setTriggerAction(ComboBox.TriggerAction.ALL);
    listComponents.setEmptyText("- Choose a component -");
    listComponents.setFieldLabel("Component");
    listComponents.setWidth(200);
    toolBarSelection.add(listComponents);

    listComponents.addSelectionChangedListener(
        new SelectionChangedListener() {

          @Override
          public void selectionChanged(SelectionChangedEvent se) {
            selectedComponent = listComponents.getSimpleValue();
            output.setEmptyText(
                "Select a component and configuration file to display and press \"Load\"");
            updateFileList(selectedComponent, listFiles);
          }
        });

    LabelToolItem labelFiles = new LabelToolItem("    File:   ");
    toolBarSelection.add(labelFiles);
    labelFiles.setVisible(true);

    listFiles = new SimpleComboBox<String>();
    listFiles.setForceSelection(true);
    listFiles.setEditable(false);
    listFiles.setTriggerAction(ComboBox.TriggerAction.ALL);
    listFiles.setEmptyText("-Choose a file-");
    listFiles.setFieldLabel("File");
    listFiles.setAutoWidth(false);
    listFiles.setWidth(250);
    toolBarSelection.add(listFiles);

    listFiles.addSelectionChangedListener(
        new SelectionChangedListener() {

          @Override
          public void selectionChanged(SelectionChangedEvent se) {
            output.setEmptyText(
                "Select a component and configuration file to display and press \"Load\"");
            output.clear();
          }
        });

    Button loadButton = new Button("Load");
    toolBarSelection.add(loadButton);

    loadButton.addSelectionListener(
        new SelectionListener<ButtonEvent>() {

          @Override
          public void componentSelected(ButtonEvent ce) {
            updateFileContent();
          }
        });

    currentOutput = "Select a component and configuration file to display and press \"Load\"";
    output = new TextArea();
    output.addStyleName("demo-TextArea");
    output.setWidth("800px");
    output.setHeight("400px");
    output.setReadOnly(true);
    output.setEmptyText("Select a component and configuration file to display and press \"Load\"");
    output.setVisible(true);
    add(output);
  }