示例#1
0
 private void initGUI()
 {
     try
     {
         setPreferredSize(new Dimension(400, 300));
         {
             generalPanel = new JPanel();
             FlowLayout generalPanelLayout = new FlowLayout();
             generalPanelLayout.setAlignment(FlowLayout.LEFT);
             generalPanel.setLayout(generalPanelLayout);
             this.addTab("General", null, generalPanel, null);
             {
                 resolutionPanel = new JPanel();
                 generalPanel.add(resolutionPanel);
                 FlowLayout resolutionPanelLayout = new FlowLayout();
                 resolutionPanel.setLayout(resolutionPanelLayout);
                 resolutionPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Resolution", TitledBorder.LEADING, TitledBorder.TOP));
                 {
                     resolutionCheckBox = new JCheckBox();
                     resolutionPanel.add(resolutionCheckBox);
                     resolutionCheckBox.setText("Override");
                 }
                 {
                     jLabel1 = new JLabel();
                     resolutionPanel.add(jLabel1);
                     jLabel1.setText("Image Width:");
                 }
                 {
                     resolutionXTextField = new JTextField();
                     resolutionPanel.add(resolutionXTextField);
                     resolutionXTextField.setText("640");
                     resolutionXTextField.setPreferredSize(new java.awt.Dimension(50, 20));
                 }
                 {
                     jLabel2 = new JLabel();
                     resolutionPanel.add(jLabel2);
                     jLabel2.setText("Image Height:");
                 }
                 {
                     resolutionYTextField = new JTextField();
                     resolutionPanel.add(resolutionYTextField);
                     resolutionYTextField.setText("480");
                     resolutionYTextField.setPreferredSize(new java.awt.Dimension(50, 20));
                 }
             }
             {
                 threadsPanel = new JPanel();
                 generalPanel.add(threadsPanel);
                 threadsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Threads", TitledBorder.LEADING, TitledBorder.TOP));
                 {
                     threadCheckBox = new JCheckBox();
                     threadsPanel.add(threadCheckBox);
                     threadCheckBox.setText("Use All Processors");
                 }
                 {
                     jLabel3 = new JLabel();
                     threadsPanel.add(jLabel3);
                     jLabel3.setText("Threads:");
                 }
                 {
                     threadTextField = new JTextField();
                     threadsPanel.add(threadTextField);
                     threadTextField.setText("1");
                     threadTextField.setPreferredSize(new java.awt.Dimension(50, 20));
                 }
             }
         }
         {
             rendererPanel = new JPanel();
             FlowLayout rendererPanelLayout = new FlowLayout();
             rendererPanelLayout.setAlignment(FlowLayout.LEFT);
             rendererPanel.setLayout(rendererPanelLayout);
             this.addTab("Renderer", null, rendererPanel, null);
             {
                 defaultRendererRadioButton = new JRadioButton();
                 rendererPanel.add(defaultRendererRadioButton);
                 defaultRendererRadioButton.setText("Default Renderer");
             }
             {
                 bucketRendererPanel = new JPanel();
                 BoxLayout bucketRendererPanelLayout = new BoxLayout(bucketRendererPanel, javax.swing.BoxLayout.Y_AXIS);
                 bucketRendererPanel.setLayout(bucketRendererPanelLayout);
                 rendererPanel.add(bucketRendererPanel);
                 bucketRendererPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Bucket Renderer", TitledBorder.LEADING, TitledBorder.TOP));
                 {
                     bucketRendererRadioButton = new JRadioButton();
                     bucketRendererPanel.add(bucketRendererRadioButton);
                     bucketRendererRadioButton.setText("Enable");
                 }
                 {
                     samplingPanel = new JPanel();
                     GridLayout samplingPanelLayout = new GridLayout(2, 2);
                     samplingPanelLayout.setColumns(2);
                     samplingPanelLayout.setHgap(5);
                     samplingPanelLayout.setVgap(5);
                     samplingPanelLayout.setRows(2);
                     samplingPanel.setLayout(samplingPanelLayout);
                     bucketRendererPanel.add(samplingPanel);
                     {
                         jLabel5 = new JLabel();
                         samplingPanel.add(jLabel5);
                         jLabel5.setText("Min:");
                     }
                     {
                         ComboBoxModel minSamplingComboBoxModel = new DefaultComboBoxModel(new string[] {
                             "Item One", "Item Two" });
                         minSamplingComboBox = new JComboBox();
                         samplingPanel.add(minSamplingComboBox);
                         minSamplingComboBox.setModel(minSamplingComboBoxModel);
                     }
                     {
                         jLabel6 = new JLabel();
                         samplingPanel.add(jLabel6);
                         jLabel6.setText("Max:");
                     }
                     {
                         ComboBoxModel maxSamplingComboxBoxModel = new DefaultComboBoxModel(new string[] {
                             "Item One", "Item Two" });
                         maxSamplingComboxBox = new JComboBox();
                         samplingPanel.add(maxSamplingComboxBox);
                         maxSamplingComboxBox.setModel(maxSamplingComboxBoxModel);
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         e.printStackTrace();
     }
 }
示例#2
0
 private void initGUI()
 {
     try
     {
         setPreferredSize(new Dimension(400, 300));
         {
             generalPanel = new JPanel();
             FlowLayout generalPanelLayout = new FlowLayout();
             generalPanelLayout.setAlignment(FlowLayout.LEFT);
             generalPanel.setLayout(generalPanelLayout);
             this.addTab("General", null, generalPanel, null);
             {
                 resolutionPanel = new JPanel();
                 generalPanel.add(resolutionPanel);
                 FlowLayout resolutionPanelLayout = new FlowLayout();
                 resolutionPanel.setLayout(resolutionPanelLayout);
                 resolutionPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Resolution", TitledBorder.LEADING, TitledBorder.TOP));
                 {
                     resolutionCheckBox = new JCheckBox();
                     resolutionPanel.add(resolutionCheckBox);
                     resolutionCheckBox.setText("Override");
                 }
                 {
                     jLabel1 = new JLabel();
                     resolutionPanel.add(jLabel1);
                     jLabel1.setText("Image Width:");
                 }
                 {
                     resolutionXTextField = new JTextField();
                     resolutionPanel.add(resolutionXTextField);
                     resolutionXTextField.setText("640");
                     resolutionXTextField.setPreferredSize(new java.awt.Dimension(50, 20));
                 }
                 {
                     jLabel2 = new JLabel();
                     resolutionPanel.add(jLabel2);
                     jLabel2.setText("Image Height:");
                 }
                 {
                     resolutionYTextField = new JTextField();
                     resolutionPanel.add(resolutionYTextField);
                     resolutionYTextField.setText("480");
                     resolutionYTextField.setPreferredSize(new java.awt.Dimension(50, 20));
                 }
             }
             {
                 threadsPanel = new JPanel();
                 generalPanel.add(threadsPanel);
                 threadsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Threads", TitledBorder.LEADING, TitledBorder.TOP));
                 {
                     threadCheckBox = new JCheckBox();
                     threadsPanel.add(threadCheckBox);
                     threadCheckBox.setText("Use All Processors");
                 }
                 {
                     jLabel3 = new JLabel();
                     threadsPanel.add(jLabel3);
                     jLabel3.setText("Threads:");
                 }
                 {
                     threadTextField = new JTextField();
                     threadsPanel.add(threadTextField);
                     threadTextField.setText("1");
                     threadTextField.setPreferredSize(new java.awt.Dimension(50, 20));
                 }
             }
         }
         {
             rendererPanel = new JPanel();
             FlowLayout rendererPanelLayout = new FlowLayout();
             rendererPanelLayout.setAlignment(FlowLayout.LEFT);
             rendererPanel.setLayout(rendererPanelLayout);
             this.addTab("Renderer", null, rendererPanel, null);
             {
                 defaultRendererRadioButton = new JRadioButton();
                 rendererPanel.add(defaultRendererRadioButton);
                 defaultRendererRadioButton.setText("Default Renderer");
             }
             {
                 bucketRendererPanel = new JPanel();
                 BoxLayout bucketRendererPanelLayout = new BoxLayout(bucketRendererPanel, javax.swing.BoxLayout.Y_AXIS);
                 bucketRendererPanel.setLayout(bucketRendererPanelLayout);
                 rendererPanel.add(bucketRendererPanel);
                 bucketRendererPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Bucket Renderer", TitledBorder.LEADING, TitledBorder.TOP));
                 {
                     bucketRendererRadioButton = new JRadioButton();
                     bucketRendererPanel.add(bucketRendererRadioButton);
                     bucketRendererRadioButton.setText("Enable");
                 }
                 {
                     samplingPanel = new JPanel();
                     GridLayout samplingPanelLayout = new GridLayout(2, 2);
                     samplingPanelLayout.setColumns(2);
                     samplingPanelLayout.setHgap(5);
                     samplingPanelLayout.setVgap(5);
                     samplingPanelLayout.setRows(2);
                     samplingPanel.setLayout(samplingPanelLayout);
                     bucketRendererPanel.add(samplingPanel);
                     {
                         jLabel5 = new JLabel();
                         samplingPanel.add(jLabel5);
                         jLabel5.setText("Min:");
                     }
                     {
                         ComboBoxModel minSamplingComboBoxModel = new DefaultComboBoxModel(new string[] {
                             "Item One", "Item Two"
                         });
                         minSamplingComboBox = new JComboBox();
                         samplingPanel.add(minSamplingComboBox);
                         minSamplingComboBox.setModel(minSamplingComboBoxModel);
                     }
                     {
                         jLabel6 = new JLabel();
                         samplingPanel.add(jLabel6);
                         jLabel6.setText("Max:");
                     }
                     {
                         ComboBoxModel maxSamplingComboxBoxModel = new DefaultComboBoxModel(new string[] {
                             "Item One", "Item Two"
                         });
                         maxSamplingComboxBox = new JComboBox();
                         samplingPanel.add(maxSamplingComboxBox);
                         maxSamplingComboxBox.setModel(maxSamplingComboxBoxModel);
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         e.printStackTrace();
     }
 }