Search in sources :

Example 81 with ItemEvent

use of java.awt.event.ItemEvent in project JWildfire by thargor6.

the class MeshGenInternalFrame method getPanel_89.

private JPanel getPanel_89() {
    if (panel_89 == null) {
        panel_89 = new JPanel();
        panel_89.setPreferredSize(new Dimension(10, 130));
        panel_89.setLayout(new BorderLayout(0, 0));
        panel_89.add(getPanel_90(), BorderLayout.WEST);
        JPanel panel_1 = new JPanel();
        panel_1.setBorder(new TitledBorder(null, "Voxelstack", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel_89.add(panel_1, BorderLayout.CENTER);
        panel_1.setLayout(new BorderLayout(0, 0));
        JPanel panel_2 = new JPanel();
        panel_2.setPreferredSize(new Dimension(10, 20));
        panel_1.add(panel_2, BorderLayout.SOUTH);
        panel_2.setLayout(new BorderLayout(0, 0));
        meshGenProgressbar = new JProgressBar();
        meshGenProgressbar.setValue(0);
        meshGenProgressbar.setStringPainted(true);
        meshGenProgressbar.setPreferredSize(new Dimension(568, 21));
        panel_2.add(meshGenProgressbar, BorderLayout.CENTER);
        JPanel panel_3 = new JPanel();
        panel_3.setPreferredSize(new Dimension(620, 10));
        panel_1.add(panel_3, BorderLayout.WEST);
        panel_3.setLayout(null);
        JLabel lblRenderWidth = new JLabel();
        lblRenderWidth.setText("Render width");
        lblRenderWidth.setSize(new Dimension(68, 22));
        lblRenderWidth.setPreferredSize(new Dimension(94, 22));
        lblRenderWidth.setName("");
        lblRenderWidth.setLocation(new Point(4, 76));
        lblRenderWidth.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblRenderWidth.setBounds(252, 26, 79, 22);
        panel_3.add(lblRenderWidth);
        meshGenRenderWidthREd = new JWFNumberField();
        meshGenRenderWidthREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getMeshGenController() != null) {
                    tinaController.getMeshGenController().renderWidth_changed();
                }
            }
        });
        meshGenRenderWidthREd.setMinValue(16.0);
        meshGenRenderWidthREd.setOnlyIntegers(true);
        meshGenRenderWidthREd.setValueStep(1.0);
        meshGenRenderWidthREd.setText("");
        meshGenRenderWidthREd.setSize(new Dimension(100, 24));
        meshGenRenderWidthREd.setPreferredSize(new Dimension(100, 24));
        meshGenRenderWidthREd.setMaxValue(4096.0);
        meshGenRenderWidthREd.setLocation(new Point(71, 76));
        meshGenRenderWidthREd.setHasMinValue(true);
        meshGenRenderWidthREd.setHasMaxValue(true);
        meshGenRenderWidthREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        meshGenRenderWidthREd.setBounds(328, 24, 100, 24);
        panel_3.add(meshGenRenderWidthREd);
        JLabel lblRenderHeight = new JLabel();
        lblRenderHeight.setText("Render height");
        lblRenderHeight.setSize(new Dimension(68, 22));
        lblRenderHeight.setPreferredSize(new Dimension(94, 22));
        lblRenderHeight.setName("");
        lblRenderHeight.setLocation(new Point(4, 76));
        lblRenderHeight.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblRenderHeight.setBounds(252, 50, 79, 22);
        panel_3.add(lblRenderHeight);
        meshGenRenderHeightREd = new JWFNumberField();
        meshGenRenderHeightREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getMeshGenController() != null) {
                    tinaController.getMeshGenController().renderHeight_changed();
                }
            }
        });
        meshGenRenderHeightREd.setMinValue(16.0);
        meshGenRenderHeightREd.setOnlyIntegers(true);
        meshGenRenderHeightREd.setValueStep(1.0);
        meshGenRenderHeightREd.setText("");
        meshGenRenderHeightREd.setSize(new Dimension(100, 24));
        meshGenRenderHeightREd.setPreferredSize(new Dimension(100, 24));
        meshGenRenderHeightREd.setMaxValue(4096.0);
        meshGenRenderHeightREd.setLocation(new Point(71, 76));
        meshGenRenderHeightREd.setHasMinValue(true);
        meshGenRenderHeightREd.setHasMaxValue(true);
        meshGenRenderHeightREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        meshGenRenderHeightREd.setBounds(328, 48, 100, 24);
        panel_3.add(meshGenRenderHeightREd);
        meshGenSliceCountREd = new JWFNumberField();
        meshGenSliceCountREd.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                if (tinaController != null && tinaController.getMeshGenController() != null) {
                    tinaController.getMeshGenController().sliceCount_changed();
                }
            }
        });
        meshGenSliceCountREd.setHasMaxValue(true);
        meshGenSliceCountREd.setMinValue(2.0);
        meshGenSliceCountREd.setOnlyIntegers(true);
        meshGenSliceCountREd.setValueStep(1.0);
        meshGenSliceCountREd.setText("");
        meshGenSliceCountREd.setSize(new Dimension(100, 24));
        meshGenSliceCountREd.setPreferredSize(new Dimension(100, 24));
        meshGenSliceCountREd.setMaxValue(4096.0);
        meshGenSliceCountREd.setLocation(new Point(71, 76));
        meshGenSliceCountREd.setHasMinValue(true);
        meshGenSliceCountREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        meshGenSliceCountREd.setBounds(148, 24, 100, 24);
        panel_3.add(meshGenSliceCountREd);
        JLabel lblNumberOfSlices = new JLabel();
        lblNumberOfSlices.setText("Total number of slices");
        lblNumberOfSlices.setSize(new Dimension(68, 22));
        lblNumberOfSlices.setPreferredSize(new Dimension(94, 22));
        lblNumberOfSlices.setName("");
        lblNumberOfSlices.setLocation(new Point(6, 76));
        lblNumberOfSlices.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblNumberOfSlices.setBounds(0, 26, 151, 22);
        panel_3.add(lblNumberOfSlices);
        JLabel lblSlicesPerPass = new JLabel();
        lblSlicesPerPass.setText("Slices per pass (for speedup)");
        lblSlicesPerPass.setSize(new Dimension(68, 22));
        lblSlicesPerPass.setPreferredSize(new Dimension(94, 22));
        lblSlicesPerPass.setName("");
        lblSlicesPerPass.setLocation(new Point(4, 76));
        lblSlicesPerPass.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblSlicesPerPass.setBounds(0, 50, 151, 22);
        panel_3.add(lblSlicesPerPass);
        meshGenSlicesPerRenderREd = new JWFNumberField();
        meshGenSlicesPerRenderREd.setMinValue(1.0);
        meshGenSlicesPerRenderREd.setOnlyIntegers(true);
        meshGenSlicesPerRenderREd.setValueStep(1.0);
        meshGenSlicesPerRenderREd.setText("");
        meshGenSlicesPerRenderREd.setSize(new Dimension(100, 24));
        meshGenSlicesPerRenderREd.setPreferredSize(new Dimension(100, 24));
        meshGenSlicesPerRenderREd.setMaxValue(1.0);
        meshGenSlicesPerRenderREd.setLocation(new Point(71, 76));
        meshGenSlicesPerRenderREd.setHasMinValue(true);
        meshGenSlicesPerRenderREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        meshGenSlicesPerRenderREd.setBounds(148, 48, 100, 24);
        panel_3.add(meshGenSlicesPerRenderREd);
        meshGenRenderQualityREd = new JWFNumberField();
        meshGenRenderQualityREd.setMinValue(10.0);
        meshGenRenderQualityREd.setOnlyIntegers(true);
        meshGenRenderQualityREd.setValueStep(1.0);
        meshGenRenderQualityREd.setText("");
        meshGenRenderQualityREd.setSize(new Dimension(100, 24));
        meshGenRenderQualityREd.setPreferredSize(new Dimension(100, 24));
        meshGenRenderQualityREd.setLocation(new Point(71, 76));
        meshGenRenderQualityREd.setHasMinValue(true);
        meshGenRenderQualityREd.setHasMaxValue(false);
        meshGenRenderQualityREd.setFont(Prefs.getPrefs().getFont("Dialog", Font.PLAIN, 10));
        meshGenRenderQualityREd.setBounds(521, 0, 100, 24);
        panel_3.add(meshGenRenderQualityREd);
        JLabel lblRenderQuality = new JLabel();
        lblRenderQuality.setText("Render quality");
        lblRenderQuality.setSize(new Dimension(68, 22));
        lblRenderQuality.setPreferredSize(new Dimension(94, 22));
        lblRenderQuality.setName("");
        lblRenderQuality.setLocation(new Point(4, 76));
        lblRenderQuality.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblRenderQuality.setBounds(441, 0, 79, 22);
        panel_3.add(lblRenderQuality);
        meshGenOutputTypeCmb = new JComboBox();
        meshGenOutputTypeCmb.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (tinaController != null && tinaController.getMeshGenController() != null) {
                    tinaController.getMeshGenController().outputTypeCmb_changed();
                }
            }
        });
        meshGenOutputTypeCmb.setToolTipText("Random-flame-generator");
        meshGenOutputTypeCmb.setPreferredSize(new Dimension(110, 24));
        meshGenOutputTypeCmb.setMinimumSize(new Dimension(110, 24));
        meshGenOutputTypeCmb.setMaximumSize(new Dimension(32767, 24));
        meshGenOutputTypeCmb.setMaximumRowCount(48);
        meshGenOutputTypeCmb.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        meshGenOutputTypeCmb.setBounds(149, 0, 279, 24);
        panel_3.add(meshGenOutputTypeCmb);
        JLabel lblOutputType = new JLabel();
        lblOutputType.setText("Output type");
        lblOutputType.setSize(new Dimension(68, 22));
        lblOutputType.setPreferredSize(new Dimension(94, 22));
        lblOutputType.setName("");
        lblOutputType.setLocation(new Point(6, 76));
        lblOutputType.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblOutputType.setBounds(0, 2, 151, 22);
        panel_3.add(lblOutputType);
        meshGenCellSizeREd = new JWFNumberField();
        meshGenCellSizeREd.setMinValue(RasterPointCloud.MIN_OCTREE_CELL_SIZE);
        meshGenCellSizeREd.setMaxValue(RasterPointCloud.MAX_OCTREE_CELL_SIZE);
        meshGenCellSizeREd.setValueStep(0.001);
        meshGenCellSizeREd.setText("");
        meshGenCellSizeREd.setSize(new Dimension(100, 24));
        meshGenCellSizeREd.setPreferredSize(new Dimension(100, 24));
        meshGenCellSizeREd.setLocation(new Point(71, 76));
        meshGenCellSizeREd.setHasMinValue(true);
        meshGenCellSizeREd.setHasMaxValue(true);
        meshGenCellSizeREd.setFont(new Font("Dialog", Font.PLAIN, 10));
        meshGenCellSizeREd.setBounds(521, 26, 100, 24);
        panel_3.add(meshGenCellSizeREd);
        JLabel lblCellSize = new JLabel();
        lblCellSize.setToolTipText("The smaller the cellsize the more detail is generated, and vice versa");
        lblCellSize.setText("Cell size");
        lblCellSize.setSize(new Dimension(68, 22));
        lblCellSize.setPreferredSize(new Dimension(94, 22));
        lblCellSize.setName("");
        lblCellSize.setLocation(new Point(4, 76));
        lblCellSize.setFont(new Font("Dialog", Font.BOLD, 10));
        lblCellSize.setBounds(441, 26, 79, 22);
        panel_3.add(lblCellSize);
        JPanel panel_8 = new JPanel();
        panel_8.setPreferredSize(new Dimension(132, 10));
        panel_1.add(panel_8, BorderLayout.EAST);
        meshGenGenerateBtn = new JButton();
        meshGenGenerateBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.getMeshGenController().generateButton_clicked();
            }
        });
        panel_8.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
        meshGenGenerateBtn.setText("Render slices");
        meshGenGenerateBtn.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/sports-soccer.png")));
        meshGenGenerateBtn.setPreferredSize(new Dimension(132, 46));
        meshGenGenerateBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        panel_8.add(meshGenGenerateBtn);
    }
    return panel_89;
}
Also used : JPanel(javax.swing.JPanel) ImageIcon(javax.swing.ImageIcon) ItemEvent(java.awt.event.ItemEvent) FlowLayout(java.awt.FlowLayout) JComboBox(javax.swing.JComboBox) ActionEvent(java.awt.event.ActionEvent) JProgressBar(javax.swing.JProgressBar) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) Point(java.awt.Point) TitledBorder(javax.swing.border.TitledBorder) Font(java.awt.Font) BorderLayout(java.awt.BorderLayout) ChangeEvent(javax.swing.event.ChangeEvent) ActionListener(java.awt.event.ActionListener) ChangeListener(javax.swing.event.ChangeListener) ItemListener(java.awt.event.ItemListener)

