示例#1
0
  private void onInit() {
    viewportPanel.setHeaderVisible(false);
    viewportPanel.setLayout(new BorderLayout());

    viewport.setLayout(new FitLayout());
    viewport.add(viewportPanel);
  }
  public TeachersUI() {
    setScrollMode(Scroll.AUTO);
    setId("centerPanelBackground");
    addStyleName("uiContainer");
    setHeaderVisible(false);

    image = Resources.ICONS.image();
    add(image.createImage());

    String text = "<br><center><font color='orange' size='5px'>Teachers</font></center>";
    text += "<h2>Teachers directions here </h2> ";
    label = new Label();
    label.setText(text);
    add(label);

    videoPanel = new ContentPanel();
    videoPanel.setId("jwplayer");
    videoPanel.setHeaderVisible(false);
    videoPanel.setBodyBorder(false);
    add(videoPanel);

    Timer timer =
        new Timer() {

          @Override
          public void run() {
            loadVideoPlayer();
          }
        };

    timer.schedule(50);
  }
示例#3
0
  @Override
  public void initialize() {
    container =
        Panels.content(
            null,
            false,
            Layouts.vBoxLayout(
                VBoxLayout.VBoxLayoutAlign.STRETCH, new Layouts.LayoutOptions(new Padding(10))),
            "x-border-layout-ct");
    container.setScrollMode(Style.Scroll.AUTOY);
    container.addStyleName("contact-details-container");
    add(container);

    saveButton = Forms.button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());
    deleteButton = Forms.button(I18N.CONSTANTS.delete(), IconImageBundle.ICONS.remove());
    exportButton = Forms.button(I18N.CONSTANTS.export(), IconImageBundle.ICONS.excel());

    toolBar = new ToolBar();
    toolBar.setAlignment(Style.HorizontalAlignment.LEFT);
    toolBar.setBorders(false);
    toolBar.add(saveButton);
    toolBar.add(deleteButton);
    toolBar.add(exportButton);

    container.setTopComponent(toolBar);
  }
示例#4
0
  public SearchPanel(PanelManager manager) {
    panelManager = manager;

    // BUILDING ALL FINAL STUFFS
    expandableResults = new ContentPanel();
    expandableResults.setStyleName("x-panel");
    expandableResults.setCollapsible(true);

    expandableSearch = new HorizontalPanel();

    advancedOptions = new ContentPanel();
    advancedOptions.setCollapsible(true);
    advancedOptions.setStyleName("x-panel");

    common = new CheckBox();
    sciName = new CheckBox();
    countryOfOcc = new CheckBox();
    countryOfOccText = new TextBox();
    assessor = new CheckBox();
    assessorText = new TextBox();
    table = new Table();
    table.setBulkRender(false);
    searchBox = new TextBox();
    searchBox.addKeyboardListener(
        new KeyboardListenerAdapter() {
          @Override
          public void onKeyPress(Widget sender, char keyCode, int modifiers) {
            if (keyCode == KEY_ENTER) searchButton.fireEvent(Events.Select);
          }
        });

    // setLayoutOnChange(true);
    build();
  }
 public ContentPanel getNewContentPanel() {
   ContentPanel contentPanel = new ContentPanel();
   contentPanel.setLayout(new FitLayout());
   contentPanel.setHeading(getPanelTitle());
   IconSupplier.setIcon(contentPanel, IconSupplier.getReportIconName());
   return contentPanel;
 }
  protected void initUI() {
    TabItem west = (TabItem) Registry.get(AppView.TAB_STORAGE);
    ContentPanel clusters = new ContentPanel();
    clusters.setAnimCollapse(false);
    clusters.setHeading("Storage Engines");
    clusters.addListener(
        Events.Expand,
        new Listener<ComponentEvent>() {
          public void handleEvent(ComponentEvent be) {
            Dispatcher.get().dispatch(AppEvents.NAV_STORAGE);
          }
        });

    storageEnginesPanel = new StorageEnginesPanel();
    storageEnginesPanel
        .getGrid()
        .getSelectionModel()
        .addSelectionChangedListener(
            new SelectionChangedListener<StorageEngine>() {
              @Override
              public void selectionChanged(SelectionChangedEvent<StorageEngine> se) {
                AppEvent evt = new AppEvent(AppEvents.VIEW_STORAGE_ENGINE, se.getSelectedItem());
                Dispatcher.forwardEvent(evt);
              }
            });
    clusters.add(storageEnginesPanel, new BorderLayoutData(LayoutRegion.CENTER));

    west.add(clusters);
  }
  private ContentPanel buildConfigBloc(ConfigGroup configGroup, ImageResource icon) {
    final ContentPanel cPanel = new ContentPanel(new ColumnLayout());
    cPanel.setHeading(
        "<div class='config-title'>" + I18nUtils.getString(configGroup.key) + "</div>");
    cPanel.getHeader().addStyleName("config-header");
    cPanel.setCollapsible(true);
    cPanel.setAnimCollapse(false);
    cPanel.collapse();
    cPanel.setIcon(AbstractImagePrototype.create(icon));
    cPanel.addListener(
        Events.Expand,
        new Listener<ComponentEvent>() {

          @Override
          public void handleEvent(ComponentEvent be) {
            cPanel.layout(true);
          }
        });

    cPanel.getHeader().addDomHandler(this, ClickEvent.getType());
    mapConfigGroupPanel.put(configGroup, cPanel);
    mapHeaderGroup.put(cPanel.getHeader(), cPanel);

    return cPanel;
  }
