コード例 #1
0
 @Override
 public boolean setXMLAttribute(final int hash, final String value, final ConverterLibrary cl) {
   if (hash == WatcherContainer.ALIGN_HASH) {
     this.setAlign(Alignment9.value(value));
   } else if (hash == WatcherContainer.USE_TARGET_POSITIONNING_HASH) {
     this.setUseTargetPositionning(PrimitiveConverter.getBoolean(value));
   } else if (hash == WatcherContainer.X_OFFSET_HASH) {
     this.setXOffset(PrimitiveConverter.getInteger(value));
   } else {
     if (hash != WatcherContainer.Y_OFFSET_HASH) {
       return super.setXMLAttribute(hash, value, cl);
     }
     this.setYOffset(PrimitiveConverter.getInteger(value));
   }
   return true;
 }
コード例 #2
0
 @Override
 public boolean setPropertyAttribute(final int hash, final Object value) {
   if (hash == WatcherContainer.ALIGN_HASH) {
     this.setAlign((Alignment9) value);
   } else if (hash == WatcherContainer.USE_TARGET_POSITIONNING_HASH) {
     this.setUseTargetPositionning(PrimitiveConverter.getBoolean(value));
   } else if (hash == WatcherContainer.X_OFFSET_HASH) {
     this.setXOffset(PrimitiveConverter.getInteger(value));
   } else if (hash == WatcherContainer.Y_OFFSET_HASH) {
     this.setYOffset(PrimitiveConverter.getInteger(value));
   } else {
     if (hash != WatcherContainer.TARGET_HASH) {
       return super.setPropertyAttribute(hash, value);
     }
     this.setTarget((ScreenTarget) value);
   }
   return true;
 }