@ Override public void validate ( ) { boolean flagA = ! controller . isEnableSQLDatabaseOutput ( ) ; boolean flagB = controller . isMultipleOutputFiles ( ) ; OutputCompressionEnum oce = controller . getOutputCompression ( ) ; enableZipEncodingCompression . setSelected ( controller . isZipCompressionEnabled ( ) ) ; disableOutputCompression . setSelected ( oce == OutputCompressionEnum . None ) ; enableBZip2OutputCompression . setSelected ( oce == OutputCompressionEnum . BZip2 ) ; activateDataFileOutput . setSelected ( controller . isEnableDataFileOutput ( ) ) ; outputLabel . setEnabled ( flagA ) ; outputPathField . setEnabled ( flagA ) ; enableZipEncodingCompression . setEnabled ( flagA ) ; outputCompression . setEnabled ( flagA ) ; disableOutputCompression . setEnabled ( flagA ) ; enable7ZipOutputCompression . setEnabled ( flagA && controller . is7ZipEnabled ( ) ) ; enable7ZipOutputCompression . setSelected ( oce == OutputCompressionEnum . SevenZip ) ; enableBZip2OutputCompression . setEnabled ( flagA ) ; //Enable multiple output files only for uncompressed output enableMultipleOutputFiles . setEnabled ( flagA && ( oce == OutputCompressionEnum . None ) ) ; enableMultipleOutputFiles . setSelected ( flagB ) ; outputSizeLimitLabel . setEnabled ( flagA && flagB && ( oce == OutputCompressionEnum . None ) ) ; outputSizeLimitField . setEnabled ( flagA && flagB && ( oce == OutputCompressionEnum . None ) ) ; }
A call of this method should validate the status of the panels components .