本文整理了Java中javax.swing.Box.createRigidArea()
方法的一些代码示例,展示了Box.createRigidArea()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Box.createRigidArea()
方法的具体详情如下:
包路径:javax.swing.Box
类名称:Box
方法名:createRigidArea
暂无
代码示例来源:origin: skylot/jadx
@NotNull
protected JPanel initButtonsPanel() {
progressPane = new ProgressPanel(mainWindow, false);
JButton cancelButton = new JButton(NLS.str("search_dialog.cancel"));
cancelButton.addActionListener(event -> dispose());
JButton openBtn = new JButton(NLS.str("search_dialog.open"));
openBtn.addActionListener(event -> openSelectedItem());
getRootPane().setDefaultButton(openBtn);
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
buttonPane.add(progressPane);
buttonPane.add(Box.createRigidArea(new Dimension(5, 0)));
buttonPane.add(Box.createHorizontalGlue());
buttonPane.add(openBtn);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
buttonPane.add(cancelButton);
return buttonPane;
}
代码示例来源:origin: skylot/jadx
textPane.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));
textPane.setLayout(new BoxLayout(textPane, BoxLayout.PAGE_AXIS));
textPane.add(Box.createRigidArea(new Dimension(0, 10)));
textPane.add(name);
textPane.add(Box.createRigidArea(new Dimension(0, 10)));
textPane.add(desc);
textPane.add(Box.createRigidArea(new Dimension(0, 10)));
textPane.add(version);
textPane.add(Box.createRigidArea(new Dimension(0, 20)));
代码示例来源:origin: skylot/jadx
findLabel.setLabelFor(searchField);
searchPane.add(findLabel);
searchPane.add(Box.createRigidArea(new Dimension(0, 5)));
searchPane.add(searchField);
searchPane.add(Box.createRigidArea(new Dimension(0, 5)));
searchPane.add(box);
searchPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
代码示例来源:origin: skylot/jadx
buttonPane.add(Box.createHorizontalGlue());
buttonPane.add(saveBtn);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
buttonPane.add(cancelButton);
代码示例来源:origin: runelite/runelite
private void renderBonusOptions()
{
if (skillData.getBonuses() != null)
{
for (SkillDataBonus bonus : skillData.getBonuses())
{
JPanel checkboxPanel = buildCheckboxPanel(bonus);
add(checkboxPanel);
add(Box.createRigidArea(new Dimension(0, 5)));
}
}
}
代码示例来源:origin: runelite/runelite
constraints.gridy++;
markerView.add(Box.createRigidArea(new Dimension(0, 10)), constraints);
constraints.gridy++;
代码示例来源:origin: runelite/runelite
actionsContainer.setPreferredSize(new Dimension(0, 30));
actionsContainer.setBorder(new EmptyBorder(5, 5, 5, 10));
actionsContainer.setVisible(false);
layoutPanel.add(Box.createRigidArea(new Dimension(0, 5)));
layoutPanel.add(overallPanel);
layoutPanel.add(logsContainer);
代码示例来源:origin: geotools/geotools
listScroller.setPreferredSize(new Dimension(400, 280));
JPanel listPane = new JPanel();
listPane.setLayout(new BoxLayout(listPane, BoxLayout.PAGE_AXIS));
label.setLabelFor(list);
listPane.add(label);
listPane.add(Box.createRigidArea(new Dimension(0, 5)));
listPane.add(listScroller);
listPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
buttonPane.add(Box.createHorizontalGlue());
buttonPane.add(cancelButton);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
buttonPane.add(setButton);
代码示例来源:origin: apache/pdfbox
panel.add(nextButton);
panel.add(caseSensitive);
panel.add(Box.createRigidArea(new Dimension(5, 0)));
panel.add(crossButton);
代码示例来源:origin: stackoverflow.com
mainPanel.add(Box.createRigidArea(new Dimension(100, 100)), BorderLayout.CENTER);
mainPanel.add(southPanel, BorderLayout.SOUTH);
代码示例来源:origin: dboissier/mongo4idea
public ErrorPanel(final Exception ex) {
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
setBackground(JBColor.RED);
add(new JBLabel("Error during query execution"));
final HoverHyperlinkLabel hoverHyperlinkLabel = new HoverHyperlinkLabel("more detail...");
hoverHyperlinkLabel.addHyperlinkListener(hyperlinkEvent -> {
if (hyperlinkEvent.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
Messages.showErrorDialog(ex.toString(), "Error During Query Execution");
}
});
add(Box.createRigidArea(new Dimension(10, 10)));
add(hoverHyperlinkLabel);
}
}
代码示例来源:origin: ron190/jsql-injection
this.maximumLength.setToolTipText(I18n.valueByKey("BRUTEFORCE_MAX_TOOLTIP"));
this.minimumLength.setPreferredSize(new Dimension(38, (int) this.minimumLength.getPreferredSize().getHeight()));
this.maximumLength.setPreferredSize(new Dimension(38, (int) this.maximumLength.getPreferredSize().getHeight()));
this.minimumLength.setMaximumSize(new Dimension(38, (int) this.minimumLength.getPreferredSize().getHeight()));
this.maximumLength.setMaximumSize(new Dimension(38, (int) this.maximumLength.getPreferredSize().getHeight()));
this.minimumLength.setMinimumSize(new Dimension(38, (int) this.minimumLength.getPreferredSize().getHeight()));
lastLine.add(Box.createRigidArea(new Dimension(5, 0)));
lastLine.add(this.run);
代码示例来源:origin: ron190/jsql-injection
this.lastLine.setPreferredSize(new Dimension(0, 26));
p.add(Box.createRigidArea(new Dimension(5, 0)));
p.add(this.run);
代码示例来源:origin: ron190/jsql-injection
this.lastLine.add(Box.createHorizontalGlue());
this.lastLine.add(this.loader);
this.lastLine.add(Box.createRigidArea(new Dimension(5, 0)));
this.lastLine.add(this.run);
代码示例来源:origin: ron190/jsql-injection
lastLine.add(Box.createRigidArea(new Dimension(5, 0)));
lastLine.add(this.run);
代码示例来源:origin: net.sf.taverna.t2.ui-impl/zaria
/**
* Get the tab name editor
*/
@Override
public List<Component> getToolbarComponents() {
List<Component> components = new ArrayList<Component>();
components.add(Box.createRigidArea(new Dimension(5, 5)));
components.add(tabName);
return components;
}
代码示例来源:origin: com.github.tornaia/aott-desktop-client-core
public CategoryTableHeaderCellRenderer(CategoryColorService categoryColorService) {
this.categoryColorService = categoryColorService;
this.iconJLabel = new JLabel();
this.textJLabel = new JLabel();
this.jPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
jPanel.add(iconJLabel);
jPanel.add(Box.createRigidArea(new Dimension(10, 0)));
jPanel.add(textJLabel);
}
代码示例来源:origin: mucommander/mucommander
/**
* Adds a vertical separation of the given size to this panel.
*/
public void addSpace(int nbPixels) {
add(Box.createRigidArea(new Dimension(nbPixels, 0)));
}
代码示例来源:origin: mucommander/mucommander
/**
* Adds a vertical separation of the given size to this panel.
*/
public void addSpace(int nbVertSpace) {
add(Box.createRigidArea(new Dimension(0, nbVertSpace)));
}
代码示例来源:origin: org.boofcv/boofcv-swing
public void addCenterLabel( String text , JPanel owner ) {
JLabel l = new JLabel(text);
l.setAlignmentX(Component.CENTER_ALIGNMENT);
owner.add(l);
owner.add(Box.createRigidArea(new Dimension(1,8)));
}
内容来源于网络,如有侵权,请联系作者删除!