javax.swing.Box.createVerticalGlue()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(288)

本文整理了Java中javax.swing.Box.createVerticalGlue()方法的一些代码示例,展示了Box.createVerticalGlue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Box.createVerticalGlue()方法的具体详情如下:
包路径:javax.swing.Box
类名称:Box
方法名:createVerticalGlue

Box.createVerticalGlue介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

public void end() {
    add(Box.createVerticalGlue());
  }
}

代码示例来源:origin: marytts/marytts

private void updateLanguagesTable() {
  pLanguages.removeAll();
  for (String dName : languages.keySet()) {
    ComponentDescription desc = languages.get(dName);
    pLanguages.add(new ShortDescriptionPanel(desc, this));
  }
  pLanguages.add(Box.createVerticalGlue());
  if (languages.size() > 0) {
    pLanguages.getComponent(0).requestFocusInWindow();
    updateVoices(languages.get(languages.keySet().iterator().next()), true);
  }
}

代码示例来源:origin: marytts/marytts

private void updateLanguagesTable() {
  pLanguages.removeAll();
  for (String dName : languages.keySet()) {
    ComponentDescription desc = languages.get(dName);
    pLanguages.add(new ShortDescriptionPanel(desc, this));
  }
  pLanguages.add(Box.createVerticalGlue());
  if (languages.size() > 0) {
    pLanguages.getComponent(0).requestFocusInWindow();
    updateVoices(languages.get(languages.keySet().iterator().next()), true);
  }
}

代码示例来源:origin: apache/ignite

/**
 * @return Panel with controls to display license.
 */
private JPanel createLicensePanel() {
  JPanel licPanel = new JPanel(new GridBagLayout());
  licPanel.add(Box.createVerticalGlue(), gbcStrut());
  addAboutItem(licPanel, "Version:", ver);
  addAboutItem(licPanel, "Release Date:", new SimpleDateFormat("dd MMM yyyy").format(release));
  addAboutItem(licPanel, "Copyright:", copyright);
  return licPanel;
}

代码示例来源:origin: marytts/marytts

public void updateVoices(LanguageComponentDescription newLanguage, boolean forceUpdate) {
  if (currentLanguage != null && currentLanguage.equals(newLanguage) && !forceUpdate) {
    return;
  }
  currentLanguage = newLanguage;
  List<VoiceComponentDescription> lVoices = getVoicesForLanguage(currentLanguage);
  pVoices.removeAll();
  for (ComponentDescription desc : lVoices) {
    pVoices.add(new ShortDescriptionPanel(desc, null));
  }
  pVoices.add(Box.createVerticalGlue());
  pVoices.repaint();
  this.pack();
}

代码示例来源:origin: marytts/marytts

public void updateVoices(LanguageComponentDescription newLanguage, boolean forceUpdate) {
  if (currentLanguage != null && currentLanguage.equals(newLanguage) && !forceUpdate) {
    return;
  }
  currentLanguage = newLanguage;
  List<VoiceComponentDescription> lVoices = getVoicesForLanguage(currentLanguage);
  pVoices.removeAll();
  for (ComponentDescription desc : lVoices) {
    pVoices.add(new ShortDescriptionPanel(desc, null));
  }
  pVoices.add(Box.createVerticalGlue());
  pVoices.repaint();
  this.pack();
}

代码示例来源:origin: stackoverflow.com

f.add(new GroupPanel(1));
f.add(new GroupPanel(2));
f.add(Box.createVerticalGlue());
f.pack();
f.setLocationRelativeTo(null);

代码示例来源:origin: marytts/marytts

