Search in sources :

Example 41 with JTabbedPane

use of javax.swing.JTabbedPane in project JWildfire by thargor6.

the class MeshGenInternalFrame method getTabbedPane_2.

private JTabbedPane getTabbedPane_2() {
    if (tabbedPane_2 == null) {
        tabbedPane_2 = new JTabbedPane(JTabbedPane.TOP);
        tabbedPane_2.addTab("Voxelstack/Depthmap rendering", null, getPanel_95(), null);
        tabbedPane_2.addTab("Mesh generation", null, getPanel_97(), null);
    }
    return tabbedPane_2;
}
Also used : JTabbedPane(javax.swing.JTabbedPane)

Example 42 with JTabbedPane

use of javax.swing.JTabbedPane in project JWildfire by thargor6.

the class ScriptEditDialog method getTabbedPane.

private JTabbedPane getTabbedPane() {
    if (tabbedPane == null) {
        tabbedPane = new JTabbedPane(JTabbedPane.TOP);
        tabbedPane.addTab("Script", null, getScriptPanel(), null);
        tabbedPane.addTab("Description", null, getDescriptionPanel(), null);
    }
    return tabbedPane;
}
Also used : JTabbedPane(javax.swing.JTabbedPane)

Example 43 with JTabbedPane

use of javax.swing.JTabbedPane in project JWildfire by thargor6.

the class TinaInternalFrame method getTinaSolidRenderingPane.

