JComponent () { JPanel optionsPanel = new JPanel(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); if (myCbDropCasts.isEnabled()) { myCbDropCasts.setSelected(JavaRefactoringSettings.getInstance().TYPE_COOK_DROP_CASTS); } if (myCbPreserveRawArrays.isEnabled()) { myCbPreserveRawArrays.setSelected(JavaRefactoringSettings.getInstance().TYPE_COOK_PRESERVE_RAW_ARRAYS); } if (myCbLeaveObjectParameterizedTypesRaw.isEnabled()) { myCbLeaveObjectParameterizedTypesRaw.setSelected( JavaRefactoringSettings.getInstance().TYPE_COOK_LEAVE_OBJECT_PARAMETERIZED_TYPES_RAW); } if (myCbExhaustive.isEnabled()) { myCbExhaustive.setSelected( JavaRefactoringSettings.getInstance().TYPE_COOK_EXHAUSTIVE); } if (myCbCookObjects.isEnabled()) { myCbCookObjects.setSelected( JavaRefactoringSettings.getInstance().TYPE_COOK_COOK_OBJECTS); } if (myCbCookToWildcards.isEnabled()) { myCbCookToWildcards.setSelected( JavaRefactoringSettings.getInstance().TYPE_COOK_PRODUCE_WILDCARDS); } myCbDropCasts.setText(JavaRareRefactoringsBundle.message("type.cook.drop.obsolete.casts")); myCbPreserveRawArrays.setText(JavaRareRefactoringsBundle.message("type.cook.preserve.raw.arrays")); myCbLeaveObjectParameterizedTypesRaw.setText(JavaRareRefactoringsBundle.message("type.cook.leave.object.parameterized.types.raw")); myCbExhaustive.setText(JavaRareRefactoringsBundle.message("type.cook.perform.exhaustive.search")); myCbCookObjects.setText(JavaRareRefactoringsBundle.message("type.cook.generify.objects")); myCbCookToWildcards.setText(JavaRareRefactoringsBundle.message("type.cook.produce.wildcard.types")); gbConstraints.insets = JBInsets.create(4, 8); gbConstraints.weighty = 1; gbConstraints.weightx = 1; gbConstraints.gridwidth = GridBagConstraints.REMAINDER; gbConstraints.fill = GridBagConstraints.BOTH; optionsPanel.add(myClassNameLabel, gbConstraints); gbConstraints.gridx = 0; gbConstraints.weightx = 1; gbConstraints.gridwidth = 1; gbConstraints.gridy = 1; gbConstraints.fill = GridBagConstraints.BOTH; optionsPanel.add(myCbDropCasts, gbConstraints); gbConstraints.gridx = 1; gbConstraints.weightx = 1; gbConstraints.gridwidth = GridBagConstraints.REMAINDER; gbConstraints.fill = GridBagConstraints.BOTH; optionsPanel.add(myCbPreserveRawArrays, gbConstraints); gbConstraints.gridx = 0; gbConstraints.gridwidth = 2; gbConstraints.gridy = 2; optionsPanel.add(myCbLeaveObjectParameterizedTypesRaw, gbConstraints); gbConstraints.gridy++; optionsPanel.add(myCbExhaustive, gbConstraints); gbConstraints.gridy++; optionsPanel.add(myCbCookObjects, gbConstraints); gbConstraints.gridy++; optionsPanel.add(myCbCookToWildcards, gbConstraints); return optionsPanel; }