use of javax.swing.border.EmptyBorder in project zaproxy by zaproxy.
the class ContextAuthenticationPanel method initialize.
/**
* Initialize the panel.
*/
private void initialize() {
this.setLayout(new CardLayout());
this.setName(buildName(getContextIndex()));
this.setLayout(new GridBagLayout());
this.setBorder(new EmptyBorder(2, 2, 2, 2));
this.add(new JLabel(LABEL_DESCRIPTION), LayoutHelper.getGBC(0, 0, 1, 1.0D));
// Method type combo box
this.add(new JLabel(FIELD_LABEL_TYPE_SELECT), LayoutHelper.getGBC(0, 1, 1, 1.0D, new Insets(20, 0, 5, 5)));
this.add(getAuthenticationMethodsComboBox(), LayoutHelper.getGBC(0, 2, 1, 1.0D));
// Method config panel container
this.add(getConfigContainerPanel(), LayoutHelper.getGBC(0, 3, 1, 1.0d, new Insets(10, 0, 10, 0)));
// Logged In/Out indicators
this.add(new JLabel(FIELD_LABEL_LOGGED_IN_INDICATOR), LayoutHelper.getGBC(0, 4, 1, 1.0D));
this.add(getLoggedInIndicaterRegexField(), LayoutHelper.getGBC(0, 5, 1, 1.0D));
this.add(new JLabel(FIELD_LABEL_LOGGED_OUT_INDICATOR), LayoutHelper.getGBC(0, 6, 1, 1.0D));
this.add(getLoggedOutIndicaterRegexField(), LayoutHelper.getGBC(0, 7, 1, 1.0D));
// Padding
this.add(new JLabel(), LayoutHelper.getGBC(0, 99, 1, 1.0D, 1.0D));
}
use of javax.swing.border.EmptyBorder in project pcgen by PCGen.
the class KitPanel method initComponents.
private void initComponents() {
renderer.setCharacter(character);
FlippingSplitPane topPane = new FlippingSplitPane("kitTop");
setTopComponent(topPane);
setOrientation(VERTICAL_SPLIT);
FilterBar<Object, KitFacade> bar = new FilterBar<>();
bar.addDisplayableFilter(new SearchFilterPanel());
//$NON-NLS-1$
qFilterButton.setText(LanguageBundle.getString("in_igQualFilter"));
bar.addDisplayableFilter(qFilterButton);
availableTable.setTreeViewModel(new KitTreeViewModel(character, true));
availableTable.setTreeCellRenderer(renderer);
JPanel availPanel = FilterUtilities.configureFilteredTreeViewPane(availableTable, bar);
Box box = Box.createHorizontalBox();
box.add(Box.createHorizontalGlue());
addButton.setHorizontalTextPosition(SwingConstants.LEADING);
addButton.setAction(addAction);
box.add(addButton);
box.add(Box.createHorizontalStrut(5));
box.setBorder(new EmptyBorder(0, 0, 5, 0));
availPanel.add(box, BorderLayout.SOUTH);
topPane.setLeftComponent(availPanel);
JPanel selPanel = new JPanel(new BorderLayout());
FilterBar<Object, KitFacade> filterBar = new FilterBar<>();
filterBar.addDisplayableFilter(new SearchFilterPanel());
selectedTable.setDisplayableFilter(filterBar);
selectedTable.setTreeViewModel(new KitTreeViewModel(character, false));
selectedTable.setTreeCellRenderer(renderer);
selPanel.add(new JScrollPane(selectedTable), BorderLayout.CENTER);
topPane.setRightComponent(selPanel);
setBottomComponent(infoPane);
setResizeWeight(0.75);
}
use of javax.swing.border.EmptyBorder in project EnrichmentMapApp by BaderLab.
the class PopupDaemon method stateChanged.
/**
* Upon state change, pop-up a tiny window with low-high.
*
* @param e ChangeEvent Object.
*/
public void stateChanged(ChangeEvent e) {
NumberRangeModel model = (NumberRangeModel) getModel();
Number low = (Number) model.getLowValue();
Number high = (Number) model.getHighValue();
Number min = (Number) model.getMinValue();
Number max = (Number) model.getMaxValue();
DecimalFormat format;
String lowStr = null;
String highStr = null;
if (low instanceof Integer) {
lowStr = Integer.toString((Integer) low);
highStr = Integer.toString((Integer) high);
} else {
if ((max.doubleValue() - min.doubleValue()) < .001) {
format = new DecimalFormat("0.###E0");
} else if ((max.doubleValue() - min.doubleValue()) > 100000) {
format = new DecimalFormat("0.###E0");
} else {
format = new DecimalFormat("###,###.000");
}
lowStr = format.format(low);
highStr = format.format(high);
}
if (isVisible()) {
if (popup == null) {
PopupFactory popupFactory = PopupFactory.getSharedInstance();
JPanel panel = new JPanel();
panel.setBorder(new LineBorder(Color.LIGHT_GRAY, 1));
panel.setPreferredSize(getPreferredSize());
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
popupLow = new JLabel(lowStr);
popupLow.setBorder(new EmptyBorder(6, 2, 6, 2));
popupHigh = new JLabel(highStr);
popupHigh.setBorder(new EmptyBorder(6, 2, 6, 2));
panel.add(popupLow);
panel.add(Box.createHorizontalGlue());
panel.add(popupHigh);
popup = popupFactory.getPopup(this, panel, getLocationOnScreen().x, getLocationOnScreen().y + getPreferredSize().height + 2);
popupDaemon = new PopupDaemon(this, 1000);
popup.show();
} else {
popupLow.setText(lowStr);
popupHigh.setText(highStr);
popupDaemon.restart();
}
}
}
use of javax.swing.border.EmptyBorder in project intellij-community by JetBrains.
the class StudyToolWindow method enterEditingMode.
public void enterEditingMode(VirtualFile taskFile, Project project) {
final EditorFactory factory = EditorFactory.getInstance();
Document document = FileDocumentManager.getInstance().getDocument(taskFile);
if (document == null) {
return;
}
WebBrowserManager.getInstance().setShowBrowserHover(false);
final EditorEx createdEditor = (EditorEx) factory.createEditor(document, project, taskFile, false);
Disposer.register(project, new Disposable() {
public void dispose() {
factory.releaseEditor(createdEditor);
}
});
JComponent editorComponent = createdEditor.getComponent();
editorComponent.setBorder(new EmptyBorder(10, 20, 0, 10));
editorComponent.setBackground(EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground());
EditorSettings editorSettings = createdEditor.getSettings();
editorSettings.setLineMarkerAreaShown(false);
editorSettings.setLineNumbersShown(false);
editorSettings.setFoldingOutlineShown(false);
mySplitPane.setFirstComponent(editorComponent);
mySplitPane.repaint();
StudyTaskManager.getInstance(project).setToolWindowMode(StudyToolWindowMode.EDITING);
}
use of javax.swing.border.EmptyBorder in project intellij-community by JetBrains.
the class StartBrowserPanel method createUIComponents.
private void createUIComponents() {
myBrowserSelector = new BrowserSelector();
myBrowserComboBox = myBrowserSelector.getMainComponent();
if (UIUtil.isUnderAquaLookAndFeel()) {
myBrowserComboBox.setBorder(new EmptyBorder(3, 0, 0, 0));
}
}
Aggregations