All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.praxislive.ide.components.ui.ComponentsPanel Maven / Gradle / Ivy

The newest version!

package org.praxislive.ide.components.ui;

import org.praxislive.ide.components.ComponentSettings;

final class ComponentsPanel extends javax.swing.JPanel {

    private final ComponentsOptionsPanelController controller;

    ComponentsPanel(ComponentsOptionsPanelController controller) {
        this.controller = controller;
        initComponents();
        // TODO listen to changes in form fields and call controller.changed()
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // //GEN-BEGIN:initComponents
    private void initComponents() {

        defaultConfigPanel = new javax.swing.JPanel();
        showDepCheckbox = new javax.swing.JCheckBox();
        rwDepDesc = new javax.swing.JLabel();
        rwDepCheckbox = new javax.swing.JCheckBox();
        showDepDesc = new javax.swing.JLabel();

        defaultConfigPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ComponentsPanel.class, "ComponentsPanel.defaultConfigPanel.border.title"))); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(showDepCheckbox, org.openide.util.NbBundle.getMessage(ComponentsPanel.class, "ComponentsPanel.showDepCheckbox.text")); // NOI18N

        rwDepDesc.setForeground(javax.swing.UIManager.getDefaults().getColor("textInactiveText"));
        rwDepDesc.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        org.openide.awt.Mnemonics.setLocalizedText(rwDepDesc, org.openide.util.NbBundle.getMessage(ComponentsPanel.class, "ComponentsPanel.rwDepDesc.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(rwDepCheckbox, org.openide.util.NbBundle.getMessage(ComponentsPanel.class, "ComponentsPanel.rwDepCheckbox.text")); // NOI18N

        showDepDesc.setForeground(javax.swing.UIManager.getDefaults().getColor("textInactiveText"));
        showDepDesc.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        org.openide.awt.Mnemonics.setLocalizedText(showDepDesc, org.openide.util.NbBundle.getMessage(ComponentsPanel.class, "ComponentsPanel.showDepDesc.text")); // NOI18N

        javax.swing.GroupLayout defaultConfigPanelLayout = new javax.swing.GroupLayout(defaultConfigPanel);
        defaultConfigPanel.setLayout(defaultConfigPanelLayout);
        defaultConfigPanelLayout.setHorizontalGroup(
            defaultConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(defaultConfigPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(defaultConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rwDepDesc, javax.swing.GroupLayout.DEFAULT_SIZE, 593, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, defaultConfigPanelLayout.createSequentialGroup()
                        .addComponent(showDepDesc, javax.swing.GroupLayout.DEFAULT_SIZE, 587, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(defaultConfigPanelLayout.createSequentialGroup()
                        .addGroup(defaultConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(showDepCheckbox)
                            .addComponent(rwDepCheckbox))
                        .addGap(0, 0, Short.MAX_VALUE))))
        );
        defaultConfigPanelLayout.setVerticalGroup(
            defaultConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(defaultConfigPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(showDepCheckbox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(showDepDesc)
                .addGap(18, 18, 18)
                .addComponent(rwDepCheckbox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rwDepDesc)
                .addContainerGap(64, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(defaultConfigPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(defaultConfigPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// //GEN-END:initComponents

    void load() {
        showDepCheckbox.setSelected(ComponentSettings.getShowDeprecated());
        rwDepCheckbox.setSelected(ComponentSettings.getRewriteDeprecated());
    }

    void store() {
        ComponentSettings.setShowDeprecated(showDepCheckbox.isSelected());
        ComponentSettings.setRewriteDeprecated(rwDepCheckbox.isSelected());
    }

    boolean valid() {
        return true;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel defaultConfigPanel;
    private javax.swing.JCheckBox rwDepCheckbox;
    private javax.swing.JLabel rwDepDesc;
    private javax.swing.JCheckBox showDepCheckbox;
    private javax.swing.JLabel showDepDesc;
    // End of variables declaration//GEN-END:variables
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy