javax.swing.JComboBox.setAlignmentX()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(9.2k)|赞(0)|评价(0)|浏览(191)

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

JComboBox.setAlignmentX介绍

暂无

代码示例

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());

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

inputDensityChoice.setAlignmentX(Component.LEFT_ALIGNMENT);
inputDensityChoice.setAlignmentY(Component.BOTTOM_ALIGNMENT);
inputDensityChoice.setPreferredSize(new Dimension(1, 10));

代码示例来源:origin: magefree/mage

pack.setModel(new DefaultComboBoxModel(ExpansionRepository.instance.getWithBoostersSortedByReleaseDate()));
pack.addActionListener(evt -> packActionPerformed(evt));
pack.setAlignmentX(0.0F);
pack.setMinimumSize(new Dimension(50, 25));
pack.setPreferredSize(new Dimension(50, 25));

代码示例来源:origin: magefree/mage

cbSets.setAlignmentX(0.0F);
setPanel.add(cbSets);
cbDeckSize = new JComboBox<>(new String[]{"40", "60"});
cbDeckSize.setSelectedIndex(0);
cbDeckSize.setAlignmentX(Component.LEFT_ALIGNMENT);
mainPanel.add(cbDeckSize, c);

代码示例来源:origin: magefree/mage

formats.setAlignmentX(0.0F);
formats.setMinimumSize(new Dimension(50, 25));
formats.setPreferredSize(new Dimension(50, 25));

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

private void addConvolveMethodSelector(Convolve filter, Box leftVerticalBox) {
  JLabel cmLabel = new JLabel("Convolution method:", JLabel.LEFT);
  cmLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
  leftVerticalBox.add(cmLabel);
  EnumComboBoxModel<ConvolveMethod> convolveMethodModel
      = filter.getConvolveMethodModel();
  JComboBox<ConvolveMethod> convolveMethodCB = new JComboBox<>(convolveMethodModel);
  convolveMethodCB.setAlignmentX(Component.LEFT_ALIGNMENT);
  leftVerticalBox.add(convolveMethodCB);
  convolveMethodCB.addActionListener(this);
}

代码示例来源:origin: org.openmuc/openiec61850

@Override
protected JComponent init() {
  validity.setAlignmentX(Component.LEFT_ALIGNMENT);
  JPanel valuePanel = new JPanel();
  valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS));
  valuePanel.setAlignmentX(Component.LEFT_ALIGNMENT);
  valuePanel.add(validity);
  valuePanel.add(badReference);
  valuePanel.add(failure);
  valuePanel.add(inaccurate);
  valuePanel.add(inconsistent);
  valuePanel.add(oldData);
  valuePanel.add(operatorBlocked);
  valuePanel.add(oscillatory);
  valuePanel.add(outOfRange);
  valuePanel.add(overflow);
  valuePanel.add(substituded);
  valuePanel.add(test);
  return valuePanel;
}

代码示例来源:origin: openmuc/openiec61850

@Override
protected JComponent init() {
  validity.setAlignmentX(Component.LEFT_ALIGNMENT);
  JPanel valuePanel = new JPanel();
  valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS));
  valuePanel.setAlignmentX(Component.LEFT_ALIGNMENT);
  valuePanel.add(validity);
  valuePanel.add(badReference);
  valuePanel.add(failure);
  valuePanel.add(inaccurate);
  valuePanel.add(inconsistent);
  valuePanel.add(oldData);
  valuePanel.add(operatorBlocked);
  valuePanel.add(oscillatory);
  valuePanel.add(outOfRange);
  valuePanel.add(overflow);
  valuePanel.add(substituded);
  valuePanel.add(test);
  return valuePanel;
}

代码示例来源:origin: pentaho/pentaho-reporting

protected JComboBox createZoomSelector( final PreviewPane pane ) {
 final JComboBox zoomSelect = new JComboBox( pane.getZoomModel() );
 zoomSelect.addActionListener( new ZoomSelectAction( pane.getZoomModel(), pane ) );
 zoomSelect.setAlignmentX( Component.RIGHT_ALIGNMENT );
 return zoomSelect;
}

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

private JComboBox createFormatChooser() {
  final List<PatternFormat> formats = FormatController.getController().getAllFormats();
  Vector<PatternFormat> items = new Vector<PatternFormat>(formats);
  for(int i = items.size()-1; i >= 0; i--){
    if(! items.get(i).canFormat(NodeAttributeTableModel.class))
      items.remove(i);
  }
  final JComboBox formatChooser = new JComboBoxWithBorder(items);
  formatChooser.setEditable(true);
  formatChooser.setSelectedItem(null);
  final String NODE_FORMAT = "OptionPanel.nodeformat"; // duplicated from StyleEditorPanel
  formatChooser.setToolTipText(TextUtils.getRawText(NODE_FORMAT + ".tooltip"));
  formatChooser.setAlignmentX(Component.LEFT_ALIGNMENT);
  formatChooser.setBorder(new TitledBorder(TextUtils.getText("value_format")));
  return formatChooser;
}

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