private JTabbedPane getTinaSolidRenderingPane() {
    if (tinaSolidRenderingPane == null) {
        tinaSolidRenderingPane = new JTabbedPane(JTabbedPane.TOP);
        tinaSolidRenderingPane.addTab("Ambient shadows", null, getPanel(), null);
        tinaSolidRenderingPane.addTab("Hard shadows", null, getPanel_4(), null);
        JPanel tinaSolidRenderingMaterialPnl = new JPanel();
        tinaSolidRenderingPane.addTab("Material settings", null, tinaSolidRenderingMaterialPnl, null);
        tinaSolidRenderingMaterialPnl.setLayout(new BorderLayout(0, 0));
        tinaSolidRenderingMaterialPnl.add(getPanel_114(), BorderLayout.CENTER);
        tinaSolidRenderingMaterialPnl.add(getPanel_115(), BorderLayout.EAST);
        JPanel tinaSolidRenderingLightPnl = new JPanel();
        tinaSolidRenderingPane.addTab("Light settings", null, tinaSolidRenderingLightPnl, null);
        tinaSolidRenderingLightPnl.setLayout(null);
        tinaSolidRenderingLightPnl.add(getResetSolidRenderingMaterialsBtn());
        tinaSolidRenderingAddLightBtn = new JButton();
        tinaSolidRenderingAddLightBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    tinaController.getFlameControls().solidRenderingAddLightBtn_clicked();
                }
            }
        });
        tinaSolidRenderingAddLightBtn.setToolTipText("Add new light");
        tinaSolidRenderingAddLightBtn.setText("Add");
        tinaSolidRenderingAddLightBtn.setPreferredSize(new Dimension(56, 24));
        tinaSolidRenderingAddLightBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingAddLightBtn.setBounds(265, 6, 56, 24);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingAddLightBtn);
        JLabel lblSelectLight = new JLabel();
        lblSelectLight.setText("Selected Light");
        lblSelectLight.setPreferredSize(new Dimension(100, 22));
        lblSelectLight.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblSelectLight.setAlignmentX(1.0f);
        lblSelectLight.setBounds(6, 11, 100, 14);
        tinaSolidRenderingLightPnl.add(lblSelectLight);
        tinaSolidRenderingSelectedLightCmb = new JComboBox();
        tinaSolidRenderingSelectedLightCmb.setToolTipText("");
        tinaSolidRenderingSelectedLightCmb.setPreferredSize(new Dimension(110, 24));
        tinaSolidRenderingSelectedLightCmb.setMinimumSize(new Dimension(110, 24));
        tinaSolidRenderingSelectedLightCmb.setMaximumSize(new Dimension(32767, 24));
        tinaSolidRenderingSelectedLightCmb.setMaximumRowCount(48);
        tinaSolidRenderingSelectedLightCmb.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingSelectedLightCmb.setBounds(106, 6, 156, 24);
        tinaSolidRenderingSelectedLightCmb.addItemListener(new java.awt.event.ItemListener() {

            public void itemStateChanged(java.awt.event.ItemEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    tinaController.getFlameControls().solidRenderingSelectedLightCmb_changed();
                }
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingSelectedLightCmb);
        JLabel tinaSolidRenderingLightAltitudeLbl = new JLabel();
        tinaSolidRenderingLightAltitudeLbl.setToolTipText("");
        tinaSolidRenderingLightAltitudeLbl.setText("Altitude*");
        tinaSolidRenderingLightAltitudeLbl.setSize(new Dimension(68, 22));
        tinaSolidRenderingLightAltitudeLbl.setPreferredSize(new Dimension(94, 22));
        tinaSolidRenderingLightAltitudeLbl.setName("tinaSolidRenderingLightAltitudeLbl");
        tinaSolidRenderingLightAltitudeLbl.setLocation(new Point(390, 6));
        tinaSolidRenderingLightAltitudeLbl.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingLightAltitudeLbl.setBounds(6, 37, 68, 22);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightAltitudeLbl);
        tinaSolidRenderingLightAltitudeREd = new JWFNumberField();
        tinaSolidRenderingLightAltitudeREd.setMouseSpeed(0.1);
        tinaSolidRenderingLightAltitudeREd.setText("");
        tinaSolidRenderingLightAltitudeREd.setSize(new Dimension(100, 24));
        tinaSolidRenderingLightAltitudeREd.setPreferredSize(new Dimension(100, 24));
        tinaSolidRenderingLightAltitudeREd.setMotionPropertyName("altitude");
        tinaSolidRenderingLightAltitudeREd.setLocation(new Point(456, 4));
        tinaSolidRenderingLightAltitudeREd.setLinkedMotionControlName("tinaSolidRenderingLightAltitudeSlider");
        tinaSolidRenderingLightAltitudeREd.setLinkedLabelControlName("tinaSolidRenderingLightAltitudeLbl");
        tinaSolidRenderingLightAltitudeREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        tinaSolidRenderingLightAltitudeREd.setBounds(72, 37, 100, 24);
        tinaSolidRenderingLightAltitudeREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        tinaSolidRenderingLightAltitudeREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    if (!tinaSolidRenderingLightAltitudeREd.isMouseAdjusting() || tinaSolidRenderingLightAltitudeREd.getMouseChangeCount() == 0) {
                        if (!tinaSolidRenderingLightAltitudeSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().solidRenderingLightAltitudeREd_changed();
                }
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightAltitudeREd);
        tinaSolidRenderingLightAltitudeSlider = new JSlider();
        tinaSolidRenderingLightAltitudeSlider.setValue(0);
        tinaSolidRenderingLightAltitudeSlider.setSize(new Dimension(205, 19));
        tinaSolidRenderingLightAltitudeSlider.setPreferredSize(new Dimension(220, 19));
        tinaSolidRenderingLightAltitudeSlider.setName("tinaSolidRenderingLightAltitudeSlider");
        tinaSolidRenderingLightAltitudeSlider.setMinimum(-1800000);
        tinaSolidRenderingLightAltitudeSlider.setMaximum(1800000);
        tinaSolidRenderingLightAltitudeSlider.setLocation(new Point(558, 4));
        tinaSolidRenderingLightAltitudeSlider.setBounds(174, 37, 205, 19);
        tinaSolidRenderingLightAltitudeSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        tinaSolidRenderingLightAltitudeSlider.addChangeListener(new javax.swing.event.ChangeListener() {

            public void stateChanged(javax.swing.event.ChangeEvent e) {
                tinaController.getFlameControls().solidRenderingLightAltitudeSlider_stateChanged(e);
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightAltitudeSlider);
        JLabel tinaSolidRenderingLightAzimuthLbl = new JLabel();
        tinaSolidRenderingLightAzimuthLbl.setText("Azimuth*");
        tinaSolidRenderingLightAzimuthLbl.setSize(new Dimension(68, 22));
        tinaSolidRenderingLightAzimuthLbl.setPreferredSize(new Dimension(94, 22));
        tinaSolidRenderingLightAzimuthLbl.setName("tinaSolidRenderingLightAzimuthLbl");
        tinaSolidRenderingLightAzimuthLbl.setLocation(new Point(390, 6));
        tinaSolidRenderingLightAzimuthLbl.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingLightAzimuthLbl.setBounds(6, 61, 68, 22);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightAzimuthLbl);
        tinaSolidRenderingLightAzimuthREd = new JWFNumberField();
        tinaSolidRenderingLightAzimuthREd.setMouseSpeed(0.1);
        tinaSolidRenderingLightAzimuthREd.setText("");
        tinaSolidRenderingLightAzimuthREd.setSize(new Dimension(100, 24));
        tinaSolidRenderingLightAzimuthREd.setPreferredSize(new Dimension(100, 24));
        tinaSolidRenderingLightAzimuthREd.setMotionPropertyName("azimuth");
        tinaSolidRenderingLightAzimuthREd.setLocation(new Point(456, 4));
        tinaSolidRenderingLightAzimuthREd.setLinkedMotionControlName("tinaSolidRenderingLightAzimuthSlider");
        tinaSolidRenderingLightAzimuthREd.setLinkedLabelControlName("tinaSolidRenderingLightAzimuthLbl");
        tinaSolidRenderingLightAzimuthREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        tinaSolidRenderingLightAzimuthREd.setBounds(72, 61, 100, 24);
        tinaSolidRenderingLightAzimuthREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        tinaSolidRenderingLightAzimuthREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    if (!tinaSolidRenderingLightAzimuthREd.isMouseAdjusting() || tinaSolidRenderingLightAzimuthREd.getMouseChangeCount() == 0) {
                        if (!tinaSolidRenderingLightAzimuthSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().solidRenderingLightAzimuthREd_changed();
                }
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightAzimuthREd);
        tinaSolidRenderingLightAzimuthSlider = new JSlider();
        tinaSolidRenderingLightAzimuthSlider.setValue(0);
        tinaSolidRenderingLightAzimuthSlider.setSize(new Dimension(205, 19));
        tinaSolidRenderingLightAzimuthSlider.setPreferredSize(new Dimension(220, 19));
        tinaSolidRenderingLightAzimuthSlider.setName("tinaSolidRenderingLightAzimuthSlider");
        tinaSolidRenderingLightAzimuthSlider.setMinimum(-1800000);
        tinaSolidRenderingLightAzimuthSlider.setMaximum(1800000);
        tinaSolidRenderingLightAzimuthSlider.setLocation(new Point(558, 4));
        tinaSolidRenderingLightAzimuthSlider.setBounds(174, 61, 205, 19);
        tinaSolidRenderingLightAzimuthSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        tinaSolidRenderingLightAzimuthSlider.addChangeListener(new javax.swing.event.ChangeListener() {

            public void stateChanged(javax.swing.event.ChangeEvent e) {
                tinaController.getFlameControls().solidRenderingLightAzimuthSlider_stateChanged(e);
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightAzimuthSlider);
        tinaSolidRenderingLightColorBtn = new JButton();
        tinaSolidRenderingLightColorBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    tinaController.getFlameControls().solidRenderingLightColorBtn_clicked();
                }
            }
        });
        tinaSolidRenderingLightColorBtn.setToolTipText("Set the background color of your fractal");
        tinaSolidRenderingLightColorBtn.setPreferredSize(new Dimension(190, 24));
        tinaSolidRenderingLightColorBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingLightColorBtn.setBackground(Color.BLACK);
        tinaSolidRenderingLightColorBtn.setBounds(526, 12, 56, 24);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightColorBtn);
        JLabel lblLightColor = new JLabel();
        lblLightColor.setText("Light color*");
        lblLightColor.setSize(new Dimension(88, 22));
        lblLightColor.setPreferredSize(new Dimension(88, 22));
        lblLightColor.setLocation(new Point(4, 4));
        lblLightColor.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblLightColor.setBounds(434, 12, 90, 22);
        tinaSolidRenderingLightPnl.add(lblLightColor);
        JLabel tinaSolidRenderingLightIntensityLbl0 = new JLabel();
        tinaSolidRenderingLightIntensityLbl0.setText("Light intensity*");
        tinaSolidRenderingLightIntensityLbl0.setSize(new Dimension(68, 22));
        tinaSolidRenderingLightIntensityLbl0.setPreferredSize(new Dimension(94, 22));
        tinaSolidRenderingLightIntensityLbl0.setName("tinaSolidRenderingLightIntensityLbl0");
        tinaSolidRenderingLightIntensityLbl0.setLocation(new Point(390, 6));
        tinaSolidRenderingLightIntensityLbl0.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingLightIntensityLbl0.setBounds(434, 37, 90, 22);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightIntensityLbl0);
        tinaSolidRenderingLightIntensityREd = new JWFNumberField();
        tinaSolidRenderingLightIntensityREd.setValueStep(0.05);
        tinaSolidRenderingLightIntensityREd.setText("");
        tinaSolidRenderingLightIntensityREd.setSize(new Dimension(100, 24));
        tinaSolidRenderingLightIntensityREd.setPreferredSize(new Dimension(100, 24));
        tinaSolidRenderingLightIntensityREd.setMotionPropertyName("camPosZ");
        tinaSolidRenderingLightIntensityREd.setLocation(new Point(456, 4));
        tinaSolidRenderingLightIntensityREd.setLinkedMotionControlName("tinaSolidRenderingLightIntensitySlider");
        tinaSolidRenderingLightIntensityREd.setLinkedLabelControlName("tinaSolidRenderingLightIntensityLbl");
        tinaSolidRenderingLightIntensityREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        tinaSolidRenderingLightIntensityREd.setBounds(526, 37, 100, 24);
        tinaSolidRenderingLightIntensityREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        tinaSolidRenderingLightIntensityREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    if (!tinaSolidRenderingLightIntensityREd.isMouseAdjusting() || tinaSolidRenderingLightIntensityREd.getMouseChangeCount() == 0) {
                        if (!tinaSolidRenderingLightIntensitySlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().solidRenderingLightIntensityREd_changed();
                }
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightIntensityREd);
        tinaSolidRenderingLightIntensitySlider = new JSlider();
        tinaSolidRenderingLightIntensitySlider.setValue(0);
        tinaSolidRenderingLightIntensitySlider.setSize(new Dimension(205, 19));
        tinaSolidRenderingLightIntensitySlider.setPreferredSize(new Dimension(220, 19));
        tinaSolidRenderingLightIntensitySlider.setName("tinaSolidRenderingLightIntensitySlider");
        tinaSolidRenderingLightIntensitySlider.setMaximum(7500);
        tinaSolidRenderingLightIntensitySlider.setLocation(new Point(558, 4));
        tinaSolidRenderingLightIntensitySlider.setBounds(628, 37, 205, 19);
        tinaSolidRenderingLightIntensitySlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        tinaSolidRenderingLightIntensitySlider.addChangeListener(new javax.swing.event.ChangeListener() {

            public void stateChanged(javax.swing.event.ChangeEvent e) {
                tinaController.getFlameControls().solidRenderingLightIntensitySlider_stateChanged(e);
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightIntensitySlider);
        tinaSolidRenderingDeleteLightBtn = new JButton();
        tinaSolidRenderingDeleteLightBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    tinaController.getFlameControls().solidRenderingDeleteLightBtn_clicked();
                }
            }
        });
        tinaSolidRenderingDeleteLightBtn.setToolTipText("Delete light");
        tinaSolidRenderingDeleteLightBtn.setText("Del");
        tinaSolidRenderingDeleteLightBtn.setPreferredSize(new Dimension(56, 24));
        tinaSolidRenderingDeleteLightBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingDeleteLightBtn.setBounds(323, 6, 56, 24);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingDeleteLightBtn);
        tinaSolidRenderingLightCastShadowsCBx = new JCheckBox("Cast shadows");
        tinaSolidRenderingLightCastShadowsCBx.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    tinaController.getFlameControls().solidRenderingLightCastShadowsCBx_changed();
                }
            }
        });
        tinaSolidRenderingLightCastShadowsCBx.setActionCommand("");
        tinaSolidRenderingLightCastShadowsCBx.setBounds(664, 12, 169, 18);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingLightCastShadowsCBx);
        JLabel tinaSolidRenderingShadowIntensityLbl0 = new JLabel();
        tinaSolidRenderingShadowIntensityLbl0.setText("Shadow intensity");
        tinaSolidRenderingShadowIntensityLbl0.setSize(new Dimension(68, 22));
        tinaSolidRenderingShadowIntensityLbl0.setPreferredSize(new Dimension(94, 22));
        tinaSolidRenderingShadowIntensityLbl0.setName("tinaSolidRenderingShadowIntensityLbl0");
        tinaSolidRenderingShadowIntensityLbl0.setLocation(new Point(390, 6));
        tinaSolidRenderingShadowIntensityLbl0.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSolidRenderingShadowIntensityLbl0.setBounds(434, 61, 90, 22);
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingShadowIntensityLbl0);
        tinaSolidRenderingShadowIntensityREd = new JWFNumberField();
        tinaSolidRenderingShadowIntensityREd.setMaxValue(1.0);
        tinaSolidRenderingShadowIntensityREd.setHasMinValue(true);
        tinaSolidRenderingShadowIntensityREd.setHasMaxValue(true);
        tinaSolidRenderingShadowIntensityREd.setValueStep(0.05);
        tinaSolidRenderingShadowIntensityREd.setText("");
        tinaSolidRenderingShadowIntensityREd.setSize(new Dimension(100, 24));
        tinaSolidRenderingShadowIntensityREd.setPreferredSize(new Dimension(100, 24));
        tinaSolidRenderingShadowIntensityREd.setMotionPropertyName("camPosZ");
        tinaSolidRenderingShadowIntensityREd.setLocation(new Point(456, 4));
        tinaSolidRenderingShadowIntensityREd.setLinkedMotionControlName("tinaSolidRenderingShadowIntensitySlider");
        tinaSolidRenderingShadowIntensityREd.setLinkedLabelControlName("tinaSolidRenderingShadowIntensityLbl");
        tinaSolidRenderingShadowIntensityREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        tinaSolidRenderingShadowIntensityREd.setBounds(526, 61, 100, 24);
        tinaSolidRenderingShadowIntensityREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        tinaSolidRenderingShadowIntensityREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    if (!tinaSolidRenderingShadowIntensityREd.isMouseAdjusting() || tinaSolidRenderingShadowIntensityREd.getMouseChangeCount() == 0) {
                        if (!tinaSolidRenderingShadowIntensitySlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().solidRenderingShadowIntensityREd_changed();
                }
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingShadowIntensityREd);
        tinaSolidRenderingShadowIntensitySlider = new JSlider();
        tinaSolidRenderingShadowIntensitySlider.setValue(0);
        tinaSolidRenderingShadowIntensitySlider.setSize(new Dimension(205, 19));
        tinaSolidRenderingShadowIntensitySlider.setPreferredSize(new Dimension(220, 19));
        tinaSolidRenderingShadowIntensitySlider.setName("tinaSolidRenderingShadowIntensitySlider");
        tinaSolidRenderingShadowIntensitySlider.setMaximum(5000);
        tinaSolidRenderingShadowIntensitySlider.setLocation(new Point(558, 4));
        tinaSolidRenderingShadowIntensitySlider.setBounds(628, 61, 205, 19);
        tinaSolidRenderingShadowIntensitySlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        tinaSolidRenderingShadowIntensitySlider.addChangeListener(new javax.swing.event.ChangeListener() {

            public void stateChanged(javax.swing.event.ChangeEvent e) {
                tinaController.getFlameControls().solidRenderingShadowIntensitySlider_stateChanged(e);
            }
        });
        tinaSolidRenderingLightPnl.add(tinaSolidRenderingShadowIntensitySlider);
        JButton button = new JButton();
        button.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tinaController != null && tinaController.getFlameControls() != null) {
                    tinaController.getFlameControls().randomizeLightPosition();
                }
            }
        });
        button.setToolTipText("Randomize light position");
        button.setSize(new Dimension(95, 24));
        button.setSelected(false);
        button.setPreferredSize(new Dimension(42, 24));
        button.setLocation(new Point(4, 4));
        button.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/roll.png")));
        button.setBounds(380, 59, 42, 24);
        tinaSolidRenderingLightPnl.add(button);
        tinaSolidRenderingLightPnl.add(getButton_1());
    }
    return tinaSolidRenderingPane;
}
Also used : JPanel(javax.swing.JPanel) ImageIcon(javax.swing.ImageIcon) ItemEvent(java.awt.event.ItemEvent) ActionEvent(java.awt.event.ActionEvent) JTabbedPane(javax.swing.JTabbedPane) JButton(javax.swing.JButton) ItemListener(java.awt.event.ItemListener) BorderLayout(java.awt.BorderLayout) JSlider(javax.swing.JSlider) ChangeListener(javax.swing.event.ChangeListener) ChangeListener(javax.swing.event.ChangeListener) ChangeEvent(javax.swing.event.ChangeEvent) ItemEvent(java.awt.event.ItemEvent) MouseEvent(java.awt.event.MouseEvent) JComboBox(javax.swing.JComboBox) MouseAdapter(java.awt.event.MouseAdapter) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) Point(java.awt.Point) JCheckBox(javax.swing.JCheckBox) ActionListener(java.awt.event.ActionListener) ChangeEvent(javax.swing.event.ChangeEvent) ItemListener(java.awt.event.ItemListener)