示例#8
0
  @Override
  public void initialize() {

    mainPanel = Panels.content("");
    mainPanel.setHeaderVisible(false);

    Label label = new Label(I18N.CONSTANTS.projectCoreSelectVersion());

    mainPanel.add(label);

    amendmentsComboBox1 = new ComboBox<AmendmentDTO>();
    amendmentsComboBox1.setStore(new ListStore<AmendmentDTO>());
    amendmentsComboBox1.setDisplayField("name");
    amendmentsComboBox1.setTriggerAction(ComboBox.TriggerAction.ALL);

    amendmentsComboBox2 = new ComboBox<AmendmentDTO>();
    amendmentsComboBox2.setStore(new ListStore<AmendmentDTO>());
    amendmentsComboBox2.setDisplayField("name");
    amendmentsComboBox2.setTriggerAction(ComboBox.TriggerAction.ALL);

    final LayoutContainer container = Layouts.hBox(HBoxLayoutAlign.TOP);

    container.add(amendmentsComboBox1, Layouts.hBoxData(Margin.LEFT));
    container.add(amendmentsComboBox2, Layouts.hBoxData(Margin.LEFT));

    projectFields = buildGrid();

    mainPanel.setScrollMode(Scroll.AUTO);
    mainPanel.add(container);
    mainPanel.add(projectFields);

    initPopup(mainPanel);
  }
示例#9
0
  /** {@inheritDoc} */
  @Override
  protected Component getComponent(ValueResult valueResult, boolean enabled) {
    final boolean canAdd = enabled && userCanPerformChangeType(ValueEventChangeType.ADD);

    final ContentPanel component = new ContentPanel();
    component.setHeadingText(getLabel());

    // Setting up the report store
    final List<?> reports = valueResult.getValuesObject();

    final ListStore<ReportReference> store = new ListStore<ReportReference>();
    if (reports != null) store.add((List<ReportReference>) reports);

    // Creating the toolbar
    if (canAdd) {
      component.setTopComponent(createToolbar(store));
    }

    // Creating the grid
    final FlexibleGrid<ReportReference> reportGrid =
        new FlexibleGrid<ReportReference>(store, null, createColumnModel(enabled));
    reportGrid.setAutoExpandColumn("name");
    reportGrid.setVisibleElementsCount(5);

    component.add(reportGrid);

    return component;
  }
示例#10
0
 /**
  * Show or Hide West panel
  *
  * @param visible
  */
 public static void managePanel(ContentPanel cp, boolean visible) {
   if (visible) {
     cp.show();
   } else {
     cp.hide();
   }
   Dispatcher.forwardEvent(GeoPlatformEvents.UPDATE_CENTER);
 }
示例#11
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;
 }
示例#12
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;
 }
示例#13
0
  private void showRepoTree(Repository repo) {
    if (repo == null) {
      return;
    }

    repoTreePanel.setHeading((String) repo.get("name") + " Repository Content");
    repoTreeBinding.selectRepository(repo);

    repoPanel.removeAll();
    repoPanel.add(repoTree);
  }
示例#14
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;
 }
示例#15
0
 /**
  * DOC bessaies Comment method "updateBlockLayout".
  *
  * @param event
  */
 private void updateBlockLayout(Object source) {
   ContentPanel contentPanel = mapHeaderGroup.get(source);
   if (null != contentPanel) {
     if (contentPanel.isCollapsed()) {
       contentPanel.expand();
     } else {
       contentPanel.collapse();
     }
     contentPanel.layout(true);
   }
 }
示例#16
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;
 }
示例#17
0
 public void updateStatus(
     ConfigGroup configGroup, ConfigStatus status, String message, boolean bling) {
   ContentPanel contentPanel = mapConfigGroupPanel.get(configGroup);
   if (null != contentPanel) {
     String headling = I18nUtils.getString(configGroup.key);
     if (null != message) {
       headling += message;
     }
     String s = decorateStatus(headling, status, null, bling);
     contentPanel.setHeading(s);
   }
 }
示例#18
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);
   }
 }
示例#19
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);
  }
示例#20
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);
  }
