private void setMode( final Mode mode ) {
		switch( mode ) {
			case LOAD_FILE:
				dialog.setMode( FileDialog.LOAD );
				break;

			case SAVE_FILE:
				dialog.setMode( FileDialog.SAVE );
				break;

			case CHOOSE_DIR:
				dialog.setMode( FileDialog.LOAD );
				dialog.setFilenameFilter( new FilenameFilter() {
					@Override
					public boolean accept( final File dir, final String name ) {
						return new File( dir, name ).isDirectory();
					}
				} );
				break;

			default:
				throw new IllegalArgumentException( mode.toString() );
		}
	}