Search in sources :

Example 1 with LogSettingsAddon

use of org.openecard.richclient.gui.manage.core.LogSettingsAddon in project open-ecard by ecsec.

the class ManagementDialog method createCoreList.

private void createCoreList() {
    JLabel label = new JLabel(lang.translationForKey("addon.list.core", AppVersion.getName()));
    label.setFont(label.getFont().deriveFont(Font.BOLD));
    GridBagConstraints labelConstraints = new GridBagConstraints();
    labelConstraints.insets = new Insets(5, 0, 5, 10);
    labelConstraints.anchor = GridBagConstraints.NORTH;
    labelConstraints.gridx = 0;
    labelConstraints.gridy = 1;
    selectionPanel.add(label, labelConstraints);
    coreList = new JList();
    coreList.setFont(coreList.getFont().deriveFont(Font.PLAIN));
    coreList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    GridBagConstraints coreListConstraints = new GridBagConstraints();
    coreListConstraints.fill = GridBagConstraints.HORIZONTAL;
    coreListConstraints.insets = new Insets(0, 5, 5, 10);
    coreListConstraints.anchor = GridBagConstraints.NORTH;
    coreListConstraints.gridx = 0;
    coreListConstraints.gridy = 2;
    AddonSelectionModel model = new AddonSelectionModel(this, addonPanel);
    coreList.setModel(model);
    coreList.addListSelectionListener(model);
    // save current addon settings when closed
    addWindowListener(model);
    // add addon panels
    model.addElement(lang.translationForKey("addon.list.core.general"), new GeneralSettingsAddon());
    model.addElement(lang.translationForKey("addon.list.core.connection"), new ConnectionSettingsAddon());
    model.addElement(lang.translationForKey("addon.list.core.logging"), new LogSettingsAddon());
    // an ActionPanel for every addon that has one ore more AppExtensionActions will be added
    for (AddonSpecification desc : cpReg.listAddons()) {
        createAddonPaneFromAddonSpec(desc, model, true);
    }
    selectionPanel.add(coreList, coreListConstraints);
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) LogSettingsAddon(org.openecard.richclient.gui.manage.core.LogSettingsAddon) Insets(java.awt.Insets) GeneralSettingsAddon(org.openecard.richclient.gui.manage.core.GeneralSettingsAddon) ConnectionSettingsAddon(org.openecard.richclient.gui.manage.core.ConnectionSettingsAddon) JLabel(javax.swing.JLabel) AddonSpecification(org.openecard.addon.manifest.AddonSpecification) JList(javax.swing.JList)

Aggregations

GridBagConstraints (java.awt.GridBagConstraints)1 Insets (java.awt.Insets)1 JLabel (javax.swing.JLabel)1 JList (javax.swing.JList)1 AddonSpecification (org.openecard.addon.manifest.AddonSpecification)1 ConnectionSettingsAddon (org.openecard.richclient.gui.manage.core.ConnectionSettingsAddon)1 GeneralSettingsAddon (org.openecard.richclient.gui.manage.core.GeneralSettingsAddon)1 LogSettingsAddon (org.openecard.richclient.gui.manage.core.LogSettingsAddon)1