Esempio n. 1
0
 /**
  * @see org.easygen.ui.widgets.CheckboxCellModifier#setValue(java.lang.Object, int,
  *     java.lang.Object)
  */
 @Override
 public void setValue(Object element, int columnIndex, Object value) {
   if (element instanceof DataObject) {
     DataObject object = (DataObject) element;
     switch (columnIndex) {
       case 0:
         object.setSelected(((Boolean) value).booleanValue());
         break;
       case 1:
         break;
       case 2:
         object.setClassName((String) value);
         break;
       case 3:
         object.setUseCache(((Boolean) value).booleanValue());
         break;
       default:
         break;
     }
     return;
   }
   throw new IllegalClassException(DataObject.class, element.getClass());
 }
Esempio n. 2
0
  /**
   * @param object
   * @param columnIndex
   * @return
   */
  @Override
  protected Object getValue(Object element, int columnIndex) {
    if (!(element instanceof DataObject)) return null;
    DataObject object = (DataObject) element;

    Object result = null;
    switch (columnIndex) {
      case 0:
        result = Boolean.valueOf(object.isSelected());
        break;
      case 1:
        result = object.getTableName();
        break;
      case 2:
        result = object.getClassName();
        break;
      case 3:
        result = Boolean.valueOf(object.isUseCache());
        break;
      default:
        break;
    }
    return result;
  }