mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -276,7 +276,17 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
if (isInFileOnly()) return null;
|
||||
JPanel optionsPanel = new JPanel(new BorderLayout());
|
||||
String scope = myFindUsagesOptions.searchScope.getDisplayName();
|
||||
myScopeCombo = new ScopeChooserCombo(myProject, mySearchInLibrariesAvailable, true, scope);
|
||||
myScopeCombo = new ScopeChooserCombo(myProject, mySearchInLibrariesAvailable, true, scope) {
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return new Dimension(200, super.getMinimumSize().height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
return new Dimension(400, super.getPreferredSize().height);
|
||||
}
|
||||
};
|
||||
Disposer.register(myDisposable, myScopeCombo);
|
||||
optionsPanel.add(myScopeCombo, BorderLayout.CENTER);
|
||||
JComponent separator = SeparatorFactory.createSeparator(FindBundle.message("find.scope.label"), myScopeCombo.getComboBox());
|
||||
|
||||
@@ -769,7 +769,7 @@ public class FindDialog extends DialogWrapper {
|
||||
|
||||
gbConstraints.gridx = 1;
|
||||
gbConstraints.weightx = 1;
|
||||
myDirectoryComboBox = new ComboBox(-1);
|
||||
myDirectoryComboBox = new ComboBox(200);
|
||||
Component editorComponent = myDirectoryComboBox.getEditor().getEditorComponent();
|
||||
if (editorComponent instanceof JTextField) {
|
||||
JTextField field = (JTextField)editorComponent;
|
||||
|
||||
@@ -366,8 +366,10 @@ public class SimpleColoredComponent extends JComponent implements Accessible {
|
||||
|
||||
// Take into accound that the component itself can have a border
|
||||
final Insets insets = getInsets();
|
||||
width += insets.left + insets.right;
|
||||
height += insets.top + insets.bottom;
|
||||
if (insets != null) {
|
||||
width += insets.left + insets.right;
|
||||
height += insets.top + insets.bottom;
|
||||
}
|
||||
|
||||
return new Dimension(width, height);
|
||||
}
|
||||
|
||||
@@ -49,11 +49,15 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
myComponent = new MyComponent();
|
||||
}
|
||||
|
||||
public JComponent createComponent() {
|
||||
private void initComponent() {
|
||||
if (myComponent == null) {
|
||||
myComponent = new MyComponent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public JComponent createComponent() {
|
||||
initComponent();
|
||||
DefaultComboBoxModel aModel = new DefaultComboBoxModel(UIUtil.getValidFontNames(false));
|
||||
myComponent.myFontCombo.setModel(aModel);
|
||||
myComponent.myFontSizeCombo.setModel(new DefaultComboBoxModel(UIUtil.getStandardFontSizes()));
|
||||
@@ -99,6 +103,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
}
|
||||
|
||||
public void apply() {
|
||||
initComponent();
|
||||
UISettings settings = UISettings.getInstance();
|
||||
String temp = (String)myComponent.myFontSizeCombo.getEditor().getItem();
|
||||
int _fontSize = -1;
|
||||
@@ -183,6 +188,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
initComponent();
|
||||
UISettings settings = UISettings.getInstance();
|
||||
|
||||
myComponent.myFontCombo.setSelectedItem(settings.FONT_FACE);
|
||||
@@ -218,6 +224,7 @@ public class AppearanceConfigurable extends BaseConfigurable implements Searchab
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
initComponent();
|
||||
UISettings settings = UISettings.getInstance();
|
||||
|
||||
boolean isModified = false;
|
||||
|
||||
Reference in New Issue
Block a user