Example 44 with JTabbedPane

use of javax.swing.JTabbedPane in project JWildfire by thargor6.

the class TinaInternalFrame method getTinaSouthTabbedPane.

/**
 * This method initializes tinaSouthTabbedPane
 *
 * @return javax.swing.JTabbedPane
 */
private JTabbedPane getTinaSouthTabbedPane() {
    if (tinaSouthTabbedPane == null) {
        tinaSouthTabbedPane = new JTabbedPane();
        tinaSouthTabbedPane.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        tinaSouthTabbedPane.addTab("Camera ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/modify_view.png")), getTinaCameraPanel(), null);
        tinaDOFPanel = new JPanel();
        tinaDOFPanel.setLayout(null);
        dofDOFSlider = new JSlider();
        dofDOFSlider.setName("dofDOFSlider");
        dofDOFSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofDOFSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().cameraDOFSlider_stateChanged(e);
                }
            }
        });
        dofDOFSlider.setValue(0);
        dofDOFSlider.setSize(new Dimension(220, 19));
        dofDOFSlider.setPreferredSize(new Dimension(220, 19));
        dofDOFSlider.setMinimum(0);
        dofDOFSlider.setMaximum(100);
        dofDOFSlider.setLocation(new Point(202, 98));
        dofDOFSlider.setBounds(204, 28, 220, 24);
        tinaDOFPanel.add(dofDOFSlider);
        dofDOFREd = new JWFNumberField();
        dofDOFREd.setLinkedLabelControlName("lblDepthOfField");
        dofDOFREd.setMotionPropertyName("camDOF");
        dofDOFREd.setLinkedMotionControlName("dofDOFSlider");
        dofDOFREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofDOFREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofDOFREd.isMouseAdjusting() || dofDOFREd.getMouseChangeCount() == 0) {
                        if (!dofDOFSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().cameraDOFREd_changed();
                }
            }
        });
        dofDOFREd.setValueStep(0.01);
        dofDOFREd.setText("");
        dofDOFREd.setSize(new Dimension(100, 24));
        dofDOFREd.setPreferredSize(new Dimension(100, 24));
        dofDOFREd.setLocation(new Point(100, 98));
        dofDOFREd.setHasMinValue(true);
        dofDOFREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofDOFREd.setBounds(102, 28, 100, 24);
        tinaDOFPanel.add(dofDOFREd);
        JLabel lblDepthOfField = new JLabel();
        lblDepthOfField.setName("lblDepthOfField");
        lblDepthOfField.setText("Amount");
        lblDepthOfField.setSize(new Dimension(94, 22));
        lblDepthOfField.setPreferredSize(new Dimension(94, 22));
        lblDepthOfField.setLocation(new Point(4, 98));
        lblDepthOfField.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblDepthOfField.setBounds(6, 28, 94, 22);
        tinaDOFPanel.add(lblDepthOfField);
        dofNewDOFCBx = new JCheckBox("New DOF");
        dofNewDOFCBx.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (tinaController != null) {
                    tinaController.newDOFCBx_changed();
                }
            }
        });
        dofNewDOFCBx.setBounds(102, 6, 104, 18);
        dofNewDOFCBx.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        tinaDOFPanel.add(dofNewDOFCBx);
        JLabel lblArea = new JLabel();
        lblArea.setName("lblArea");
        lblArea.setText("Area");
        lblArea.setSize(new Dimension(94, 22));
        lblArea.setPreferredSize(new Dimension(94, 22));
        lblArea.setLocation(new Point(4, 98));
        lblArea.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblArea.setBounds(6, 52, 94, 22);
        tinaDOFPanel.add(lblArea);
        dofDOFAreaSlider = new JSlider();
        dofDOFAreaSlider.setName("dofDOFAreaSlider");
        dofDOFAreaSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().cameraDOFAreaSlider_stateChanged(e);
                }
            }
        });
        dofDOFAreaSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofDOFAreaSlider.setValue(0);
        dofDOFAreaSlider.setSize(new Dimension(220, 19));
        dofDOFAreaSlider.setPreferredSize(new Dimension(220, 19));
        dofDOFAreaSlider.setMinimum(0);
        dofDOFAreaSlider.setMaximum(200);
        dofDOFAreaSlider.setLocation(new Point(202, 98));
        dofDOFAreaSlider.setBounds(204, 52, 220, 24);
        tinaDOFPanel.add(dofDOFAreaSlider);
        dofDOFAreaREd = new JWFNumberField();
        dofDOFAreaREd.setLinkedLabelControlName("lblArea");
        dofDOFAreaREd.setMotionPropertyName("camDOFArea");
        dofDOFAreaREd.setLinkedMotionControlName("dofDOFAreaSlider");
        dofDOFAreaREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofDOFAreaREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofDOFAreaREd.isMouseAdjusting() || dofDOFAreaREd.getMouseChangeCount() == 0) {
                        if (!dofDOFAreaSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().cameraDOFAreaREd_changed();
                }
            }
        });
        dofDOFAreaREd.setValueStep(0.01);
        dofDOFAreaREd.setText("");
        dofDOFAreaREd.setSize(new Dimension(100, 24));
        dofDOFAreaREd.setPreferredSize(new Dimension(100, 24));
        dofDOFAreaREd.setLocation(new Point(100, 98));
        dofDOFAreaREd.setHasMinValue(true);
        dofDOFAreaREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofDOFAreaREd.setBounds(102, 52, 100, 24);
        tinaDOFPanel.add(dofDOFAreaREd);
        JLabel lblExponent = new JLabel();
        lblExponent.setName("lblExponent");
        lblExponent.setText("Exponent");
        lblExponent.setSize(new Dimension(94, 22));
        lblExponent.setPreferredSize(new Dimension(94, 22));
        lblExponent.setLocation(new Point(4, 98));
        lblExponent.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblExponent.setBounds(6, 76, 94, 22);
        tinaDOFPanel.add(lblExponent);
        dofDOFExponentSlider = new JSlider();
        dofDOFExponentSlider.setName("dofDOFExponentSlider");
        dofDOFExponentSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().cameraDOFExponentSlider_stateChanged(e);
                }
            }
        });
        dofDOFExponentSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofDOFExponentSlider.setValue(0);
        dofDOFExponentSlider.setSize(new Dimension(220, 19));
        dofDOFExponentSlider.setPreferredSize(new Dimension(220, 19));
        dofDOFExponentSlider.setMinimum(10);
        dofDOFExponentSlider.setMaximum(400);
        dofDOFExponentSlider.setLocation(new Point(202, 98));
        dofDOFExponentSlider.setBounds(204, 76, 220, 24);
        tinaDOFPanel.add(dofDOFExponentSlider);
        dofDOFExponentREd = new JWFNumberField();
        dofDOFExponentREd.setLinkedLabelControlName("lblExponent");
        dofDOFExponentREd.setMotionPropertyName("camDOFExponent");
        dofDOFExponentREd.setLinkedMotionControlName("dofDOFExponentSlider");
        dofDOFExponentREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofDOFExponentREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofDOFExponentREd.isMouseAdjusting() || dofDOFExponentREd.getMouseChangeCount() == 0) {
                        if (!dofDOFExponentSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().cameraDOFExponentREd_changed();
                }
            }
        });
        dofDOFExponentREd.setValueStep(0.01);
        dofDOFExponentREd.setText("");
        dofDOFExponentREd.setSize(new Dimension(100, 24));
        dofDOFExponentREd.setPreferredSize(new Dimension(100, 24));
        dofDOFExponentREd.setLocation(new Point(100, 98));
        dofDOFExponentREd.setHasMinValue(true);
        dofDOFExponentREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofDOFExponentREd.setBounds(102, 76, 100, 24);
        tinaDOFPanel.add(dofDOFExponentREd);
        JLabel lblCameraDistance = new JLabel();
        lblCameraDistance.setName("lblCameraDistance");
        lblCameraDistance.setText("Camera distance");
        lblCameraDistance.setSize(new Dimension(94, 22));
        lblCameraDistance.setPreferredSize(new Dimension(94, 22));
        lblCameraDistance.setLocation(new Point(4, 98));
        lblCameraDistance.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblCameraDistance.setBounds(447, 4, 94, 22);
        tinaDOFPanel.add(lblCameraDistance);
        dofCamZSlider = new JSlider();
        dofCamZSlider.setName("dofCamZSlider");
        dofCamZSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().camZSlider_stateChanged(e);
                }
            }
        });
        dofCamZSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofCamZSlider.setValue(0);
        dofCamZSlider.setSize(new Dimension(220, 19));
        dofCamZSlider.setPreferredSize(new Dimension(220, 19));
        dofCamZSlider.setMinimum(-100);
        dofCamZSlider.setMaximum(100);
        dofCamZSlider.setLocation(new Point(202, 98));
        dofCamZSlider.setBounds(645, 4, 220, 24);
        tinaDOFPanel.add(dofCamZSlider);
        dofCamZREd = new JWFNumberField();
        dofCamZREd.setLinkedLabelControlName("lblCameraDistance");
        dofCamZREd.setMotionPropertyName("camZ");
        dofCamZREd.setLinkedMotionControlName("dofCamZSlider");
        dofCamZREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofCamZREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofCamZREd.isMouseAdjusting() || dofCamZREd.getMouseChangeCount() == 0) {
                        if (!dofCamZSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().camZREd_changed();
                }
            }
        });
        dofCamZREd.setValueStep(0.01);
        dofCamZREd.setToolTipText("Affects both the old DOF-effect and diminish in z-direction");
        dofCamZREd.setSize(new Dimension(100, 24));
        dofCamZREd.setPreferredSize(new Dimension(100, 24));
        dofCamZREd.setLocation(new Point(100, 98));
        dofCamZREd.setHasMinValue(true);
        dofCamZREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofCamZREd.setBounds(543, 4, 100, 24);
        tinaDOFPanel.add(dofCamZREd);
        JLabel lblFocusx = new JLabel();
        lblFocusx.setName("lblFocusx");
        lblFocusx.setText("FocusX");
        lblFocusx.setSize(new Dimension(94, 22));
        lblFocusx.setPreferredSize(new Dimension(94, 22));
        lblFocusx.setLocation(new Point(4, 98));
        lblFocusx.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblFocusx.setBounds(447, 52, 94, 22);
        tinaDOFPanel.add(lblFocusx);
        dofFocusXREd = new JWFNumberField();
        dofFocusXREd.setLinkedLabelControlName("lblFocusx");
        dofFocusXREd.setMotionPropertyName("focusX");
        dofFocusXREd.setLinkedMotionControlName("dofFocusXSlider");
        dofFocusXREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofFocusXREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofFocusXREd.isMouseAdjusting() || dofFocusXREd.getMouseChangeCount() == 0) {
                        if (!dofFocusXSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().focusXREd_changed();
                }
            }
        });
        dofFocusXREd.setValueStep(0.01);
        dofFocusXREd.setText("");
        dofFocusXREd.setSize(new Dimension(100, 24));
        dofFocusXREd.setPreferredSize(new Dimension(100, 24));
        dofFocusXREd.setLocation(new Point(100, 98));
        dofFocusXREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofFocusXREd.setBounds(543, 52, 100, 24);
        tinaDOFPanel.add(dofFocusXREd);
        dofFocusXSlider = new JSlider();
        dofFocusXSlider.setName("dofFocusXSlider");
        dofFocusXSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().focusXSlider_stateChanged(e);
                }
            }
        });
        dofFocusXSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofFocusXSlider.setValue(0);
        dofFocusXSlider.setSize(new Dimension(220, 19));
        dofFocusXSlider.setPreferredSize(new Dimension(220, 19));
        dofFocusXSlider.setMinimum(-100);
        dofFocusXSlider.setMaximum(100);
        dofFocusXSlider.setLocation(new Point(202, 98));
        dofFocusXSlider.setBounds(645, 52, 220, 24);
        tinaDOFPanel.add(dofFocusXSlider);
        JLabel lblFocusy = new JLabel();
        lblFocusy.setName("lblFocusy");
        lblFocusy.setText("FocusY");
        lblFocusy.setSize(new Dimension(94, 22));
        lblFocusy.setPreferredSize(new Dimension(94, 22));
        lblFocusy.setLocation(new Point(4, 98));
        lblFocusy.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblFocusy.setBounds(447, 76, 94, 22);
        tinaDOFPanel.add(lblFocusy);
        dofFocusYREd = new JWFNumberField();
        dofFocusYREd.setLinkedLabelControlName("lblFocusy");
        dofFocusYREd.setMotionPropertyName("focusY");
        dofFocusYREd.setLinkedMotionControlName("dofFocusYSlider");
        dofFocusYREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofFocusYREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofFocusYREd.isMouseAdjusting() || dofFocusYREd.getMouseChangeCount() == 0) {
                        if (!dofFocusYSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().focusYREd_changed();
                }
            }
        });
        dofFocusYREd.setValueStep(0.01);
        dofFocusYREd.setText("");
        dofFocusYREd.setSize(new Dimension(100, 24));
        dofFocusYREd.setPreferredSize(new Dimension(100, 24));
        dofFocusYREd.setLocation(new Point(100, 98));
        dofFocusYREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofFocusYREd.setBounds(543, 76, 100, 24);
        tinaDOFPanel.add(dofFocusYREd);
        dofFocusYSlider = new JSlider();
        dofFocusYSlider.setName("dofFocusYSlider");
        dofFocusYSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().focusYSlider_stateChanged(e);
                }
            }
        });
        dofFocusYSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofFocusYSlider.setValue(0);
        dofFocusYSlider.setSize(new Dimension(220, 19));
        dofFocusYSlider.setPreferredSize(new Dimension(220, 19));
        dofFocusYSlider.setMinimum(-100);
        dofFocusYSlider.setMaximum(100);
        dofFocusYSlider.setLocation(new Point(202, 98));
        dofFocusYSlider.setBounds(645, 76, 220, 24);
        tinaDOFPanel.add(dofFocusYSlider);
        JLabel lblFocusz = new JLabel();
        lblFocusz.setName("lblFocusz");
        lblFocusz.setText("FocusZ");
        lblFocusz.setSize(new Dimension(94, 22));
        lblFocusz.setPreferredSize(new Dimension(94, 22));
        lblFocusz.setLocation(new Point(4, 98));
        lblFocusz.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblFocusz.setBounds(447, 100, 94, 22);
        tinaDOFPanel.add(lblFocusz);
        dofFocusZSlider = new JSlider();
        dofFocusZSlider.setName("dofFocusZSlider");
        dofFocusZSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().focusZSlider_stateChanged(e);
                }
            }
        });
        dofFocusZSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        dofFocusZSlider.setValue(0);
        dofFocusZSlider.setSize(new Dimension(220, 19));
        dofFocusZSlider.setPreferredSize(new Dimension(220, 19));
        dofFocusZSlider.setMinimum(-100);
        dofFocusZSlider.setMaximum(100);
        dofFocusZSlider.setLocation(new Point(202, 98));
        dofFocusZSlider.setBounds(645, 100, 220, 24);
        tinaDOFPanel.add(dofFocusZSlider);
        dofFocusZREd = new JWFNumberField();
        dofFocusZREd.setLinkedLabelControlName("lblFocusz");
        dofFocusZREd.setMotionPropertyName("focusZ");
        dofFocusZREd.setLinkedMotionControlName("dofFocusZSlider");
        dofFocusZREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        dofFocusZREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!dofFocusZREd.isMouseAdjusting() || dofFocusZREd.getMouseChangeCount() == 0) {
                        if (!dofFocusZSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().focusZREd_changed();
                }
            }
        });
        dofFocusZREd.setValueStep(0.01);
        dofFocusZREd.setText("");
        dofFocusZREd.setSize(new Dimension(100, 24));
        dofFocusZREd.setPreferredSize(new Dimension(100, 24));
        dofFocusZREd.setLocation(new Point(100, 98));
        dofFocusZREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        dofFocusZREd.setBounds(543, 100, 100, 24);
        tinaDOFPanel.add(dofFocusZREd);
        JLabel lblDimishz = new JLabel();
        lblDimishz.setName("lblDimishz");
        lblDimishz.setText("DiminishZ");
        lblDimishz.setSize(new Dimension(94, 22));
        lblDimishz.setPreferredSize(new Dimension(94, 22));
        lblDimishz.setLocation(new Point(4, 98));
        lblDimishz.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblDimishz.setBounds(447, 28, 94, 22);
        tinaDOFPanel.add(lblDimishz);
        camDimishZREd = new JWFNumberField();
        camDimishZREd.setLinkedLabelControlName("lblDimishz");
        camDimishZREd.setMotionPropertyName("dimishZ");
        camDimishZREd.setLinkedMotionControlName("camDimishZSlider");
        camDimishZREd.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getFlameControls().editMotionCurve(e);
            }
        });
        camDimishZREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    if (!camDimishZREd.isMouseAdjusting() || camDimishZREd.getMouseChangeCount() == 0) {
                        if (!camDimishZSlider.getValueIsAdjusting()) {
                            tinaController.saveUndoPoint();
                        }
                    }
                    tinaController.getFlameControls().diminishZREd_changed();
                }
            }
        });
        camDimishZREd.setToolTipText("Diminish brightness in z-direction to improve \"depth\"-effect, also affected by camera distance");
        camDimishZREd.setValueStep(0.01);
        camDimishZREd.setText("");
        camDimishZREd.setSize(new Dimension(100, 24));
        camDimishZREd.setPreferredSize(new Dimension(100, 24));
        camDimishZREd.setLocation(new Point(100, 98));
        camDimishZREd.setHasMinValue(true);
        camDimishZREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        camDimishZREd.setBounds(543, 28, 100, 24);
        tinaDOFPanel.add(camDimishZREd);
        camDimishZSlider = new JSlider();
        camDimishZSlider.setName("camDimishZSlider");
        camDimishZSlider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    tinaController.getFlameControls().diminishZSlider_stateChanged(e);
                }
            }
        });
        camDimishZSlider.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                tinaController.saveUndoPoint();
            }
        });
        camDimishZSlider.setValue(0);
        camDimishZSlider.setSize(new Dimension(220, 19));
        camDimishZSlider.setPreferredSize(new Dimension(220, 19));
        camDimishZSlider.setMaximum(75);
        camDimishZSlider.setLocation(new Point(202, 98));
        camDimishZSlider.setBounds(645, 28, 220, 24);
        tinaDOFPanel.add(camDimishZSlider);
        tinaDOFPanel.add(getResetDOFSettingsButton());
        tinaSouthTabbedPane.addTab("DOF / Bokeh ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/games-config-background.png")), getPanel_92(), null);
        tinaSouthTabbedPane.addTab("Coloring ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/color-wheel.png")), getTinaColoringPanel(), null);
        tinaSouthTabbedPane.addTab("Anti-Aliasing / Filter", null, getAntialiasPanel(), null);
        tinaSouthTabbedPane.addTab("Gradient ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/applications-graphics-2.png")), getTinaPalettePanel(), null);
        tinaSouthTabbedPane.addTab("3D rendering", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/kwikdisk-4.png")), getPanel_59(), null);
        tinaSouthTabbedPane.addTab("Stereo3d ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/layer-novisible.png")), getPanel_82(), null);
        tinaSouthTabbedPane.addTab("Post symmetry", null, getPanel_34(), null);
        tinaSouthTabbedPane.addTab("FPS / Motion blur", null, getMotionBlurPanel(), null);
        tinaSouthTabbedPane.addTab("Layers ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/emblem-photos.png")), getPanel_74(), null);
        tinaSouthTabbedPane.addTab("Channel mixer ", new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/color-fill.png")), getChannelMixerPanel(), null);
        JPanel panel_1 = new JPanel();
        tinaSouthTabbedPane.addTab("Leap Motion", null, panel_1, null);
        panel_1.setLayout(new BorderLayout(0, 0));
        JPanel panel_2 = new JPanel();
        panel_2.setPreferredSize(new Dimension(114, 10));
        panel_1.add(panel_2, BorderLayout.WEST);
        panel_2.setLayout(null);
        leapMotionResetConfigButton = new JButton();
        leapMotionResetConfigButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getLeapMotionMainEditorController().resetConfigButton_clicked();
            }
        });
        leapMotionResetConfigButton.setToolTipText("Reset the post-symmetry-options to the defaults");
        leapMotionResetConfigButton.setText("Reset");
        leapMotionResetConfigButton.setIcon(new ImageIcon(getClass().getResource("/org/jwildfire/swing/icons/new/edit-undo-6.png")));
        leapMotionResetConfigButton.setPreferredSize(new Dimension(125, 24));
        leapMotionResetConfigButton.setMinimumSize(new Dimension(100, 24));
        leapMotionResetConfigButton.setMaximumSize(new Dimension(32000, 24));
        leapMotionResetConfigButton.setIconTextGap(2);
        leapMotionResetConfigButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        leapMotionResetConfigButton.setBounds(6, 114, 100, 24);
        panel_2.add(leapMotionResetConfigButton);
        panel_2.add(getLeapMotionToggleButton());
        JPanel panel_3 = new JPanel();
        panel_3.setPreferredSize(new Dimension(340, 10));
        panel_1.add(panel_3, BorderLayout.EAST);
        panel_3.setLayout(null);
        leapMotionAddButton = new JButton();
        leapMotionAddButton.setToolTipText("Add new motion listener");
        leapMotionAddButton.setText("Add");
        leapMotionAddButton.setPreferredSize(new Dimension(56, 24));
        leapMotionAddButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        leapMotionAddButton.setBounds(6, 6, 90, 24);
        leapMotionAddButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getLeapMotionMainEditorController().leapMotionAddButton_clicked();
            }
        });
        panel_3.add(leapMotionAddButton);
        leapMotionDeleteButton = new JButton();
        leapMotionDeleteButton.setToolTipText("Delete motion listener");
        leapMotionDeleteButton.setText("Delete");
        leapMotionDeleteButton.setPreferredSize(new Dimension(90, 24));
        leapMotionDeleteButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        leapMotionDeleteButton.setBounds(6, 80, 90, 24);
        leapMotionDeleteButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getLeapMotionMainEditorController().leapMotionDeleteButton_clicked();
            }
        });
        panel_3.add(leapMotionDeleteButton);
        leapMotionDuplicateButton = new JButton();
        leapMotionDuplicateButton.setToolTipText("Duplicate motion listener");
        leapMotionDuplicateButton.setText("Duplicate");
        leapMotionDuplicateButton.setPreferredSize(new Dimension(90, 24));
        leapMotionDuplicateButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        leapMotionDuplicateButton.setBounds(6, 32, 90, 24);
        leapMotionDuplicateButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getLeapMotionMainEditorController().leapMotionDuplicateButton_clicked();
            }
        });
        panel_3.add(leapMotionDuplicateButton);
        JTextArea txtrPleaseNoteThat = new JTextArea();
        txtrPleaseNoteThat.setEditable(false);
        txtrPleaseNoteThat.setLineWrap(true);
        txtrPleaseNoteThat.setWrapStyleWord(true);
        txtrPleaseNoteThat.setText("Please note that all the settings here do NOT belong to a certain flame and are NOT saved when you save a flame. Currently, they can NOT be saved at all.");
        txtrPleaseNoteThat.setBounds(108, 3, 226, 122);
        panel_3.add(txtrPleaseNoteThat);
        leapMotionClearButton = new JButton();
        leapMotionClearButton.setToolTipText("Clear all motion listeners");
        leapMotionClearButton.setText("Clear");
        leapMotionClearButton.setPreferredSize(new Dimension(90, 24));
        leapMotionClearButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        leapMotionClearButton.setBounds(6, 106, 90, 24);
        leapMotionClearButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getLeapMotionMainEditorController().leapMotionClearButton_clicked();
            }
        });
        panel_3.add(leapMotionClearButton);
        panel_1.add(getPanel_111(), BorderLayout.CENTER);
        tinaSouthTabbedPane.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null) {
                    switch(tinaSouthTabbedPane.getSelectedIndex()) {
                        case 4:
                            if (tinaController.getGradientController() != null) {
                                tinaController.getGradientController().onActivate();
                            }
                            break;
                        default:
                            // nothing to do
                            break;
                    }
                }
            }
        });
    }
    return tinaSouthTabbedPane;
}
Also used : ImageIcon(javax.swing.ImageIcon) JPanel(javax.swing.JPanel) ItemEvent(java.awt.event.ItemEvent) MouseEvent(java.awt.event.MouseEvent) JTextArea(javax.swing.JTextArea) ActionEvent(java.awt.event.ActionEvent) JTabbedPane(javax.swing.JTabbedPane) MouseAdapter(java.awt.event.MouseAdapter) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) Point(java.awt.Point) JCheckBox(javax.swing.JCheckBox) ChangeEvent(javax.swing.event.ChangeEvent) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) JSlider(javax.swing.JSlider) ChangeListener(javax.swing.event.ChangeListener) ItemListener(java.awt.event.ItemListener)

