protected void build() {
//**********************************************************
//Online search panel
//**********************************************************
DcModule module = DcModules.get(importer.getModule());
JPanel panelOs = new JPanel();
panelOs.setLayout(Layout.getGBL());
if (module.deliversOnlineService()) {
panelServer = new OnlineServicePanel(module.getOnlineServices().getServers(), true, true);
panelServerSettings = new OnlineServiceSettingsPanel(null, false, false, false, false, module.getIndex());
panelOs.add(panelServer, Layout.getGBC( 0, 3, 3, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
new Insets(15, 5, 0, 5), 0, 0));
panelOs.add(panelServerSettings, Layout.getGBC( 0, 4, 3, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
new Insets(15, 5, 0, 5), 0, 0));
panelServer.setUseOnlineService(settings.getBoolean(DcRepository.ModuleSettings.stFileImportUseOnlineService));
panelServer.setServer(settings.getString(DcRepository.ModuleSettings.stFileImportOnlineService));
panelServer.setMode(settings.getString(DcRepository.ModuleSettings.stFileImportOnlineServiceMode));
panelServer.setRegion(settings.getString(DcRepository.ModuleSettings.stFileImportOnlineServiceRegion));
}
//**********************************************************
//Actions Panel
//**********************************************************
JPanel panelActions = new JPanel();
panelActions.setLayout(Layout.getGBL());
buttonRun.addActionListener(this);
buttonRun.setActionCommand("import");
buttonStop.addActionListener(this);
buttonStop.setActionCommand("cancel");
buttonClose.addActionListener(this);
buttonClose.setActionCommand("close");
panelActions.add(buttonRun, Layout.getGBC( 0, 0, 1, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
new Insets( 5, 5, 5, 5), 0, 0));
panelActions.add(buttonStop, Layout.getGBC( 1, 0, 1, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
new Insets( 5, 5, 5, 5), 0, 0));
panelActions.add(buttonClose, Layout.getGBC( 2, 0, 1, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
new Insets( 5, 5, 5, 5), 0, 0));
//**********************************************************
//Progress panel
//**********************************************************
JPanel panelProgress = new JPanel();
panelProgress.setLayout(Layout.getGBL());
panelProgress.add(progressBar, Layout.getGBC( 0, 1, 1, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
new Insets(5, 5, 5, 5), 0, 0));
//**********************************************************
//Log Panel
//**********************************************************
JPanel panelLog = new JPanel();
panelLog.setLayout(Layout.getGBL());
textLog.setEditable(false);
JScrollPane scroller = new JScrollPane(textLog);
scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
panelLog.setBorder(ComponentFactory.getTitleBorder(DcResources.getText("lblLog")));
panelLog.add(scroller, Layout.getGBC( 0, 1, 1, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
new Insets(5, 5, 5, 5), 0, 0));
//**********************************************************
//Local Art
//**********************************************************
panelLocalArt = new LocalArtSettingsPanel(importer.getModule());
FileNameFilter filter =
importer.getSupportedFileTypes() != null &&
importer.getSupportedFileTypes().length > 0 ?
new FileNameFilter(importer.getSupportedFileTypes(), true) : null;
//**********************************************************
//Files / Directories
//**********************************************************
panelFs = new FileImportFileSelectPanelSimple(this, filter, module.getIndex());
//**********************************************************
//Tabs Panel
//**********************************************************
JTabbedPane tp = ComponentFactory.getTabbedPane();
tp.addTab(DcResources.getText("lblDirectoriesFiles"), IconLibrary._icoOpen , panelFs);
tp.addTab(DcResources.getText("lblSettings"), IconLibrary._icoSettings16, getSettingsPanel());
tp.addTab(DcResources.getText("lblTitleCleanup"), IconLibrary._icoSettings16, getTitleCleanupPanel());
if (module.deliversOnlineService())
tp.addTab(DcResources.getText("lblOnlineSearch"), IconLibrary._icoSearchOnline16, panelOs);
if (importer.canImportArt())
tp.addTab(DcResources.getText("lblLocalArt"), IconLibrary._icoPicture, panelLocalArt);