private void setupUI()

in android-npw/src/com/android/tools/idea/npw/assetstudio/ui/ConfigureTvBannerPanel.java [565:1084]


  private void setupUI() {
    myRootPanel = new JPanel();
    myRootPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    myOutputNamePanelRow = new JPanel();
    myOutputNamePanelRow.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myRootPanel.add(myOutputNamePanelRow, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL,
                                                              GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                              GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myOutputNamePanelRow.setBorder(
      BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0), null, TitledBorder.DEFAULT_JUSTIFICATION,
                                       TitledBorder.DEFAULT_POSITION, null, null));
    myOutputNameLabel = new JBLabel();
    myOutputNameLabel.setText("Name:");
    myOutputNamePanelRow.add(myOutputNameLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                                    new Dimension(80, -1), null, null, 0, false));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    myOutputNamePanelRow.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                         null, null, 0, false));
    myOutputNameTextField = new JTextField();
    myOutputNameTextField.setText("(name)");
    myOutputNameTextField.setToolTipText("The filename which will be used for these icons.");
    panel1.add(myOutputNameTextField, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                          GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                          GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JBTabbedPane jBTabbedPane1 = new JBTabbedPane();
    jBTabbedPane1.setTabPlacement(1);
    myRootPanel.add(jBTabbedPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                       GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                       GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                       new Dimension(200, 200), null, 0, false));
    jBTabbedPane1.setBorder(
      BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0), null, TitledBorder.DEFAULT_JUSTIFICATION,
                                       TitledBorder.DEFAULT_POSITION, null, null));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    jBTabbedPane1.addTab("Foreground Layer", panel2);
    myForegroundScrollPane = new JBScrollPane();
    myForegroundScrollPane.setHorizontalScrollBarPolicy(31);
    panel2.add(myForegroundScrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                           null, null, null, 0, false));
    myForegroundAllOptionsPanel = new JPanel();
    myForegroundAllOptionsPanel.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundScrollPane.setViewportView(myForegroundAllOptionsPanel);
    myForegroundLayerNamePanel = new JPanel();
    myForegroundLayerNamePanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundLayerNamePanel.setVisible(true);
    myForegroundAllOptionsPanel.add(myForegroundLayerNamePanel,
                                    new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myForegroundLayerNameLabel = new JBLabel();
    myForegroundLayerNameLabel.setText("Layer name:");
    myForegroundLayerNamePanel.add(myForegroundLayerNameLabel,
                                   new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                       GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                       new Dimension(70, -1), null, null, 0, false));
    final JPanel panel3 = new JPanel();
    panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundLayerNamePanel.add(panel3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                               null, null, null, 0, false));
    myForegroundLayerNameTextField = new JTextField();
    myForegroundLayerNameTextField.setText("(name)");
    myForegroundLayerNameTextField.setToolTipText("The filename which will be used for these icons.");
    panel3.add(myForegroundLayerNameTextField,
               new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                   GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                   GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundImageTitleSeparator = new TitledSeparator();
    myForegroundImageTitleSeparator.setText("Image");
    myForegroundAllOptionsPanel.add(myForegroundImageTitleSeparator,
                                    new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundImageAssetPanel = new JPanel();
    myForegroundImageAssetPanel.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundAllOptionsPanel.add(myForegroundImageAssetPanel,
                                    new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myForegroundImageSourcePanel = new JPanel();
    myForegroundImageSourcePanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundImageAssetPanel.add(myForegroundImageSourcePanel,
                                    new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myForegroundImagePathLabel = new JBLabel();
    myForegroundImagePathLabel.setText("Image file:");
    myForegroundImageSourcePanel.add(myForegroundImagePathLabel,
                                     new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                         GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                         new Dimension(70, -1), null, null, 1, false));
    myForegroundImageAssetBrowser = new ImageAssetBrowser();
    myForegroundImageSourcePanel.add(myForegroundImageAssetBrowser,
                                     new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                         GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundImageResizePanel = new JPanel();
    myForegroundImageResizePanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundImageResizePanel.setVisible(true);
    myForegroundImageAssetPanel.add(myForegroundImageResizePanel,
                                    new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                        null, null, 0, true));
    myForegroundImageResizeLabel = new JBLabel();
    myForegroundImageResizeLabel.setText("Resize:");
    myForegroundImageResizePanel.add(myForegroundImageResizeLabel,
                                     new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                         GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                         new Dimension(70, -1), null, null, 1, false));
    myForegroundImageResizeSliderPanel = new JPanel();
    myForegroundImageResizeSliderPanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundImageResizePanel.add(myForegroundImageResizeSliderPanel,
                                     new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                         null, null, 0, false));
    myForegroundImageResizeSlider = new JSlider();
    myForegroundImageResizeSlider.setMaximum(400);
    myForegroundImageResizeSlider.setMinimum(0);
    myForegroundImageResizeSlider.setMinorTickSpacing(20);
    myForegroundImageResizeSlider.setPaintLabels(false);
    myForegroundImageResizeSlider.setPaintTicks(true);
    myForegroundImageResizeSlider.setSnapToTicks(false);
    myForegroundImageResizeSlider.setToolTipText(
      "Resize the original asset using the specified scaling factor (in percent). This happens after any trimming.");
    myForegroundImageResizeSlider.setValue(100);
    myForegroundImageResizeSlider.setValueIsAdjusting(false);
    myForegroundImageResizeSliderPanel.add(myForegroundImageResizeSlider,
                                           new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                               GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundImageResizeValueTextField = new JTextField();
    myForegroundImageResizeValueTextField.setHorizontalAlignment(4);
    myForegroundImageResizeValueTextField.setText("100");
    myForegroundImageResizeSliderPanel.add(myForegroundImageResizeValueTextField,
                                           new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                               GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                                                               new Dimension(30, -1), null, 0, false));
    myForegroundImageResizeValueLabel = new JBLabel();
    myForegroundImageResizeValueLabel.setText("%");
    myForegroundImageResizeSliderPanel.add(myForegroundImageResizeValueLabel,
                                           new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                               GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                                                               new Dimension(-1, -1), null, 0, false));
    myForegroundTextOptionsPanel = new JPanel();
    myForegroundTextOptionsPanel.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundAllOptionsPanel.add(myForegroundTextOptionsPanel,
                                    new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                        null, null, 0, true));
    myForegroundTextTitleSeparator = new TitledSeparator();
    myForegroundTextTitleSeparator.setText("Label");
    myForegroundTextOptionsPanel.add(myForegroundTextTitleSeparator,
                                     new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                         GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundTextAssetRowPanel = new JPanel();
    myForegroundTextAssetRowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundTextOptionsPanel.add(myForegroundTextAssetRowPanel,
                                     new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                         null, null, 0, true));
    myForegroundTextLabel = new JBLabel();
    myForegroundTextLabel.setText("Text:");
    myForegroundTextLabel.setVerifyInputWhenFocusTarget(false);
    myForegroundTextAssetRowPanel.add(myForegroundTextLabel,
                                      new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                          GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                          new Dimension(70, -1), null, null, 1, false));
    myForegroundTextAssetEditor = new MultiLineTextAssetEditor();
    myForegroundTextAssetRowPanel.add(myForegroundTextAssetEditor,
                                      new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                          GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                          GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundColorRowPanel = new JPanel();
    myForegroundColorRowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundTextOptionsPanel.add(myForegroundColorRowPanel,
                                     new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                         GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myForegroundColorLabel = new JBLabel();
    myForegroundColorLabel.setText("Color:");
    myForegroundColorRowPanel.add(myForegroundColorLabel,
                                  new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                      GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                      new Dimension(70, -1), null, null, 1, false));
    myForegroundColorPanel = new ColorPanel();
    myForegroundColorPanel.setSelectedColor(new Color(-16777216));
    myForegroundColorRowPanel.add(myForegroundColorPanel,
                                  new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                      GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                      GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                      new Dimension(78, -1), null, null, 0, false));
    myForegroundTextResizePanel = new JPanel();
    myForegroundTextResizePanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundTextResizePanel.setVisible(true);
    myForegroundTextOptionsPanel.add(myForegroundTextResizePanel,
                                     new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                         null, null, 0, true));
    myForegroundTextResizeLabel = new JBLabel();
    myForegroundTextResizeLabel.setText("Resize:");
    myForegroundTextResizePanel.add(myForegroundTextResizeLabel,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                        GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                        new Dimension(70, -1), null, null, 1, false));
    myForegroundTextResizeSliderPanel = new JPanel();
    myForegroundTextResizeSliderPanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    myForegroundTextResizePanel.add(myForegroundTextResizeSliderPanel,
                                    new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                        null, null, 0, false));
    myForegroundTextResizeSlider = new JSlider();
    myForegroundTextResizeSlider.setMaximum(400);
    myForegroundTextResizeSlider.setMinimum(0);
    myForegroundTextResizeSlider.setMinorTickSpacing(20);
    myForegroundTextResizeSlider.setPaintLabels(false);
    myForegroundTextResizeSlider.setPaintTicks(true);
    myForegroundTextResizeSlider.setSnapToTicks(false);
    myForegroundTextResizeSlider.setToolTipText(
      "Resize the original asset using the specified scaling factor (in percent). This happens after any trimming.");
    myForegroundTextResizeSlider.setValue(100);
    myForegroundTextResizeSlider.setValueIsAdjusting(false);
    myForegroundTextResizeSliderPanel.add(myForegroundTextResizeSlider,
                                          new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                              GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                              GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myForegroundTextResizeValueTextField = new JTextField();
    myForegroundTextResizeValueTextField.setHorizontalAlignment(4);
    myForegroundTextResizeValueTextField.setText("100");
    myForegroundTextResizeSliderPanel.add(myForegroundTextResizeValueTextField,
                                           new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                               GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                                                               new Dimension(30, -1), null, 0, false));

    myForegroundTextResizeValueLabel = new JLabel();
    myForegroundTextResizeValueLabel.setHorizontalAlignment(4);
    myForegroundTextResizeValueLabel.setText("%");
    myForegroundTextResizeSliderPanel.add(myForegroundTextResizeValueLabel,
                                          new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                              GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                                                              new Dimension(-1, -1), null, 0, false));
    final Spacer spacer1 = new Spacer();
    myForegroundAllOptionsPanel.add(spacer1,
                                    new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                                                        GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    final JPanel panel4 = new JPanel();
    panel4.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    jBTabbedPane1.addTab("Background Layer", panel4);
    myBackgroundScrollPane = new JBScrollPane();
    myBackgroundScrollPane.setHorizontalScrollBarPolicy(31);
    panel4.add(myBackgroundScrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                           null, null, null, 0, false));
    myBackgroundAllOptionsPanel = new JPanel();
    myBackgroundAllOptionsPanel.setLayout(new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundScrollPane.setViewportView(myBackgroundAllOptionsPanel);
    myBackgroundLayerNamePanel = new JPanel();
    myBackgroundLayerNamePanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundLayerNamePanel.setVisible(true);
    myBackgroundAllOptionsPanel.add(myBackgroundLayerNamePanel,
                                    new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                        null, null, 0, true));
    myBackgroundLayerNameLabel = new JBLabel();
    myBackgroundLayerNameLabel.setText("Layer name:");
    myBackgroundLayerNamePanel.add(myBackgroundLayerNameLabel,
                                   new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                       GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                       new Dimension(70, -1), null, null, 0, false));
    final JPanel panel5 = new JPanel();
    panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundLayerNamePanel.add(panel5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                               null, null, null, 0, false));
    myBackgroundLayerNameTextField = new JTextField();
    myBackgroundLayerNameTextField.setText("(name)");
    myBackgroundLayerNameTextField.setToolTipText("The filename which will be used for these icons.");
    panel5.add(myBackgroundLayerNameTextField,
               new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                   GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                   GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundSourceAssetTitleSeparator = new TitledSeparator();
    myBackgroundSourceAssetTitleSeparator.setText("Source Asset");
    myBackgroundAllOptionsPanel.add(myBackgroundSourceAssetTitleSeparator,
                                    new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundAssetTypePanel = new JPanel();
    myBackgroundAssetTypePanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundAllOptionsPanel.add(myBackgroundAssetTypePanel,
                                    new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myBackgroundAssetTypeLabel = new JLabel();
    myBackgroundAssetTypeLabel.setText("Asset type:");
    myBackgroundAssetTypePanel.add(myBackgroundAssetTypeLabel,
                                   new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                       GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                       new Dimension(70, -1), null, null, 1, false));
    myBackgroundAssetRadioButtonsPanel = new JPanel();
    myBackgroundAssetRadioButtonsPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundAssetTypePanel.add(myBackgroundAssetRadioButtonsPanel,
                                   new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL,
                                                       GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                       GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                       null, null, 0, false));
    myBackgroundImageRadioButton = new JRadioButton();
    myBackgroundImageRadioButton.setText("Image");
    myBackgroundImageRadioButton.setToolTipText(
      "Select an image, e.g. PNG, SVG, PSD, or a drawable from disk to generate Android icons for your app.");
    myBackgroundAssetRadioButtonsPanel.add(myBackgroundImageRadioButton,
                                           new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                               GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundColorRadioButton = new JRadioButton();
    myBackgroundColorRadioButton.setText("Color");
    myBackgroundColorRadioButton.setToolTipText("Select from a background color for the Android icons for your app.");
    myBackgroundAssetRadioButtonsPanel.add(myBackgroundColorRadioButton,
                                           new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                               GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                               GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundAssetTypeSourcePanel = new JPanel();
    myBackgroundAssetTypeSourcePanel.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundAllOptionsPanel.add(myBackgroundAssetTypeSourcePanel,
                                    new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myBackgroundImageAssetRowPanel = new JPanel();
    myBackgroundImageAssetRowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundAssetTypeSourcePanel.add(myBackgroundImageAssetRowPanel,
                                         new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                             GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                             GridConstraints.SIZEPOLICY_FIXED, new Dimension(30, 30), null, null, 0, true));
    myBackgroundImagePathLabel = new JBLabel();
    myBackgroundImagePathLabel.setText("Path:");
    myBackgroundImageAssetRowPanel.add(myBackgroundImagePathLabel,
                                       new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                           GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                           new Dimension(70, -1), null, null, 1, false));
    myBackgroundImageAssetBrowser = new ImageAssetBrowser();
    myBackgroundImageAssetRowPanel.add(myBackgroundImageAssetBrowser,
                                       new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                           GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundColorRowPanel = new JPanel();
    myBackgroundColorRowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundAssetTypeSourcePanel.add(myBackgroundColorRowPanel,
                                         new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                             GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                             GridConstraints.SIZEPOLICY_FIXED, new Dimension(30, 30), null, null, 0, true));
    myBackgroundColorLabel = new JBLabel();
    myBackgroundColorLabel.setText("Color:");
    myBackgroundColorRowPanel.add(myBackgroundColorLabel,
                                  new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                      GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                      new Dimension(70, -1), null, null, 1, false));
    myBackgroundColorPanel = new ColorPanel();
    myBackgroundColorPanel.setSelectedColor(new Color(-16777216));
    myBackgroundColorRowPanel.add(myBackgroundColorPanel,
                                  new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                      GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                      GridConstraints.SIZEPOLICY_FIXED, new Dimension(78, -1), null, null, 0, false));
    myBackgroundScalingTitleSeparator = new TitledSeparator();
    myBackgroundScalingTitleSeparator.setText("Scaling");
    myBackgroundAssetTypeSourcePanel.add(myBackgroundScalingTitleSeparator,
                                         new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                             GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                             GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundImageOptionsPanel = new JPanel();
    myBackgroundImageOptionsPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundAllOptionsPanel.add(myBackgroundImageOptionsPanel,
                                    new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, true));
    myBackgroundResizeRowPanel = new JPanel();
    myBackgroundResizeRowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundResizeRowPanel.setVisible(true);
    myBackgroundImageOptionsPanel.add(myBackgroundResizeRowPanel,
                                      new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                          GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                          GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                          null, null, 0, true));
    myBackgroundResizeLabel = new JBLabel();
    myBackgroundResizeLabel.setText("Resize:");
    myBackgroundResizeRowPanel.add(myBackgroundResizeLabel,
                                   new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                       GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                       new Dimension(70, -1), null, null, 1, false));
    myBackgroundResizeSliderPanel = new JPanel();
    myBackgroundResizeSliderPanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    myBackgroundResizeRowPanel.add(myBackgroundResizeSliderPanel,
                                   new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                       GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                       GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                       null, null, 0, false));
    myBackgroundResizeSlider = new JSlider();
    myBackgroundResizeSlider.setMaximum(400);
    myBackgroundResizeSlider.setMinimum(0);
    myBackgroundResizeSlider.setMinorTickSpacing(20);
    myBackgroundResizeSlider.setPaintLabels(false);
    myBackgroundResizeSlider.setPaintTicks(true);
    myBackgroundResizeSlider.setSnapToTicks(false);
    myBackgroundResizeSlider.setToolTipText(
      "Resize the original asset using the specified scaling factor (in percent). This happens after any trimming.");
    myBackgroundResizeSlider.setValue(100);
    myBackgroundResizeSliderPanel.add(myBackgroundResizeSlider,
                                      new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                          GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                          GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    myBackgroundResizeValueTextField = new JTextField();
    myBackgroundResizeValueTextField.setHorizontalAlignment(4);
    myBackgroundResizeValueTextField.setText("100");
    myBackgroundResizeSliderPanel.add(myBackgroundResizeValueTextField,
                                           new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                               GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                                                               new Dimension(30, -1), null, 0, false));
    myBackgroundResizeValueLabel = new JLabel();
    myBackgroundResizeValueLabel.setHorizontalAlignment(4);
    myBackgroundResizeValueLabel.setText("%");
    myBackgroundResizeSliderPanel.add(myBackgroundResizeValueLabel,
                                      new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                          GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                                                          new Dimension(-1, -1), null, 0, false));
    final Spacer spacer2 = new Spacer();
    myBackgroundAllOptionsPanel.add(spacer2,
                                    new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                                                        GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    final JPanel panel6 = new JPanel();
    panel6.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    jBTabbedPane1.addTab("Options", panel6);
    myOtherIconsScrollPane = new JBScrollPane();
    myOtherIconsScrollPane.setHorizontalScrollBarPolicy(31);
    panel6.add(myOtherIconsScrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                                                           null, null, null, 0, false));
    myOtherIconsAllOptionsPanel = new JPanel();
    myOtherIconsAllOptionsPanel.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
    myOtherIconsScrollPane.setViewportView(myOtherIconsAllOptionsPanel);
    myOtherIconsAllOptionsPanel.setBorder(
      BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0), null, TitledBorder.DEFAULT_JUSTIFICATION,
                                       TitledBorder.DEFAULT_POSITION, null, null));
    final TitledSeparator titledSeparator1 = new TitledSeparator();
    titledSeparator1.setText("Legacy Icon (API ≤ 25)");
    myOtherIconsAllOptionsPanel.add(titledSeparator1,
                                    new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                        GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
                                                        null, 0, false));
    myGenerateLegacyIconRowPanel = new JPanel();
    myGenerateLegacyIconRowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    myGenerateLegacyIconRowPanel.setVisible(true);
    myOtherIconsAllOptionsPanel.add(myGenerateLegacyIconRowPanel,
                                    new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                        null, null, 0, true));
    myGenerateLegacyIconLabel = new JBLabel();
    myGenerateLegacyIconLabel.setText("Generate:");
    myGenerateLegacyIconRowPanel.add(myGenerateLegacyIconLabel,
                                     new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                         GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED,
                                                         new Dimension(70, -1), null, null, 1, false));
    mGenerateLegacyIconRadioButtonsPanel = new JPanel();
    mGenerateLegacyIconRadioButtonsPanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    myGenerateLegacyIconRowPanel.add(mGenerateLegacyIconRadioButtonsPanel,
                                     new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                                         GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                                                         null, null, 0, false));
    myGenerateLegacyIconYesRadioButton = new JRadioButton();
    myGenerateLegacyIconYesRadioButton.setSelected(true);
    myGenerateLegacyIconYesRadioButton.setText("Yes");
    myGenerateLegacyIconYesRadioButton.setToolTipText("Generate legacy icon (API ≤ 25)");
    mGenerateLegacyIconRadioButtonsPanel.add(myGenerateLegacyIconYesRadioButton,
                                             new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                                 GridConstraints.SIZEPOLICY_CAN_SHRINK |
                                                                 GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
                                                                 null, null, null, 0, false));
    final JRadioButton radioButton1 = new JRadioButton();
    radioButton1.setSelected(false);
    radioButton1.setText("No");
    radioButton1.setToolTipText("");
    mGenerateLegacyIconRadioButtonsPanel.add(radioButton1,
                                             new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                                                                 GridConstraints.SIZEPOLICY_CAN_SHRINK |
                                                                 GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
                                                                 null, null, null, 0, false));
    final Spacer spacer3 = new Spacer();
    mGenerateLegacyIconRadioButtonsPanel.add(spacer3,
                                             new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                                                                 GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
    final Spacer spacer4 = new Spacer();
    myOtherIconsAllOptionsPanel.add(spacer4,
                                    new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
                                                        GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
    ButtonGroup buttonGroup;
    buttonGroup = new ButtonGroup();
    buttonGroup.add(radioButton1);
    buttonGroup.add(myGenerateLegacyIconYesRadioButton);
    buttonGroup = new ButtonGroup();
    buttonGroup.add(myBackgroundImageRadioButton);
    buttonGroup.add(myBackgroundColorRadioButton);
  }