Example 82 with ItemEvent

use of java.awt.event.ItemEvent 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 83 with ItemEvent

use of java.awt.event.ItemEvent in project JWildfire by thargor6.

the class TinaInternalFrame method getLeapMotionInputChannelCmb.

private JComboBox getLeapMotionInputChannelCmb() {
    if (leapMotionInputChannelCmb == null) {
        leapMotionInputChannelCmb = new JComboBox();
        leapMotionInputChannelCmb.setSize(new Dimension(125, 22));
        leapMotionInputChannelCmb.setPreferredSize(new Dimension(125, 22));
        leapMotionInputChannelCmb.setLocation(new Point(100, 4));
        leapMotionInputChannelCmb.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        leapMotionInputChannelCmb.setBounds(96, 34, 135, 24);
        leapMotionInputChannelCmb.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (tinaController != null && tinaController.getLeapMotionMainEditorController() != null) {
                    tinaController.getLeapMotionMainEditorController().leapMotionInputChannelCmb_changed();
                }
            }
        });
    }
    return leapMotionInputChannelCmb;
}
Also used : ItemEvent(java.awt.event.ItemEvent) JComboBox(javax.swing.JComboBox) ItemListener(java.awt.event.ItemListener) Dimension(java.awt.Dimension) Point(java.awt.Point)

