in android-npw/src/com/android/tools/idea/npw/assetstudio/ui/ConfigureAdaptiveIconPanel.java [964:1244]
private void addOtherImageOptionLayerTab(JBTabbedPane jBTabbedPane1) {
final JPanel panel6 = new JPanel();
panel6.setLayout(new GridLayoutManager(2, 1, JBUI.emptyInsets(), -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(10, 2, JBUI.emptyInsets(), -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, JBUI.emptyInsets(), -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, JBUI.emptyInsets(), -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 spacer5 = new Spacer();
mGenerateLegacyIconRadioButtonsPanel.add(spacer5,
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
myLegacyIconShapeRowPanel = new JPanel();
myLegacyIconShapeRowPanel.setLayout(new GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1));
myOtherIconsAllOptionsPanel.add(myLegacyIconShapeRowPanel,
new GridConstraints(2, 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));
myLegacyIconShapeLabel = new JBLabel();
myLegacyIconShapeLabel.setText("Shape:");
myLegacyIconShapeRowPanel.add(myLegacyIconShapeLabel,
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));
myLegacyIconShapePanel = new JPanel();
myLegacyIconShapePanel.setLayout(new GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1));
myLegacyIconShapeRowPanel.add(myLegacyIconShapePanel,
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));
myLegacyIconShapeComboBox = new JComboBox();
myLegacyIconShapeComboBox.setToolTipText("The shape of the launcher icon's backdrop.");
myLegacyIconShapePanel.add(myLegacyIconShapeComboBox,
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null,
0, false));
final Spacer spacer6 = new Spacer();
myLegacyIconShapePanel.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
myGenerateRoundIconTitle = new TitledSeparator();
myGenerateRoundIconTitle.setText("Round Icon (API = 25)");
myOtherIconsAllOptionsPanel.add(myGenerateRoundIconTitle,
new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
null, 0, false));
myGenerateRoundIconRowPanel = new JPanel();
myGenerateRoundIconRowPanel.setLayout(new GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1));
myGenerateRoundIconRowPanel.setVisible(true);
myOtherIconsAllOptionsPanel.add(myGenerateRoundIconRowPanel,
new GridConstraints(4, 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));
myGenerateRoundIconLabel = new JBLabel();
myGenerateRoundIconLabel.setText("Generate:");
myGenerateRoundIconRowPanel.add(myGenerateRoundIconLabel,
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));
myGenerateRoundIconRadioButtonsPanel = new JPanel();
myGenerateRoundIconRadioButtonsPanel.setLayout(new GridLayoutManager(1, 3, JBUI.emptyInsets(), -1, -1));
myGenerateRoundIconRowPanel.add(myGenerateRoundIconRadioButtonsPanel,
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));
myGenerateRoundIconYesRadioButton = new JRadioButton();
myGenerateRoundIconYesRadioButton.setSelected(true);
myGenerateRoundIconYesRadioButton.setText("Yes");
myGenerateRoundIconYesRadioButton.setToolTipText("Generate round icon (API 25)");
myGenerateRoundIconRadioButtonsPanel.add(myGenerateRoundIconYesRadioButton,
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 radioButton2 = new JRadioButton();
radioButton2.setSelected(false);
radioButton2.setText("No");
radioButton2.setToolTipText("");
myGenerateRoundIconRadioButtonsPanel.add(radioButton2,
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 spacer7 = new Spacer();
myGenerateRoundIconRadioButtonsPanel.add(spacer7,
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
myGeneratePlayStoreIconTitle = new TitledSeparator();
myGeneratePlayStoreIconTitle.setText("Google Play Store Icon");
myOtherIconsAllOptionsPanel.add(myGeneratePlayStoreIconTitle,
new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
null, 0, false));
myGeneratePlayStoreIconRowPanel = new JPanel();
myGeneratePlayStoreIconRowPanel.setLayout(new GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1));
myGeneratePlayStoreIconRowPanel.setVisible(true);
myOtherIconsAllOptionsPanel.add(myGeneratePlayStoreIconRowPanel,
new GridConstraints(6, 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));
myGeneratePlayStoreIconLabel = new JBLabel();
myGeneratePlayStoreIconLabel.setText("Generate:");
myGeneratePlayStoreIconRowPanel.add(myGeneratePlayStoreIconLabel,
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));
myGeneratePlayStoreIconRadioButtonsPanel = new JPanel();
myGeneratePlayStoreIconRadioButtonsPanel.setLayout(new GridLayoutManager(1, 3, JBUI.emptyInsets(), -1, -1));
myGeneratePlayStoreIconRowPanel.add(myGeneratePlayStoreIconRadioButtonsPanel,
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));
myGeneratePlayStoreIconYesRadioButton = new JRadioButton();
myGeneratePlayStoreIconYesRadioButton.setSelected(true);
myGeneratePlayStoreIconYesRadioButton.setText("Yes");
myGeneratePlayStoreIconYesRadioButton.setToolTipText("Generate icon for Google Play Store (512x512)");
myGeneratePlayStoreIconRadioButtonsPanel.add(myGeneratePlayStoreIconYesRadioButton,
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 radioButton3 = new JRadioButton();
radioButton3.setSelected(false);
radioButton3.setText("No");
radioButton3.setToolTipText("");
myGeneratePlayStoreIconRadioButtonsPanel.add(radioButton3,
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 spacer8 = new Spacer();
myGeneratePlayStoreIconRadioButtonsPanel.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0,
false));
final Spacer spacer9 = new Spacer();
myOtherIconsAllOptionsPanel.add(spacer9,
new GridConstraints(9, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
myIconFormatTitle = new TitledSeparator();
myIconFormatTitle.setText("Icon Format");
myOtherIconsAllOptionsPanel.add(myIconFormatTitle,
new GridConstraints(7, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
null, 0, false));
myIconFormatRowPanel = new JPanel();
myIconFormatRowPanel.setLayout(new GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1));
myOtherIconsAllOptionsPanel.add(myIconFormatRowPanel,
new GridConstraints(8, 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));
myIconFormatLabel = new JBLabel();
myIconFormatLabel.setText("Format:");
myIconFormatRowPanel.add(myIconFormatLabel, 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));
myIconFormatRadioButtonsPanel = new JPanel();
myIconFormatRadioButtonsPanel.setLayout(new GridLayoutManager(1, 3, JBUI.emptyInsets(), -1, -1));
myIconFormatRowPanel.add(myIconFormatRadioButtonsPanel,
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));
myIconFormatWebpRadioButton = new JRadioButton();
myIconFormatWebpRadioButton.setActionCommand("WebP");
myIconFormatWebpRadioButton.setText("WebP");
myIconFormatWebpRadioButton.setSelected(true);
myIconFormatWebpRadioButton.setText("WebP");
myIconFormatWebpRadioButton.setToolTipText("Generate WebP icons");
myIconFormatRadioButtonsPanel.add(myIconFormatWebpRadioButton,
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 radioButton4 = new JRadioButton();
radioButton4.setActionCommand("PNG");
radioButton4.setText("PNG");
radioButton4.setText("PNG");
radioButton4.setToolTipText("Generate PNG icons");
myIconFormatRadioButtonsPanel.add(radioButton4, 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 spacer10 = new Spacer();
myIconFormatRadioButtonsPanel.add(spacer10,
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
ButtonGroup buttonGroup;
buttonGroup = new ButtonGroup();
buttonGroup.add(myForegroundImageRadioButton);
buttonGroup.add(myForegroundClipartRadioButton);
buttonGroup.add(myForegroundTextRadioButton);
buttonGroup = new ButtonGroup();
buttonGroup.add(myForegroundTrimNoRadioButton);
buttonGroup.add(myForegroundTrimYesRadioButton);
if (myIsMonochromeSupported) {
buttonGroup = new ButtonGroup();
buttonGroup.add(myMonochromeImageRadioButton);
buttonGroup.add(myMonochromeClipartRadioButton);
buttonGroup.add(myMonochromeTextRadioButton);
buttonGroup = new ButtonGroup();
buttonGroup.add(myMonochromeTrimNoRadioButton);
buttonGroup.add(myMonochromeTrimYesRadioButton);
}
buttonGroup = new ButtonGroup();
buttonGroup.add(radioButton1);
buttonGroup.add(myGenerateLegacyIconYesRadioButton);
buttonGroup = new ButtonGroup();
buttonGroup.add(myBackgroundImageRadioButton);
buttonGroup.add(myBackgroundColorRadioButton);
buttonGroup = new ButtonGroup();
buttonGroup.add(myBackgroundTrimNoRadioButton);
buttonGroup.add(myBackgroundTrimYesRadioButton);
buttonGroup = new ButtonGroup();
buttonGroup.add(radioButton2);
buttonGroup.add(myGenerateRoundIconYesRadioButton);
buttonGroup = new ButtonGroup();
buttonGroup.add(myGeneratePlayStoreIconYesRadioButton);
buttonGroup.add(radioButton3);
buttonGroup = new ButtonGroup();
buttonGroup.add(myIconFormatWebpRadioButton);
buttonGroup.add(radioButton4);
}