protected File chosenTemplateFile() {
  final ResourceController resourceController = ResourceController.getResourceController();
  boolean skipTemplateSelection = resourceController.getBooleanProperty("skip_template_selection");
  if (skipTemplateSelection)
    return defaultTemplateFile();
  final String standardTemplatePath = resourceController.getProperty(STANDARD_TEMPLATE);
  final TreeSet<String> availableMapTemplates = collectAvailableMapTemplates();
  availableMapTemplates.add(standardTemplatePath);
  final Box verticalBox = Box.createVerticalBox();
  final JComboBox<String> templateComboBox = new JComboBox<>(new Vector<>(availableMapTemplates));
  templateComboBox.setSelectedItem(standardTemplatePath);
  templateComboBox.setAlignmentX(0f);
  verticalBox.add(templateComboBox);
  final String checkBoxText = TextUtils.getRawText("OptionalDontShowMeAgainDialog.rememberMyDescision");
  final JCheckBox mDontShowAgainBox = new JCheckBox();
  mDontShowAgainBox.setAlignmentX(0f);
  LabelAndMnemonicSetter.setLabelAndMnemonic(mDontShowAgainBox, checkBoxText);
  verticalBox.add(mDontShowAgainBox);
  JOptionPane.showMessageDialog(UITools.getCurrentFrame(), verticalBox, TextUtils.getText("select_template"),
    JOptionPane.PLAIN_MESSAGE);
  final String selectedTemplate = (String) templateComboBox.getSelectedItem();
  if (mDontShowAgainBox.isSelected()) {
    resourceController.setProperty("skip_template_selection", true);
    resourceController.setProperty(STANDARD_TEMPLATE, selectedTemplate);
  }
  return templateFile(selectedTemplate);
}

代码示例来源:origin: chungkwong/MathOCR

public LogicalInspector(){
  del=addButton("DELETE");
  modify=addButton("MODIFY");
  bar.addSeparator();
  type.setAlignmentX(0);
  bar.add(type);
  area.setAlignmentX(0);
  area.setLineWrap(true);
  bar.add(area);
  noStart.setAlignmentX(0);
  bar.add(noStart);
  noEnd.setAlignmentX(0);
  bar.add(noEnd);
  additional.setAlignmentX(0);
  JLabel lab=new JLabel(ENVIRONMENT.getTranslation("ADDITIONAL_INFO"));
  lab.setAlignmentX(0);
  bar.add(lab);
  additional.setAlignmentX(0);
  bar.add(additional);
  bar.addSeparator();
  next=addButton("NEXT");
  add(new JScrollPane(bar),BorderLayout.EAST);
}
private final JButton addButton(String com){

代码示例来源:origin: eu.mihosoft.vrl/vrl

public MessageTypeSelectionType() {
    VBoxLayout layout = new VBoxLayout(this,VBoxLayout.PAGE_AXIS);
    setLayout(layout);

    nameLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
    getSelectionView().setAlignmentX(Component.LEFT_ALIGNMENT);

    add(nameLabel);
    add(getSelectionView());

    setValueName("MessageType:");

    ArrayList<String> list = new ArrayList<String>();

    list.add("Info");
    list.add("Warning");
    list.add("Error");

    setValue(new MessageTypeSelection(list));
  }
}

代码示例来源:origin: eu.mihosoft.vrl/vrl

public ResolutionSelectionType() {
  VBoxLayout layout = new VBoxLayout(this,VBoxLayout.PAGE_AXIS);
  setLayout(layout);
  nameLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
  getSelectionView().setAlignmentX(Component.LEFT_ALIGNMENT);
  add(nameLabel);
  add(getSelectionView());
  setValueName("Resolution:");
  ArrayList<Resolution> list = new ArrayList<Resolution>();
  list.add(new Resolution(80, 60));
  list.add(new Resolution(160, 120));
  list.add(new Resolution(320, 240));
  list.add(new Resolution(640, 480));
  list.add(new Resolution(800, 600));
  list.add(new Resolution(1024, 768));
  list.add(new Resolution(2048, 1536));
  list.add(new Resolution(4096, 3072));
  setValue(new ResolutionSelection(list));
}

代码示例来源:origin: eu.mihosoft.vrl/vrl

public IntegerSelectionInputType() {
  VBoxLayout layout = new VBoxLayout(this, VBoxLayout.PAGE_AXIS);
  setLayout(layout);
  nameLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
  getSelectionView().setAlignmentX(Component.LEFT_ALIGNMENT);
  add(nameLabel);
  add(getSelectionView());
  setValueName("Integer:");
  setHideConnector(true);
}

代码示例来源:origin: eu.mihosoft.vrl/vrl

public StringSelectionInputType() {
  VBoxLayout layout = new VBoxLayout(this, VBoxLayout.PAGE_AXIS);
  setLayout(layout);
  nameLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
  getSelectionView().setAlignmentX(Component.LEFT_ALIGNMENT);
  add(nameLabel);
  add(getSelectionView());
  setValueName("String:");
  setHideConnector(true);
}

代码示例来源:origin: chungkwong/MathOCR

classify=addButton("REGION_MANUAL");
type=new JComboBox<String>(new String[]{ENVIRONMENT.getTranslation("TEXT"),ENVIRONMENT.getTranslation("IMAGE"),ENVIRONMENT.getTranslation("TABLE")});
type.setAlignmentX(0);
type.setMaximumSize(type.getPreferredSize());
bar.add(type);

相关文章

JComboBox类方法