use of pcgen.gui2.converter.panel.ConvertSubPanel in project pcgen by PCGen.
the class ConvertPanel method runNextPanel.
private void runNextPanel() {
ConvertSubPanel nextpanel = null;
do {
boolean allowPrev = false;
if (currentPanel >= 0 && currentPanel < queue.size()) {
allowPrev = queue.get(currentPanel).returnAllowed();
}
currentPanel++;
if (currentPanel < queue.size()) {
nextpanel = queue.get(currentPanel);
prepare(nextpanel, allowPrev);
basePanel.removeAll();
nextpanel.setupDisplay(basePanel, properties);
basePanel.repaint();
} else {
nextpanel = null;
showFinishButton();
}
} while (nextpanel != null && nextpanel.autoAdvance(properties));
}
use of pcgen.gui2.converter.panel.ConvertSubPanel in project pcgen by PCGen.
the class PCGenDataConvert method getConverter.
private static PCGenDataConvert getConverter() {
PCGenDataConvert frame = new PCGenDataConvert();
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
List<ConvertSubPanel> panels = new ArrayList<>();
GameModeFileLoader gameModeFileLoader = new GameModeFileLoader();
CampaignFileLoader campaignFileLoader = new CampaignFileLoader();
panels.add(new StartupPanel(gameModeFileLoader, campaignFileLoader));
final ConvertPanel installPanel = new ConvertPanel(panels);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent wEvent) {
installPanel.checkExit();
}
});
panels.add(new SourceSelectionPanel());
panels.add(new GameModePanel(campaignFileLoader));
panels.add(new CampaignPanel());
panels.add(new WriteDirectoryPanel());
panels.add(new SummaryPanel());
panels.add(new RunConvertPanel(installPanel.getStatusField()));
frame.getContentPane().add(installPanel);
frame.pack();
Utility.centerComponent(frame, false);
return frame;
}
Aggregations