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

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

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

JComboBox.setMaximumSize介绍

暂无

代码示例

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

protected JComboBox createLogLevelCombo() {
 JComboBox result = new JComboBox();
 Iterator levels = getLogLevels();
 while (levels.hasNext()) {
  result.addItem(levels.next());
 }
 result.setSelectedItem(_leastSevereDisplayedLogLevel);
 result.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {
   JComboBox box = (JComboBox) e.getSource();
   LogLevel level = (LogLevel) box.getSelectedItem();
   setLeastSevereDisplayedLogLevel(level);
  }
 });
 result.setMaximumSize(result.getPreferredSize());
 return result;
}

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

newButton.setAlignmentX(0.5f);
fontCombo.setMaximumSize(fontCombo.getPreferredSize());
fontSizeCombo.setMaximumSize(
  fontSizeCombo.getPreferredSize());

代码示例来源:origin: 4thline/cling

expirationComboBox.setMaximumSize(new Dimension(100, 32));
expirationComboBox.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());
windowList.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());
windowList.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());
windowList.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

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

windowList.setAlignmentX(CENTER_ALIGNMENT);
windowList.setSelectedIndex(selected);
windowList.setMaximumSize(windowList.getPreferredSize());
windowList.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

代码示例来源:origin: chewiebug/GCViewer

private GCViewerGuiToolBar initToolBar(Map<String, Action> actions) {
  GCViewerGuiToolBar toolBar = new GCViewerGuiToolBar();
  toolBar.setFloatable(false);
  
  toolBar.add(actions.get(ActionCommands.OPEN_FILE.toString()));
  toolBar.add(actions.get(ActionCommands.OPEN_SERIES.toString()));
  toolBar.add(actions.get(ActionCommands.OPEN_URL.toString()));
  toolBar.add(actions.get(ActionCommands.EXPORT.toString()));
  toolBar.add(actions.get(ActionCommands.REFRESH.toString()));
  
  JToggleButton watchToggle = new JToggleButton();
  watchToggle.setAction(actions.get(ActionCommands.WATCH.toString()));
  watchToggle.setText("");
  toolBar.addWatchToggleButton(watchToggle);
  
  toolBar.addSeparator();
  
  JComboBox<String> zoomComboBox = new JComboBox<String>(new String[] {"1%", "5%", "10%", "50%", "100%", "200%", "300%", "500%", "1000%", "5000%"});
  zoomComboBox.setSelectedIndex(2);
  zoomComboBox.setAction(actions.get(ActionCommands.ZOOM.toString()));
  zoomComboBox.setEditable(true);
  zoomComboBox.setMaximumSize(zoomComboBox.getPreferredSize());
  toolBar.addZoomComboBox(zoomComboBox);
  
  toolBar.addSeparator();
  
  toolBar.add(actions.get(ActionCommands.ABOUT.toString()));
  
  return toolBar;
}

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

jLabel_AudioMixer.setText("Audio source:");
cbAudioSource.setMaximumSize(new java.awt.Dimension(250, 27));
cbAudioSource.setPreferredSize(new java.awt.Dimension(250, 27));
cbAudioSource.addActionListener(new java.awt.event.ActionListener() {
cbExpertOutput.setMaximumSize(new java.awt.Dimension(250, 27));
cbExpertOutput.setPreferredSize(new java.awt.Dimension(250, 27));
cbExpertOutput.addActionListener(new java.awt.event.ActionListener() {
cbSpeakerOutput.setMaximumSize(new java.awt.Dimension(250, 27));
cbSpeakerOutput.setPreferredSize(new java.awt.Dimension(250, 27));
cbSpeakerOutput.addActionListener(new java.awt.event.ActionListener() {

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

pack.setMinimumSize(new Dimension(50, 25));
pack.setPreferredSize(new Dimension(50, 25));
pack.setMaximumSize(new Dimension(Integer.MAX_VALUE, 25));
setPanel.add(pack);

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

tests = new JComboBox(model.getComboModel());
tests.setMaximumRowCount(30);
tests.setMaximumSize(new Dimension(250, 20));
tests.addActionListener(this);
tests.setRenderer(new ListCellRenderer() {

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

formats.setMinimumSize(new Dimension(50, 25));
formats.setPreferredSize(new Dimension(50, 25));
formats.setMaximumSize(new Dimension(Integer.MAX_VALUE, 25));
setPanel.add(formats);

代码示例来源:origin: pentaho/mondrian

listRenderer.setMaximumSize(stringRenderer.getMaximumSize());
listRenderer.setFont(Font.decode("Dialog"));
listRenderer.setBackground(Color.white);
      "schemaPropertyCellRenderer.table", "Table")
  });
relationList.setMaximumSize(new Dimension(55, 22));
relationList.setPreferredSize(new Dimension(55, 22));
relationList.setMinimumSize(new Dimension(55, 22));

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

cbSortBy.setMaximumSize(new java.awt.Dimension(120, 20));
cbSortBy.setMinimumSize(new java.awt.Dimension(120, 20));
cbSortBy.setName("SortBy"); // NOI18N

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

cbExpansionSet.setMaximumSize(new java.awt.Dimension(250, 25));
cbExpansionSet.setMinimumSize(new java.awt.Dimension(250, 25));
cbExpansionSet.setName("cbExpansionSet"); // NOI18N
tbTypes.add(jSeparator3);
cbSortBy.setMaximumSize(new java.awt.Dimension(120, 20));
cbSortBy.setMinimumSize(new java.awt.Dimension(120, 20));
cbSortBy.setPreferredSize(new java.awt.Dimension(120, 20));

代码示例来源:origin: pentaho/mondrian

listEditor.setMaximumSize(stringEditor.getMaximumSize());
listEditor.setFont(Font.decode("Dialog"));
listEditor.setBackground(Color.white);

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

public static JComboBox getFileFormatSelect(){
  JComboBox fileType = new JComboBox();
    fileType = new JComboBox(new String[] {UserConfiguration.PDB_FORMAT,UserConfiguration.MMCIF_FORMAT});
    fileType.setSelectedIndex(0);
    fileType.setMaximumSize(new Dimension(10,50));
  return fileType;
}
public PDBUploadPanel(){

代码示例来源:origin: org.boofcv/visualize

public SelectAlgorithmPanel() {
  super(new BorderLayout());
  toolbar = new JToolBar();
  algBox = new JComboBox();
  algBox.setMaximumSize(algBox.getPreferredSize());
  toolbar.add(algBox);
  algBox.addActionListener(this);
  toolbar.add(Box.createHorizontalGlue());
  add(toolbar, BorderLayout.PAGE_START);
}

代码示例来源:origin: org.boofcv/boofcv-swing

public SelectAlgorithmPanel() {
  super(new BorderLayout());
  toolbar = new JToolBar();
  algBox = new JComboBox();
  algBox.setMaximumSize(algBox.getPreferredSize());
  toolbar.add(algBox);
  algBox.addActionListener(this);
  toolbar.add(Box.createHorizontalGlue());
  add(toolbar, BorderLayout.PAGE_START);
}

代码示例来源:origin: org.boofcv/demonstrations

public VisualizeScorePanel( Listener listener ) {
  setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
  setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
  scoreTypes.addActionListener(this);
  scoreTypes.setMaximumSize(scoreTypes.getPreferredSize());
  this.listener = listener;
  addLabeled(scoreTypes, "Score: ", this);
}

相关文章

JComboBox类方法