Exemplo n.º 1
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();
  }
Exemplo n.º 2
0
  public GroupMembersTab(final IEditor editor) {
    super(constants.members());
    this.editor = editor;
    setText(constants.members());
    setIconStyle("icon-user");
    setClosable(false);

    // create groups table
    List<TableColumn> columns = new ArrayList<TableColumn>();
    TableColumn cbox = new CheckBoxTableColumn("mem_check");
    columns.add(cbox);
    TableColumn col = new TableColumn("User", constants.user(), 200);
    col.setMinWidth(75);
    col.setMaxWidth(400);
    columns.add(col);

    TableColumnModel cm = new TableColumnModel(columns);

    membersTable = new Table(cm);
    membersTable.setSelectionMode(SelectionMode.SINGLE);
    membersTable.setHorizontalScroll(true);
    // disable to allow CheckBox widget!
    membersTable.setBulkRender(false);
    membersTable.setAutoHeight(true);

    membersTable.addTableListener(
        new TableListener() {
          public void tableCellClick(TableEvent te) {
            editor.markDirty();
          }
        });

    add(membersTable);
  }
Exemplo n.º 3
0
  GroupRolesTab(final IEditor editor) {
    super(constants.roles());
    setText(constants.roles());
    setIconStyle("icon-role2");
    setClosable(false);

    // create roles table
    List<TableColumn> columns = new ArrayList<TableColumn>();
    TableColumn cbox = new CheckBoxTableColumn("role_check");
    columns.add(cbox);
    TableColumn col = new TableColumn("Role", constants.role(), 150);
    col.setMinWidth(75);
    col.setMaxWidth(300);
    columns.add(col);
    col = new TableColumn("Right", constants.right(), 100);
    col.setAlignment(HorizontalAlignment.LEFT);
    columns.add(col);
    col = new TableColumn("Description", constants.description(), 800);
    col.setMaxWidth(800);
    col.setAlignment(HorizontalAlignment.LEFT);
    columns.add(col);

    TableColumnModel cm = new TableColumnModel(columns);

    rolesTable = new Table(cm);
    rolesTable.setSelectionMode(SelectionMode.MULTI);
    rolesTable.setHorizontalScroll(true);
    rolesTable.setBulkRender(false);
    rolesTable.setAutoHeight(true);

    rolesTable.addTableListener(
        new TableListener() {
          public void tableCellClick(TableEvent te) {
            editor.markDirty();
          }
        });

    add(rolesTable);
  }