zoomPanel.setLayout(new BoxLayout(zoomPanel, BoxLayout.Y_AXIS));
main.getContentPane().add(zoomPanel, BorderLayout.WEST);
zoomPanel.add(Box.createVerticalGlue());
JButton zoomIn = new JButton("Zoom In");
zoomIn.setAlignmentX(CENTER_ALIGNMENT);
  JPanel controls = getControls();
  if (controls != null) {
    zoomPanel.add(Box.createVerticalGlue());
    controls.setAlignmentX(CENTER_ALIGNMENT);
    zoomPanel.add(controls);
zoomPanel.add(Box.createVerticalGlue());

代码示例来源:origin: marytts/marytts

zoomPanel.setLayout(new BoxLayout(zoomPanel, BoxLayout.Y_AXIS));
main.getContentPane().add(zoomPanel, BorderLayout.WEST);
zoomPanel.add(Box.createVerticalGlue());
JButton zoomIn = new JButton("Zoom In");
zoomIn.setAlignmentX(CENTER_ALIGNMENT);
  JPanel controls = getControls();
  if (controls != null) {
    zoomPanel.add(Box.createVerticalGlue());
    controls.setAlignmentX(CENTER_ALIGNMENT);
    zoomPanel.add(controls);
zoomPanel.add(Box.createVerticalGlue());

代码示例来源:origin: redwarp/9-Patch-Resizer

optionPanel.add(Box.createVerticalGlue());
optionPanel.add(Box.createVerticalGlue());
 optionPanel.add(box);
optionPanel.add(Box.createVerticalGlue());
optionPanel.add(Box.createVerticalGlue());
saveButton.setToolTipText(Localization.get("save_tooltip"));
optionPanel.add(saveButton);
optionPanel.add(Box.createVerticalGlue());

代码示例来源:origin: apache/pdfbox

private void initUI()
{
  JPanel panel = new JPanel();
  panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
  zoomMenu = ZoomMenu.getInstance();
  zoomMenu.changeZoomSelection(zoomMenu.getImageZoomScale());
  label = new JLabel();
  label.setBorder(new LineBorder(Color.BLACK));
  label.setAlignmentX(Component.CENTER_ALIGNMENT);
  addImage(zoomImage(image, zoomMenu.getImageZoomScale(), RotationMenu.getRotationDegrees()));
  panel.add(Box.createVerticalGlue());
  panel.add(label);
  panel.add(Box.createVerticalGlue());
  scrollPane = new JScrollPane();
  scrollPane.setPreferredSize(new Dimension(300, 400));
  scrollPane.addAncestorListener(this);
  scrollPane.setViewportView(panel);
}

代码示例来源:origin: stackoverflow.com

centerPanel.add(secondCombo);
centerPanel.add(thirdCombo);
centerPanel.add(Box.createVerticalGlue());  // first attempt; does NOT

代码示例来源:origin: nodebox/nodebox

mainPanel.add(rangePanel);
mainPanel.add(Box.createVerticalGlue());

代码示例来源:origin: nodebox/nodebox

mainPanel.add(formatPanel);
mainPanel.add(Box.createVerticalGlue());

代码示例来源:origin: nodebox/nodebox

quotesPanel.setVisible(false);
mainPanel.add(Box.createVerticalGlue());

代码示例来源:origin: nodebox/nodebox

forceSize(iconLabel, 64, 64);
iconPanel.add(iconLabel);
iconPanel.add(Box.createVerticalGlue());
contentPanel.add(iconPanel, BorderLayout.WEST);

代码示例来源:origin: nodebox/nodebox

forceSize(iconLabel, 64, 64);
iconPanel.add(iconLabel);
iconPanel.add(Box.createVerticalGlue());
content.add(iconPanel, BorderLayout.WEST);

代码示例来源:origin: stackoverflow.com

add(label1);
if(withGlue){
  add(Box.createVerticalGlue());

代码示例来源:origin: stackoverflow.com

Box box = new Box(BoxLayout.Y_AXIS);
box.setAlignmentX(JComponent.CENTER_ALIGNMENT);
box.add(Box.createVerticalGlue());
box.add(new CustomComponents12());
box.add(Box.createVerticalGlue());
add(box);
pack();

代码示例来源:origin: jshiell/checkstyle-idea

GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, COMPONENT_INSETS, 0, 0));
add(Box.createVerticalGlue(), new GridBagConstraints(0, 9, 3, 1, 0.0, 1.0,
    GridBagConstraints.WEST, GridBagConstraints.VERTICAL, COMPONENT_INSETS, 0, 0));

相关文章