Example 84 with ItemEvent

use of java.awt.event.ItemEvent in project JWildfire by thargor6.

the class TinaInternalFrame method getChannelMixerPanel.

private JPanel getChannelMixerPanel() {
    if (channelMixerPanel == null) {
        channelMixerPanel = new JPanel();
        channelMixerPanel.setLayout(new BorderLayout(0, 0));
        JPanel panel_1 = new JPanel();
        panel_1.setPreferredSize(new Dimension(160, 10));
        channelMixerPanel.add(panel_1, BorderLayout.WEST);
        panel_1.setLayout(null);
        panel_1.add(getPanel_117());
        channelMixerModeCmb = new JComboBox();
        channelMixerModeCmb.setPreferredSize(new Dimension(125, 24));
        channelMixerModeCmb.setMinimumSize(new Dimension(100, 24));
        channelMixerModeCmb.setMaximumSize(new Dimension(32767, 24));
        channelMixerModeCmb.setMaximumRowCount(32);
        channelMixerModeCmb.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        channelMixerModeCmb.setBounds(6, 39, 100, 24);
        channelMixerModeCmb.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (tinaController != null) {
                    tinaController.getChannelMixerControls().channelMixerModeCmb_changed();
                }
            }
        });
        panel_1.add(channelMixerModeCmb);
        channelMixerResetBtn = new JButton();
        channelMixerResetBtn.setToolTipText("Reset curves to defaults");
        channelMixerResetBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tinaController != null) {
                    tinaController.getChannelMixerControls().resetBtn_clicked();
                }
            }
        });
        channelMixerResetBtn.setText("Reset");
        channelMixerResetBtn.setPreferredSize(new Dimension(125, 24));
        channelMixerResetBtn.setMinimumSize(new Dimension(100, 24));
        channelMixerResetBtn.setMaximumSize(new Dimension(32000, 24));
        channelMixerResetBtn.setIconTextGap(2);
        channelMixerResetBtn.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        channelMixerResetBtn.setBounds(6, 75, 100, 24);
        channelMixerResetBtn.setIcon(new ImageIcon(getClass().getResource("/org/jwildfire/swing/icons/new/edit-undo-6.png")));
        panel_1.add(channelMixerResetBtn);
        JLabel lblMode = new JLabel();
        lblMode.setText("Mixer mode*");
        lblMode.setSize(new Dimension(20, 22));
        lblMode.setPreferredSize(new Dimension(24, 22));
        lblMode.setName("affineC00Lbl");
        lblMode.setLocation(new Point(0, 6));
        lblMode.setHorizontalAlignment(SwingConstants.LEFT);
        lblMode.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        lblMode.setBounds(8, 16, 87, 22);
        panel_1.add(lblMode);
        JPanel panel_2 = new JPanel();
        channelMixerPanel.add(panel_2, BorderLayout.CENTER);
        panel_2.setLayout(new GridLayout(0, 3, 0, 0));
        JPanel panel_3 = new JPanel();
        panel_2.add(panel_3);
        panel_3.setLayout(new BorderLayout(0, 0));
        panel_3.add(getChannelMixerRedRedRootPanel(), BorderLayout.CENTER);
        JPanel panel_8 = new JPanel();
        panel_2.add(panel_8);
        panel_8.setLayout(new BorderLayout(0, 0));
        panel_8.add(getChannelMixerRedGreenRootPanel(), BorderLayout.CENTER);
        JPanel panel_9 = new JPanel();
        panel_2.add(panel_9);
        panel_9.setLayout(new BorderLayout(0, 0));
        panel_9.add(getChannelMixerRedBlueRootPanel(), BorderLayout.CENTER);
        JPanel panel_10 = new JPanel();
        panel_2.add(panel_10);
        panel_10.setLayout(new BorderLayout(0, 0));
        panel_10.add(getChannelMixerGreenRedRootPanel(), BorderLayout.CENTER);
        JPanel panel_11 = new JPanel();
        panel_2.add(panel_11);
        panel_11.setLayout(new BorderLayout(0, 0));
        panel_11.add(getChannelMixerGreenGreenRootPanel(), BorderLayout.CENTER);
        JPanel panel_83 = new JPanel();
        panel_2.add(panel_83);
        panel_83.setLayout(new BorderLayout(0, 0));
        panel_83.add(getChannelMixerGreenBlueRootPanel(), BorderLayout.CENTER);
        JPanel panel_85 = new JPanel();
        panel_2.add(panel_85);
        panel_85.setLayout(new BorderLayout(0, 0));
        panel_85.add(getChannelMixerBlueRedRootPanel(), BorderLayout.CENTER);
        JPanel panel_106 = new JPanel();
        panel_2.add(panel_106);
        panel_106.setLayout(new BorderLayout(0, 0));
        panel_106.add(getChannelMixerBlueGreenRootPanel(), BorderLayout.CENTER);
        JPanel panel_107 = new JPanel();
        panel_2.add(panel_107);
        panel_107.setLayout(new BorderLayout(0, 0));
        panel_107.add(getChannelMixerBlueBlueRootPanel(), BorderLayout.CENTER);
    }
    return channelMixerPanel;
}
Also used : JPanel(javax.swing.JPanel) ImageIcon(javax.swing.ImageIcon) ItemEvent(java.awt.event.ItemEvent) JComboBox(javax.swing.JComboBox) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) Point(java.awt.Point) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) ItemListener(java.awt.event.ItemListener)

