Ejemplo n.º 1
0
  private Component iciciCodeMappings() {
    java.util.List<TableDisplayInput> displayInputs = new ArrayList<TableDisplayInput>();

    displayInputs.add(new StringDisplayInput("ICICICode", "getIciciCode"));
    displayInputs.add(new StringDisplayInput("StockCode", "getStockCode"));

    List<ICICICodeMapping> list = Controller.getIciciMappings();
    PMTableModel tableModel =
        new PMTableModel(list, displayInputs, false) {
          @Override
          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return columnIndex == 1;
          }

          @Override
          public void setValueAt(Object value, int rowIndex, int columnIndex) {
            ((ICICICodeMapping) dataVOs.get(rowIndex)).setStock((StockVO) value);
          }
        };
    table = UIHelper.createTable(tableModel);
    table
        .getColumnModel()
        .getColumn(1)
        .setCellEditor(new DefaultCellEditor(UIHelper.createStockVOlistJCB()));
    return UIHelper.createScrollPane(table);
  }
Ejemplo n.º 2
0
 private void init() {
   UIHelper.buildPanel(this);
   flagShowProgressBar = true;
   flagShowCancel = false;
   GridBagConstraints gbc = new GridBagConstraints();
   gbc.fill = GridBagConstraints.NONE;
   gbc.insets = new Insets(10, 10, 10, 10);
   gbc.gridy = 0;
   gbc.gridx = 0;
   this.add(iciciCodeMappings(), gbc);
   gbc.gridy++;
   this.add(getActionButton("Save"), gbc);
 }