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

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

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

Box.setAlignmentY介绍

暂无

代码示例

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * Compose and layout all the subcomponents.
 */
protected void build() {
  Box lBox = new Box(BoxLayout.LINE_AXIS); 
  lBox.add(searchLabel);
  lBox.add(new JLabel(":"));
  lBox.add(new JLabel("  "));
  lBox.setAlignmentY(Component.TOP_ALIGNMENT);
  Box rBox = new Box(BoxLayout.PAGE_AXIS); 
  rBox.add(searchField);
  rBox.add(matchCheck);
  rBox.add(wrapCheck);
  rBox.add(backCheck);
  rBox.setAlignmentY(Component.TOP_ALIGNMENT);
  setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
  
  add(lBox);
  add(rBox);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * Compose and layout all the subcomponents.
 */
protected void build() {
  Box lBox = new Box(BoxLayout.LINE_AXIS); 
  lBox.add(searchLabel);
  lBox.add(new JLabel(":"));
  lBox.add(new JLabel("  "));
  lBox.setAlignmentY(Component.TOP_ALIGNMENT);
  Box rBox = new Box(BoxLayout.PAGE_AXIS); 
  rBox.add(searchField);
  rBox.add(matchCheck);
  rBox.add(wrapCheck);
  rBox.add(backCheck);
  rBox.setAlignmentY(Component.TOP_ALIGNMENT);
  setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
  
  add(lBox);
  add(rBox);
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Compose and layout all the subcomponents.
 */
protected void build() {
  Box lBox = new Box(BoxLayout.LINE_AXIS); 
  lBox.add(searchLabel);
  lBox.add(new JLabel(":"));
  lBox.add(new JLabel("  "));
  lBox.setAlignmentY(Component.TOP_ALIGNMENT);
  Box rBox = new Box(BoxLayout.PAGE_AXIS); 
  rBox.add(searchField);
  rBox.add(matchCheck);
  rBox.add(wrapCheck);
  rBox.add(backCheck);
  rBox.setAlignmentY(Component.TOP_ALIGNMENT);
  setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
  
  add(lBox);
  add(rBox);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * Compose and layout all the subcomponents.
 */
protected void build() {
  Box lBox = new Box(BoxLayout.LINE_AXIS); 
  lBox.add(searchLabel);
  lBox.add(new JLabel(":"));
  lBox.add(new JLabel("  "));
  lBox.setAlignmentY(Component.TOP_ALIGNMENT);
  Box rBox = new Box(BoxLayout.PAGE_AXIS); 
  rBox.add(searchField);
  rBox.add(matchCheck);
  rBox.add(wrapCheck);
  rBox.add(backCheck);
  rBox.setAlignmentY(Component.TOP_ALIGNMENT);
  setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
  
  add(lBox);
  add(rBox);
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * Compose and layout all the subcomponents.
 */
protected void build() {
  Box lBox = new Box(BoxLayout.LINE_AXIS); 
  lBox.add(searchLabel);
  lBox.add(new JLabel(":"));
  lBox.add(new JLabel("  "));
  lBox.setAlignmentY(Component.TOP_ALIGNMENT);
  Box rBox = new Box(BoxLayout.PAGE_AXIS); 
  rBox.add(searchField);
  rBox.add(matchCheck);
  rBox.add(wrapCheck);
  rBox.add(backCheck);
  rBox.setAlignmentY(Component.TOP_ALIGNMENT);
  setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
  
  add(lBox);
  add(rBox);
}

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

horizontalBox_4.setAlignmentY(Component.BOTTOM_ALIGNMENT);
GridBagConstraints gbc_horizontalBox_4 = new GridBagConstraints();
gbc_horizontalBox_4.anchor = GridBagConstraints.NORTHWEST;

代码示例来源:origin: lbalazscs/Pixelitor

private void initPresetBox() {
  presetsBox = Box.createVerticalBox();
  presetsBox.setBorder(createTitledBorder("Presets"));
  if (size == 3) {
    init3x3Presets();
  } else if (size == 5) {
    init5x5Presets();
  } else {
    throw new IllegalStateException("size = " + size);
  }
  presetsBox.add(Box.createVerticalStrut(20));
  JButton randomizeButton = new JButton("Randomize");
  randomizeButton.addActionListener(e -> {
    setValues(Convolve.getRandomKernelMatrix(size));
    actionPerformed(e);
  });
  presetsBox.add(randomizeButton);
  JButton doNothingButton = new JButton("Do Nothing");
  doNothingButton.addActionListener(e -> {
    reset(size);
    actionPerformed(e);
  });
  presetsBox.add(doNothingButton);
  presetsBox.setMaximumSize(presetsBox.getPreferredSize());
  presetsBox.setAlignmentY(Component.TOP_ALIGNMENT);
  add(presetsBox);
}

代码示例来源:origin: lbalazscs/Pixelitor

private void initLeftVerticalBox(Convolve filter) {
  Box box = Box.createVerticalBox();
  addTextFieldsPanel(box);
  addNormalizeButton(box);
  addTryButton(box);
  box.add(Box.createVerticalStrut(20));
  addConvolveMethodSelector(filter, box);
  box.setMaximumSize(box.getPreferredSize());
  box.setAlignmentY(Component.TOP_ALIGNMENT);
  add(box);
}

相关文章