use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class RedmineRepositoryEditor method createCustomPanel.
@Nullable
@Override
protected JComponent createCustomPanel() {
myProjectLabel = new JBLabel("Project:", SwingConstants.RIGHT);
myProjectCombo = new ComboBox(300);
//myProjectCombo.setRenderer(new TaskUiUtil.SimpleComboBoxRenderer("Set URL and password/token first"));
myProjectCombo.setRenderer(new ListCellRendererWrapper<RedmineProjectItem>() {
@Override
public void customize(JList list, RedmineProjectItem value, int index, boolean selected, boolean hasFocus) {
if (value == null) {
setText("Set URL and password/token first");
} else {
if (myProjectCombo.isPopupVisible()) {
//if (value.myLevel == 0 && value.myProject != RedmineRepository.UNSPECIFIED_PROJECT) {
//setFont(UIUtil.getListFont().deriveFont(Font.BOLD));
//}
setText(StringUtil.repeat(" ", value.myLevel) + value.myProject.getName());
} else {
// Do not indent selected project
setText(value.myProject.getName());
}
}
}
});
myAPIKeyLabel = new JBLabel("API Token:", SwingConstants.RIGHT);
myAPIKey = new JPasswordField();
myAllAssigneesCheckBox = new JBCheckBox("Include issues not assigned to me");
return FormBuilder.createFormBuilder().addLabeledComponent(myAPIKeyLabel, myAPIKey).addLabeledComponent(myProjectLabel, myProjectCombo).addComponentToRightColumn(myAllAssigneesCheckBox).getPanel();
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class TracRepositoryEditor method createCustomPanel.
@Nullable
@Override
protected JComponent createCustomPanel() {
mySearchLabel = new JBLabel("Search:", SwingConstants.RIGHT);
myDefaultSearch = new JTextField();
installListener(myDefaultSearch);
return FormBuilder.createFormBuilder().addLabeledComponent(mySearchLabel, myDefaultSearch).getPanel();
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class GenericRepositoryEditor method createCustomPanel.
@Nullable
@Override
protected JComponent createCustomPanel() {
myField2Variable = new IdentityHashMap<>();
FormBuilder builder = FormBuilder.createFormBuilder();
for (final TemplateVariable variable : myRepository.getTemplateVariables()) {
if (variable.isShownOnFirstTab()) {
JTextField field = variable.isHidden() ? new JPasswordField(variable.getValue()) : new JTextField(variable.getValue());
myField2Variable.put(field, variable);
installListener(field);
JBLabel label = new JBLabel(prettifyVariableName(variable.getName()) + ":", SwingConstants.RIGHT);
label.setAnchor(getAnchor());
builder.addLabeledComponent(label, field);
}
}
return builder.getPanel();
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class GenericRepositoryEditor method setAnchor.
@Override
public void setAnchor(@Nullable JComponent anchor) {
super.setAnchor(anchor);
List<JBLabel> labels = UIUtil.findComponentsOfType(myCustomPanel, JBLabel.class);
for (JBLabel label : labels) {
label.setAnchor(anchor);
}
}
use of com.intellij.ui.components.JBLabel in project intellij-community by JetBrains.
the class LighthouseRepositoryEditor method createCustomPanel.
@Nullable
@Override
protected JComponent createCustomPanel() {
myProjectIDLabel = new JBLabel("Project ID:", SwingConstants.RIGHT);
myProjectId = new JTextField();
installListener(myProjectId);
myAPIKeyLabel = new JBLabel("API Token:", SwingConstants.RIGHT);
myAPIKey = new JTextField();
installListener(myAPIKey);
return FormBuilder.createFormBuilder().addLabeledComponent(myProjectIDLabel, myProjectId).addLabeledComponent(myAPIKeyLabel, myAPIKey).getPanel();
}
Aggregations