Example 45 with JTabbedPane

use of javax.swing.JTabbedPane in project JWildfire by thargor6.

the class TinaInternalFrame method getTabbedPane.

private JTabbedPane getTabbedPane() {
    if (tabbedPane == null) {
        tabbedPane = new JTabbedPane(JTabbedPane.TOP);
        tabbedPane.addTab("Description", null, getPanel_60(), null);
        tabbedPane.addTab("Code preview", null, getPanel_61(), null);
        JPanel panel_1 = new JPanel();
        tabbedPane.addTab("Macro buttons", null, panel_1, null);
        panel_1.setLayout(new BorderLayout(0, 0));
        JPanel panel_2 = new JPanel();
        panel_2.setPreferredSize(new Dimension(120, 10));
        panel_1.add(panel_2, BorderLayout.CENTER);
        panel_2.setLayout(new BorderLayout(0, 0));
        JScrollPane scrollPane_2 = new JScrollPane();
        scrollPane_2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane_2.setBorder(null);
        panel_2.add(scrollPane_2, BorderLayout.CENTER);
        macroButtonsTable = new JTable();
        macroButtonsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        macroButtonsTable.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        macroButtonsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    tinaController.getJwfScriptController().macroButtonsTableClicked();
                }
            }
        });
        scrollPane_2.setViewportView(macroButtonsTable);
        JPanel panel_3 = new JPanel();
        FlowLayout flowLayout = (FlowLayout) panel_3.getLayout();
        flowLayout.setHgap(0);
        flowLayout.setVgap(1);
        panel_3.setPreferredSize(new Dimension(124, 10));
        panel_1.add(panel_3, BorderLayout.EAST);
        JPanel panel_9 = new JPanel();
        panel_9.setPreferredSize(new Dimension(116, 4));
        panel_9.setMinimumSize(new Dimension(116, 8));
        panel_9.setMaximumSize(new Dimension(32767, 8));
        panel_3.add(panel_9);
        macroButtonMoveUpBtn = new JButton();
        macroButtonMoveUpBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getJwfScriptController().macroButtonMoveUp();
            }
        });
        macroButtonMoveUpBtn.setToolTipText("Move the button one up in the list");
        macroButtonMoveUpBtn.setText("Up");
        macroButtonMoveUpBtn.setPreferredSize(new Dimension(58, 24));
        macroButtonMoveUpBtn.setMinimumSize(new Dimension(58, 12));
        macroButtonMoveUpBtn.setMaximumSize(new Dimension(58, 12));
        macroButtonMoveUpBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        macroButtonMoveUpBtn.setBounds(new Rectangle(9, 280, 125, 24));
        panel_3.add(macroButtonMoveUpBtn);
        macroButtonMoveDownBtn = new JButton();
        macroButtonMoveDownBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getJwfScriptController().macroButtonMoveDown();
            }
        });
        macroButtonMoveDownBtn.setToolTipText("Move the button one down in the list");
        macroButtonMoveDownBtn.setText("Down");
        macroButtonMoveDownBtn.setPreferredSize(new Dimension(58, 24));
        macroButtonMoveDownBtn.setMinimumSize(new Dimension(58, 12));
        macroButtonMoveDownBtn.setMaximumSize(new Dimension(58, 12));
        macroButtonMoveDownBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        macroButtonMoveDownBtn.setBounds(new Rectangle(9, 280, 125, 24));
        panel_3.add(macroButtonMoveDownBtn);
        JPanel panel_8 = new JPanel();
        panel_8.setPreferredSize(new Dimension(116, 4));
        panel_8.setMinimumSize(new Dimension(116, 8));
        panel_8.setMaximumSize(new Dimension(32767, 8));
        panel_3.add(panel_8);
        macroButtonDeleteBtn = new JButton();
        macroButtonDeleteBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getJwfScriptController().macroButtonDelete();
            }
        });
        macroButtonDeleteBtn.setToolTipText("Delete the button");
        macroButtonDeleteBtn.setText("Delete");
        macroButtonDeleteBtn.setPreferredSize(new Dimension(116, 24));
        macroButtonDeleteBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        macroButtonDeleteBtn.setBounds(new Rectangle(9, 280, 125, 24));
        panel_3.add(macroButtonDeleteBtn);
    }
    return tabbedPane;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) ActionEvent(java.awt.event.ActionEvent) JTabbedPane(javax.swing.JTabbedPane) ListSelectionEvent(javax.swing.event.ListSelectionEvent) JButton(javax.swing.JButton) Rectangle(java.awt.Rectangle) Dimension(java.awt.Dimension) ListSelectionListener(javax.swing.event.ListSelectionListener) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) JTable(javax.swing.JTable)

Aggregations

JTabbedPane (javax.swing.JTabbedPane)250 JPanel (javax.swing.JPanel)129 BorderLayout (java.awt.BorderLayout)73 JScrollPane (javax.swing.JScrollPane)67 JButton (javax.swing.JButton)60 JLabel (javax.swing.JLabel)60 Dimension (java.awt.Dimension)53 ActionEvent (java.awt.event.ActionEvent)41 ActionListener (java.awt.event.ActionListener)37 GridLayout (java.awt.GridLayout)31 ChangeListener (javax.swing.event.ChangeListener)30 ChangeEvent (javax.swing.event.ChangeEvent)29 GridBagLayout (java.awt.GridBagLayout)26 JCheckBox (javax.swing.JCheckBox)26 JFrame (javax.swing.JFrame)26 JSplitPane (javax.swing.JSplitPane)26 Insets (java.awt.Insets)25 JComponent (javax.swing.JComponent)25 GridBagConstraints (java.awt.GridBagConstraints)24 ImageIcon (javax.swing.ImageIcon)23