private void dynInit(){
  int row=addAttributes();
  boolean isGuarantee=true;
  boolean isSerial=true;
  boolean isLot=true;
  if (p_M_AttributeSet_ID > 0) {
    MAttributeSet as=new MAttributeSet(Env.getCtx(),p_M_AttributeSet_ID,null);
    isGuarantee=as.isGuaranteeDate();
    isSerial=as.isSerNo();
    isLot=as.isLot();
  }
  String s=Msg.translate(Env.getCtx(),"GuaranteeDate");
  guaranteeDateSelection=new VComboBox(new Object[]{s + " <",s + " =",s + " >"});
  initLotSelection();
  if (isSerial) {
    centerPanel.add(serNoLabel,new ALayoutConstraint(row++,0));
    centerPanel.add(serNoField,null);
  }
  if (isLot) {
    centerPanel.add(lotLabel,new ALayoutConstraint(row++,0));
    centerPanel.add(lotField,null);
    centerPanel.add(lotLabel2,new ALayoutConstraint(row++,0));
    centerPanel.add(lotSelection,null);
  }
  if (isGuarantee) {
    centerPanel.add(guaranteeDateSelection,new ALayoutConstraint(row++,0));
    centerPanel.add(guaranteeDateField,null);
  }
  Dimension d=centerPanel.getPreferredSize();
  d.width=400;
  centerPanel.setPreferredSize(d);
}

private void dynInit ( ) { int row = addAttributes ( ) ; boolean isGuarantee = true ; boolean isSerial = true ; boolean isLot = true ; if ( p_M_AttributeSet_ID > 0 ) { MAttributeSet as = new MAttributeSet ( Env . getCtx ( ) , p_M_AttributeSet_ID , null ) ; isGuarantee = as . isGuaranteeDate ( ) ; isSerial = as . isSerNo ( ) ; isLot = as . isLot ( ) ; } String s = Msg . translate ( Env . getCtx ( ) , "GuaranteeDate" ) ; guaranteeDateSelection = new VComboBox ( new Object [ ] { s + " <" , s + " =" , s + " >" } ) ; initLotSelection ( ) ; if ( isSerial ) { centerPanel . add ( serNoLabel , new ALayoutConstraint ( row ++ , 0 ) ) ; centerPanel . add ( serNoField , null ) ; } if ( isLot ) { centerPanel . add ( lotLabel , new ALayoutConstraint ( row ++ , 0 ) ) ; centerPanel . add ( lotField , null ) ; centerPanel . add ( lotLabel2 , new ALayoutConstraint ( row ++ , 0 ) ) ; centerPanel . add ( lotSelection , null ) ; } if ( isGuarantee ) { centerPanel . add ( guaranteeDateSelection , new ALayoutConstraint ( row ++ , 0 ) ) ; centerPanel . add ( guaranteeDateField , null ) ; } Dimension d = centerPanel . getPreferredSize ( ) ; d . width = 400 ; centerPanel . setPreferredSize ( d ) ; }
dynamic init of the center panel