Example 85 with ItemEvent

use of java.awt.event.ItemEvent in project JWildfire by thargor6.

the class TinaInternalFrame method getCenterNorthPanel.

/**
 * This method initializes centerNorthPanel
 *
 * @return javax.swing.JPanel
 */
private JPanel getCenterNorthPanel() {
    if (centerNorthPanel == null) {
        centerNorthPanel = new JPanel();
        centerNorthPanel.setLayout(null);
        centerNorthPanel.setPreferredSize(new Dimension(0, 32));
        centerNorthPanel.add(getRenderProgressBar(), null);
        centerNorthPanel.add(getMouseTransformSlowButton(), null);
        centerNorthPanel.add(getToggleVariationsButton());
        centerNorthPanel.add(getToggleTransparencyButton());
        toggleDrawGridButton = new JToggleButton();
        toggleDrawGridButton.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                if (e.getClickCount() == 2) {
                    tinaController.resetGridToDefaults();
                }
            }
        });
        toggleDrawGridButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.toggleDrawGridButton_clicked();
            }
        });
        toggleDrawGridButton.setToolTipText("Turn grid on/off, double-click to rest grid-size and -position");
        toggleDrawGridButton.setSize(new Dimension(95, 24));
        toggleDrawGridButton.setSelected(false);
        toggleDrawGridButton.setPreferredSize(new Dimension(42, 24));
        toggleDrawGridButton.setLocation(new Point(4, 4));
        toggleDrawGridButton.setBounds(451, 4, 42, 24);
        toggleDrawGridButton.setIcon(new ImageIcon(getClass().getResource("/org/jwildfire/swing/icons/new/grid.png")));
        centerNorthPanel.add(toggleDrawGridButton);
        centerNorthPanel.add(getAffineEditPostTransformSmallButton());
        toggleTriangleWithColorsButton = new JToggleButton();
        toggleTriangleWithColorsButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.toggleTriangleWithColorsButton_clicked();
            }
        });
        toggleTriangleWithColorsButton.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/atomic.png")));
        toggleTriangleWithColorsButton.setToolTipText("Toggle monochrome/colored controls");
        toggleTriangleWithColorsButton.setPreferredSize(new Dimension(42, 24));
        toggleTriangleWithColorsButton.setMnemonic(KeyEvent.VK_P);
        toggleTriangleWithColorsButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        toggleTriangleWithColorsButton.setBounds(605, 4, 42, 24);
        centerNorthPanel.add(toggleTriangleWithColorsButton);
        triangleStyleCmb = new JComboBox();
        triangleStyleCmb.setPreferredSize(new Dimension(125, 24));
        triangleStyleCmb.setMinimumSize(new Dimension(100, 24));
        triangleStyleCmb.setMaximumSize(new Dimension(32767, 24));
        triangleStyleCmb.setMaximumRowCount(32);
        triangleStyleCmb.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 10));
        triangleStyleCmb.setBounds(537, 4, 68, 24);
        triangleStyleCmb.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                if (tinaController != null) {
                    tinaController.triangleStyleCmb_changed();
                }
            }
        });
        centerNorthPanel.add(triangleStyleCmb);
        toggleDrawGuidesButton = new JToggleButton();
        toggleDrawGuidesButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.toggleDrawGuidesButton_clicked();
            }
        });
        toggleDrawGuidesButton.setToolTipText("Turn guides (center point, rule of thirds and the golden ratio) on/off");
        toggleDrawGuidesButton.setSize(new Dimension(95, 24));
        toggleDrawGuidesButton.setSelected(false);
        toggleDrawGuidesButton.setPreferredSize(new Dimension(42, 24));
        toggleDrawGuidesButton.setLocation(new Point(4, 4));
        toggleDrawGuidesButton.setBounds(494, 4, 42, 24);
        toggleDrawGuidesButton.setIcon(new ImageIcon(getClass().getResource("/org/jwildfire/swing/icons/new/guides.png")));
        centerNorthPanel.add(toggleDrawGuidesButton);
        realtimePreviewToggleButton = new JToggleButton();
        realtimePreviewToggleButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                tinaController.realtimePreviewToggleButton_clicked();
            }
        });
        realtimePreviewToggleButton.setToolTipText("Turn realtime (progressive) preview on/off");
        realtimePreviewToggleButton.setText("Realtime");
        realtimePreviewToggleButton.setSize(new Dimension(68, 24));
        realtimePreviewToggleButton.setSelected(false);
        realtimePreviewToggleButton.setPreferredSize(new Dimension(42, 24));
        realtimePreviewToggleButton.setLocation(new Point(402, 4));
        realtimePreviewToggleButton.setFont(Prefs.getPrefs().getFont("Dialog", Font.BOLD, 9));
        realtimePreviewToggleButton.setBounds(181, 4, 90, 24);
        realtimePreviewToggleButton.setIcon(new ImageIcon(getClass().getResource("/org/jwildfire/swing/icons/new/fraqtive3.png")));
        centerNorthPanel.add(realtimePreviewToggleButton);
    }
    return centerNorthPanel;
}
Also used : JPanel(javax.swing.JPanel) ImageIcon(javax.swing.ImageIcon) ItemEvent(java.awt.event.ItemEvent) MouseEvent(java.awt.event.MouseEvent) JComboBox(javax.swing.JComboBox) ActionEvent(java.awt.event.ActionEvent) MouseAdapter(java.awt.event.MouseAdapter) Dimension(java.awt.Dimension) Point(java.awt.Point) JToggleButton(javax.swing.JToggleButton) ActionListener(java.awt.event.ActionListener) ItemListener(java.awt.event.ItemListener)

Aggregations

ItemEvent (java.awt.event.ItemEvent)339 ItemListener (java.awt.event.ItemListener)313 ActionEvent (java.awt.event.ActionEvent)120 ActionListener (java.awt.event.ActionListener)110 JPanel (javax.swing.JPanel)106 JLabel (javax.swing.JLabel)84 JCheckBox (javax.swing.JCheckBox)72 JComboBox (javax.swing.JComboBox)65 Dimension (java.awt.Dimension)59 JButton (javax.swing.JButton)53 BorderLayout (java.awt.BorderLayout)48 JTextField (javax.swing.JTextField)46 ButtonGroup (javax.swing.ButtonGroup)35 JCheckBoxMenuItem (javax.swing.JCheckBoxMenuItem)33 GridLayout (java.awt.GridLayout)30 ChangeEvent (javax.swing.event.ChangeEvent)30 GridBagConstraints (java.awt.GridBagConstraints)29 JMenu (javax.swing.JMenu)29 ChangeListener (javax.swing.event.ChangeListener)29 GridBagLayout (java.awt.GridBagLayout)28