コード例 #1
0
 public void addCharacteristic(AnatomicEntityCharacteristic characteristic) {
   if (characteristics == null) {
     characteristics = new ArrayList<AnatomicEntityCharacteristic>();
   }
   characteristics.add(characteristic);
   characteristic.setItemNumber(characteristics.size());
   characteristic.initRemoveCommand(characteristics);
   characteristic.initContext(characteristics);
   characteristic.setNumberingCommand(
       new NumberingCommand() {
         @Override
         public void execute() {
           reNumberCharacteristics();
         }
       });
 }
コード例 #2
0
 @SuppressWarnings("unused")
 @Commit
 private void afterPropertiesSet() {
   if (characteristics != null) {
     for (AnatomicEntityCharacteristic characteristic : characteristics) {
       characteristic.initRemoveCommand(characteristics);
       characteristic.initContext(characteristics);
       characteristic.setNumberingCommand(
           new NumberingCommand() {
             @Override
             public void execute() {
               reNumberCharacteristics();
             }
           });
     }
   }
 }