Search in sources :

Example 1 with CampaignPanel

use of pcgen.gui2.converter.panel.CampaignPanel 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;
}
Also used : CampaignFileLoader(pcgen.persistence.CampaignFileLoader) WriteDirectoryPanel(pcgen.gui2.converter.panel.WriteDirectoryPanel) CampaignPanel(pcgen.gui2.converter.panel.CampaignPanel) ArrayList(java.util.ArrayList) WindowAdapter(java.awt.event.WindowAdapter) RunConvertPanel(pcgen.gui2.converter.panel.RunConvertPanel) SummaryPanel(pcgen.gui2.converter.panel.SummaryPanel) RunConvertPanel(pcgen.gui2.converter.panel.RunConvertPanel) ConvertSubPanel(pcgen.gui2.converter.panel.ConvertSubPanel) WindowEvent(java.awt.event.WindowEvent) GameModePanel(pcgen.gui2.converter.panel.GameModePanel) StartupPanel(pcgen.gui2.converter.panel.StartupPanel) GameModeFileLoader(pcgen.persistence.GameModeFileLoader) SourceSelectionPanel(pcgen.gui2.converter.panel.SourceSelectionPanel)

Aggregations

WindowAdapter (java.awt.event.WindowAdapter)1 WindowEvent (java.awt.event.WindowEvent)1 ArrayList (java.util.ArrayList)1 CampaignPanel (pcgen.gui2.converter.panel.CampaignPanel)1 ConvertSubPanel (pcgen.gui2.converter.panel.ConvertSubPanel)1 GameModePanel (pcgen.gui2.converter.panel.GameModePanel)1 RunConvertPanel (pcgen.gui2.converter.panel.RunConvertPanel)1 SourceSelectionPanel (pcgen.gui2.converter.panel.SourceSelectionPanel)1 StartupPanel (pcgen.gui2.converter.panel.StartupPanel)1 SummaryPanel (pcgen.gui2.converter.panel.SummaryPanel)1 WriteDirectoryPanel (pcgen.gui2.converter.panel.WriteDirectoryPanel)1 CampaignFileLoader (pcgen.persistence.CampaignFileLoader)1 GameModeFileLoader (pcgen.persistence.GameModeFileLoader)1