use of com.intellij.openapi.ui.FixedSizeButton in project intellij-community by JetBrains.
the class StudyNewProjectPanel method layoutPanel.
private void layoutPanel() {
myCoursesComboBox = new ComboBox<>();
final LabeledComponent<ComboBox> coursesCombo = LabeledComponent.create(myCoursesComboBox, "Courses:", BorderLayout.WEST);
myRefreshButton = new FixedSizeButton(coursesCombo);
if (SystemInfo.isMac && !UIUtil.isUnderDarcula())
myRefreshButton.putClientProperty("JButton.buttonType", null);
myRefreshButton.setIcon(AllIcons.Actions.Refresh);
myBrowseButton = new FixedSizeButton(coursesCombo);
final JPanel comboPanel = new JPanel(new BorderLayout());
comboPanel.add(coursesCombo, BorderLayout.CENTER);
comboPanel.add(myRefreshButton, BorderLayout.EAST);
final JPanel coursesPanel = new JPanel(new BorderLayout());
coursesPanel.add(comboPanel, BorderLayout.CENTER);
coursesPanel.add(myBrowseButton, BorderLayout.EAST);
add(coursesPanel);
myAnchor = coursesCombo;
final JPanel panel = new JPanel(new BorderLayout());
final JLabel invisibleLabel = new JLabel();
invisibleLabel.setPreferredSize(new JLabel("Location: ").getPreferredSize());
panel.add(invisibleLabel, BorderLayout.WEST);
myInfoPanel = new JPanel(new VerticalFlowLayout());
myAuthorLabel = new JLabel();
myDescriptionPane = new JTextPane();
myDescriptionPane.setEditable(true);
myDescriptionPane.setEnabled(true);
myAuthorLabel.setEnabled(true);
myDescriptionPane.setPreferredSize(new Dimension(150, 200));
myDescriptionPane.setFont(coursesCombo.getFont());
myInfoPanel.add(myAuthorLabel);
myInfoPanel.add(new JBScrollPane(myDescriptionPane));
panel.add(myInfoPanel, BorderLayout.CENTER);
add(panel);
}
use of com.intellij.openapi.ui.FixedSizeButton in project intellij-community by JetBrains.
the class EditLocationDialog method init.
@Override
protected void init() {
setTitle(myTitle);
myTfUrl = new JTextField();
myTfPath = new JTextField();
myBtnBrowseLocalPath = new FixedSizeButton(myTfPath);
super.init();
}
use of com.intellij.openapi.ui.FixedSizeButton in project android by JetBrains.
the class ChooseGradleHomeDialogFixture method chooseGradleHome.
@NotNull
public ChooseGradleHomeDialogFixture chooseGradleHome(@NotNull File gradleHomePath) {
FixedSizeButton browseButton = robot().finder().findByType(target(), FixedSizeButton.class, true);
robot().click(browseButton);
FileChooserDialogFixture fileChooserDialog = FileChooserDialogFixture.findDialog(robot(), new GenericTypeMatcher<JDialog>(JDialog.class) {
@Override
protected boolean isMatching(@NotNull JDialog dialog) {
Collection<JLabel> descriptionLabels = robot().finder().findAll(dialog, JLabelMatcher.withText("Gradle home:"));
return descriptionLabels.size() == 1;
}
});
fileChooserDialog.select(findFileByIoFile(gradleHomePath, true));
fileChooserDialog.clickOk();
return this;
}
Aggregations