示例#21
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);
  }
  private ContentPanel createMulti() {
    ContentPanel panel = new SamplePanel();
    panel.setHeading("Multi Columns");

    ToolBar toolBar = new ToolBar();
    panel.setTopComponent(toolBar);

    ButtonGroup group = new ButtonGroup(2);
    group.setHeading("Clipboard");

    Button btn = new Button("Cool", IconHelper.createStyle("add16"));
    group.add(btn);

    btn = new Button("Cut", IconHelper.createStyle("add16"));
    Menu menu = new Menu();
    menu.add(new MenuItem("Copy me"));
    btn.setMenu(menu);
    group.add(btn);

    btn = new Button("Copy", IconHelper.createStyle("add16"));
    group.add(btn);

    btn = new Button("Paste", IconHelper.createStyle("add16"));
    group.add(btn);

    toolBar.add(group);

    group = new ButtonGroup(2);
    group.setHeading("Other Bugus Actions");

    btn = new Button("Cool", IconHelper.createStyle("add16"));
    group.add(btn);

    btn = new Button("Cut", IconHelper.createStyle("add16"));
    menu = new Menu();
    menu.add(new MenuItem("Copy me"));
    btn.setMenu(menu);
    group.add(btn);

    btn = new Button("Copy", IconHelper.createStyle("add16"));
    group.add(btn);

    btn = new Button("Paste", IconHelper.createStyle("add16"));
    group.add(btn);

    toolBar.add(group);
    return panel;
  }
示例#23
0
  protected void takeSnapshot() {
    if (snapshot.getSnapshotTaken() != null) return;

    contentPanel.mask("Please wait while the snapshot is compiled.");

    takeSnapshotService.takeSnapshot(
        snapshot.getSnapshotId(),
        new AsyncCallback<SnapshotInstance>() {
          public void onFailure(Throwable caught) {
            // Show the RPC error message to the user
            if (caught instanceof IllegalArgumentException)
              MessageBox.alert("Alert", caught.getMessage(), null);
            else {
              MessageBox.alert("Alert", "Take snapshot failed unexpectedly.", null);
              System.out.println(caught.getClass().getName());
              System.out.println(caught.getMessage());
            }
            contentPanel.unmask();
          }

          public void onSuccess(SnapshotInstance result) {
            snapshot.setSnapshotTaken(result.getSnapshotTaken());
            snapshot.setSnapshotRows(result.getSnapshotRows());
            snapshot.setExcelFilename(result.getExcelFilename());
            if (parentCardPanel != null) {
              parentCardPanel.reflectSnapshotChanges(snapshot);
            }
            contentPanel.unmask();
            if (store != null) store.getLoader().load();
          }
        });
  }
示例#24
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);
  }
示例#25
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;
 }
示例#26
0
  private void createFiltersPanel() {
    BorderLayoutData data = new BorderLayoutData(Style.LayoutRegion.WEST, 300, 300, 350);
    data.setMargins(new Margins(1, 5, 1, 1));
    data.setCollapsible(true);

    mainGridPanel.add(browseFilterPanel, data);
  }
示例#27
0
 private static boolean isOneWidgetVisibleAtPanel(ContentPanel cp) {
   for (Component c : cp.getItems()) {
     if (c.isVisible()) {
       return true;
     }
   }
   return false;
 }
示例#28
0
 private static Widget createClientDetails() {
   LayoutContainer ct = new LayoutContainer();
   ct.setLayout(new BorderLayout());
   ContentPanel clientDetailsEast = new ContentPanel();
   ContentPanel clientDetailsWest = new ContentPanel();
   clientDetailsWest.setHeading("Clients");
   BorderLayoutData eastClientData = new BorderLayoutData(LayoutRegion.EAST, 500);
   eastClientData.setCollapsible(false);
   eastClientData.setSplit(false);
   BorderLayoutData westClientData = new BorderLayoutData(LayoutRegion.WEST, 230);
   westClientData.setCollapsible(false);
   westClientData.setSplit(false);
   ct.setBorders(false);
   ct.add(clientDetailsEast, eastClientData);
   ct.add(clientDetailsWest, westClientData);
   return ct;
 }
示例#29
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));
  }
示例#30
0
  /**
   * DOC bessaies Comment method "build".
   *
   * @param configGroups
   */
  public void build(ConfigGroup[] configGroups) {
    for (ConfigGroup configGroup : configGroups) {
      ImageResource imageResource = IconConfigProvider.provideIcon(configGroup);
      ContentPanel cPanel = buildConfigBloc(configGroup, imageResource);
      cPanel.setVisible(false);
      FormLayout formLayout1 = new FormLayout();
      formLayout1.setLabelWidth(200);

      FormLayout formLayout2 = new FormLayout();

      final LayoutContainer fieldPart = new LayoutContainer(formLayout1);
      final LayoutContainer messagePart = new LayoutContainer(formLayout2);

      fieldPart.setStyleAttribute("padding-left", "10px");
      fieldPart.setStyleAttribute("padding-top", "10px");
      fieldPart.setStyleAttribute("padding-bottom", "10px");
      messagePart.setStyleAttribute("padding-top", "12px");
      messagePart.setStyleAttribute("padding-bottom", "12px");

      cPanel.add(fieldPart, new ColumnData(0.7));
      cPanel.add(messagePart, new ColumnData(0.25));

      for (Config config : configGroup.configs) {
        Field<?> field = null;
        switch (config.type) {
          case txt:
            field = buildTextField(fieldPart, messagePart, config);
            break;
          case password:
            field = buildPasswordField(fieldPart, messagePart, config);
            break;
          case list:
            field = buildListField(fieldPart, messagePart, config);
            break;
          default:
            break;
        }
        if (null != field) {
          mapKeyField.put(config, field);
        }
      }

      add(cPanel);
    }
  }