Package org.compiere.swing

Examples of org.compiere.swing.CComboBox


      items.add(pp);
    }
    columnValueNamePairs = new ValueNamePair[items.size()];
    items.toArray(columnValueNamePairs);
    Arrays.sort(columnValueNamePairs);    //  sort alpha
    columns = new CComboBox(columnValueNamePairs);
    columns.addActionListener(this);   
    TableColumn tc = advancedTable.getColumnModel().getColumn(INDEX_COLUMNNAME);
    tc.setPreferredWidth(150);
    FindCellEditor dce = new FindCellEditor(columns);

    dce.addCellEditorListener(new CellEditorListener()
    {
      public void editingCanceled(ChangeEvent ce)
      {
      }
    
      public void editingStopped(ChangeEvent ce)
      {
        int col = advancedTable.getSelectedColumn();
        int row = advancedTable.getSelectedRow();
        if (col == INDEX_COLUMNNAME && row >= 0)
        {
          advancedTable.setValueAt(null, row, INDEX_VALUE);
          advancedTable.setValueAt(null, row, INDEX_VALUE2);
        }
      }
    });
    tc.setCellEditor(dce);
    tc.setHeaderValue(Msg.translate(Env.getCtx(), "AD_Column_ID"));

    //  1 = Operators
    operators = new CComboBox(MQuery.OPERATORS);
    tc = advancedTable.getColumnModel().getColumn(INDEX_OPERATOR);
    tc.setPreferredWidth(40);
    dce = new FindCellEditor(operators);
    tc.setCellEditor(dce);
    tc.setHeaderValue(Msg.getMsg(Env.getCtx(), "Operator"));
View Full Code Here

TOP

Related Classes of org.compiere.swing.CComboBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.