示例#1
0
  private void jbInit() throws Exception {
    setTitle("users");
    buttonsPanel.setLayout(flowLayout1);
    flowLayout1.setAlignment(FlowLayout.LEFT);
    this.setSize(new Dimension(500, 300));
    grid.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    grid.setDeleteButton(deleteButton);
    grid.setExportButton(exportButton1);
    grid.setFunctionId("USERS");
    grid.setInsertButton(null);
    grid.setNavBar(navigatorBar1);
    grid.setReloadButton(reloadButton);
    grid.setInsertButton(insertButton);
    grid.setValueObjectClassName("demo38.UserVO");
    colUsername.setColumnFilterable(true);
    colUsername.setColumnName("username");
    colUsername.setUpperCase(true);
    colUsername.setTrimText(true);
    colUsername.setColumnSortable(true);
    colPassword.setColumnName("password");
    colPassword.setEncryptText(true);
    colDescription.setColumnName("description");
    colDescription.setPreferredWidth(350);
    colDescription.setEditableOnEdit(true);
    colDescription.setEditableOnInsert(true);
    colUsername.setEditableOnEdit(false);
    colUsername.setEditableOnInsert(true);
    colPassword.setEditableOnEdit(true);
    colPassword.setEditableOnInsert(true);
    insertButton.setText("insertButton1");
    grid.setSaveButton(saveButton);
    grid.setEditButton(editButton);
    exportButton1.setText("exportButton1");
    this.getContentPane().add(grid, BorderLayout.CENTER);
    this.getContentPane().add(buttonsPanel, BorderLayout.NORTH);
    buttonsPanel.add(insertButton, null);
    buttonsPanel.add(editButton, null);
    buttonsPanel.add(saveButton, null);
    buttonsPanel.add(reloadButton, null);
    buttonsPanel.add(deleteButton, null);
    buttonsPanel.add(exportButton1, null);
    buttonsPanel.add(navigatorBar1, null);

    grid.getColumnContainer().add(colUsername, null);
    grid.getColumnContainer().add(colPassword, null);
    grid.getColumnContainer().add(colDescription, null);
  }
示例#2
0
 private void jbInit() throws Exception {
   grid.setAnchorLastColumn(true);
   buttonsPanel.setLayout(flowLayout1);
   flowLayout1.setAlignment(FlowLayout.LEFT);
   grid.setDeleteButton(deleteButton);
   grid.setExportButton(exportButton1);
   grid.setFilterButton(filterButton1);
   grid.setFunctionId("getEmployees");
   grid.setInsertButton(null);
   grid.setNavBar(navigatorBar1);
   grid.setReloadButton(reloadButton);
   grid.setValueObjectClassName("demo36.EmpVO");
   colEmpCode.setColumnFilterable(true);
   colEmpCode.setColumnName("empCode");
   colEmpCode.setColumnSortable(false);
   colFName.setColumnFilterable(true);
   colFName.setColumnName("firstName");
   colFName.setColumnSortable(true);
   colFName.setPreferredWidth(150);
   insertButton.setText("insertButton1");
   insertButton.addActionListener(new EmpGridFrame_insertButton_actionAdapter(this));
   exportButton1.setText("exportButton1");
   colLName.setColumnFilterable(true);
   colLName.setColumnName("lastName");
   colLName.setPreferredWidth(150);
   filterButton1.setText("filterButton1");
   this.getContentPane().add(grid, BorderLayout.CENTER);
   this.getContentPane().add(buttonsPanel, BorderLayout.NORTH);
   buttonsPanel.add(insertButton, null);
   buttonsPanel.add(reloadButton, null);
   buttonsPanel.add(deleteButton, null);
   buttonsPanel.add(exportButton1, null);
   buttonsPanel.add(filterButton1, null);
   buttonsPanel.add(navigatorBar1, null);
   grid.getColumnContainer().add(colEmpCode, null);
   grid.getColumnContainer().add(colFName, null);
   grid.getColumnContainer().add(colLName, null);
 }