if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_GENERAL_DATE.equals( category ) )
if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTED.equals( category ) ) { String pattern = null; String fmtStr = new DateFormatter( pattern ).format( sampleDateTime ); generalPreviewLabel.setText( validatedFmtStr( fmtStr ) ); setCategory(null); setPattern( null ); } else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_GENERAL_DATE.equals( category ) )
	private void updatePreview( )	{		markDirty( hasLoaded );		String category = getCategory4UIDisplayName( typeChoicer.getText( ) );		setCategory( category );		Date sampleDateTime = new Date( );		if ( getPreviewText( ) != null )		{			try			{				sampleDateTime = new Date( getPreviewText( ) );			}			catch ( Exception e )			{				//			}		}		if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_GENERAL_DATE.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_MUDIUM_DATE.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_TIME.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_MEDIUM_TIME.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_TIME.equals( category ) )		{			String pattern = getPatternForCategory( category );			String fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			generalPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		else if ( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM.equals( category ) )		{			String pattern = formatCode.getText( );			String fmtStr;			if ( StringUtil.isBlank( previewTextBox.getText( ) ) )			{				fmtStr = new DateFormatter( pattern ).format( sampleDateTime );			}			else			{				String text = previewTextBox.getText( );				try				{					fmtStr = new DateFormatter( pattern ).format( new Date( text ) );				}				catch ( Exception e )				{					fmtStr = PREVIEW_TEXT_INVALID_DATETIME_TO_PREVIEW;				}			}			cusPreviewLabel.setText( validatedFmtStr( fmtStr ) );			setPattern( pattern );		}		if ( hasLoaded )		{			fireFormatChanged( getCategory( ), getPattern( ) );		}		return;	}