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

org.praxislive.ide.video.options.GeneralVideoPanel Maven / Gradle / Ivy

The newest version!
/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 * 
 * Copyright 2015 Neil C Smith.
 * 
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 3 only, as
 * published by the Free Software Foundation.
 * 
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 3 for more details.
 * 
 * You should have received a copy of the GNU General Public License version 3
 * along with this work; if not, see http://www.gnu.org/licenses/
 * 
 * 
 * Please visit https://www.praxislive.org if you need additional information or
 * have any questions.
 */
package org.praxislive.ide.video.options;

//import org.praxislive.video.VideoSettings;

final class GeneralVideoPanel extends javax.swing.JPanel {
    
    private final GeneralVideoOptionsPanelController controller;

    GeneralVideoPanel(GeneralVideoOptionsPanelController controller) {
        this.controller = controller;
        initComponents();
        initChoosers();
    }
    
    private void initChoosers() {
//        for (VideoSettings.FullScreenMode mode : VideoSettings.FullScreenMode.values()) {
//            fsemChooser.addItem(mode);
//        }
    }

    /** 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();
        fsemLbl = new javax.swing.JLabel();
        fsemChooser = new javax.swing.JComboBox();

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

        org.openide.awt.Mnemonics.setLocalizedText(fsemLbl, org.openide.util.NbBundle.getMessage(GeneralVideoPanel.class, "GeneralVideoPanel.fsemLbl.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()
                .addGap(40, 40, 40)
                .addComponent(fsemLbl)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fsemChooser, 0, 468, Short.MAX_VALUE))
        );
        defaultConfigPanelLayout.setVerticalGroup(
            defaultConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(defaultConfigPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(defaultConfigPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fsemChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fsemLbl))
                .addContainerGap(24, 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(355, Short.MAX_VALUE))
        );
    }// //GEN-END:initComponents

    void load() {
        loadFSEM();
    }

    void store() {
        saveFSEM();
    }
    
    private void loadFSEM() {
//        fsemChooser.setSelectedItem(VideoSettings.getFullScreenMode());
    }
    
    private void saveFSEM() {
//        Object o = fsemChooser.getSelectedItem();
//        if (o instanceof VideoSettings.FullScreenMode) {
//            VideoSettings.setFullScreenMode((VideoSettings.FullScreenMode) o);
//        }
    }
       

    boolean valid() {
        // TODO check whether form is consistent and complete
        return true;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel defaultConfigPanel;
    private javax.swing.JComboBox fsemChooser;
    private javax.swing.JLabel fsemLbl;
    // End of variables declaration//GEN-END:variables
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy