当前位置: 首页>>代码示例>>Java>>正文


Java MetalIconFactory.getFileChooserNewFolderIcon方法代码示例

本文整理汇总了Java中javax.swing.plaf.metal.MetalIconFactory.getFileChooserNewFolderIcon方法的典型用法代码示例。如果您正苦于以下问题:Java MetalIconFactory.getFileChooserNewFolderIcon方法的具体用法?Java MetalIconFactory.getFileChooserNewFolderIcon怎么用?Java MetalIconFactory.getFileChooserNewFolderIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.plaf.metal.MetalIconFactory的用法示例。


在下文中一共展示了MetalIconFactory.getFileChooserNewFolderIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPanel6

import javax.swing.plaf.metal.MetalIconFactory; //导入方法依赖的package包/类
/**
 * This panel contains combo boxes with a custom renderer.
 *
 * @return A panel.
 */
private JPanel createPanel6()
{
  JPanel panel = new JPanel(new BorderLayout());
  this.comboState6 = new JCheckBox("Enabled", true);
  this.comboState6.setActionCommand("COMBO_STATE6");
  this.comboState6.addActionListener(this);
  panel.add(this.comboState6, BorderLayout.EAST);

  JPanel controlPanel = new JPanel();
  controlPanel.setBorder(BorderFactory.createTitledBorder("Custom Renderer: "));
  this.combo11 = new JComboBox(new Object[] {
          MetalIconFactory.getFileChooserHomeFolderIcon(),
          MetalIconFactory.getFileChooserNewFolderIcon()});
  this.combo11.setPreferredSize(new Dimension(100, 30));
  this.combo11.setRenderer(new CustomCellRenderer());
  this.combo12 = new JComboBox(new Object[] {
          MetalIconFactory.getFileChooserHomeFolderIcon(),
          MetalIconFactory.getFileChooserNewFolderIcon()});
  this.combo12.setPreferredSize(new Dimension(100, 30));
  this.combo12.setRenderer(new CustomCellRenderer());
  this.combo12.setEditable(true);

  controlPanel.add(combo11);
  controlPanel.add(combo12);

  panel.add(controlPanel);

  return panel;
}
 
开发者ID:vilie,项目名称:javify,代码行数:35,代码来源:ComboBoxDemo.java

示例2: createPanel6

import javax.swing.plaf.metal.MetalIconFactory; //导入方法依赖的package包/类
/**
 * This panel contains combo boxes with a custom renderer.
 * 
 * @return A panel.
 */
private JPanel createPanel6() 
{
  JPanel panel = new JPanel(new BorderLayout());
  this.comboState6 = new JCheckBox("Enabled", true);
  this.comboState6.setActionCommand("COMBO_STATE6");
  this.comboState6.addActionListener(this);
  panel.add(this.comboState6, BorderLayout.EAST);
      
  JPanel controlPanel = new JPanel();
  controlPanel.setBorder(BorderFactory.createTitledBorder("Custom Renderer: "));
  this.combo11 = new JComboBox(new Object[] {
          MetalIconFactory.getFileChooserHomeFolderIcon(),
          MetalIconFactory.getFileChooserNewFolderIcon()});
  this.combo11.setPreferredSize(new Dimension(100, 30));
  this.combo11.setRenderer(new CustomCellRenderer());
  this.combo12 = new JComboBox(new Object[] {
          MetalIconFactory.getFileChooserHomeFolderIcon(),
          MetalIconFactory.getFileChooserNewFolderIcon()});
  this.combo12.setPreferredSize(new Dimension(100, 30));
  this.combo12.setRenderer(new CustomCellRenderer());
  this.combo12.setEditable(true);
      
  controlPanel.add(combo11);
  controlPanel.add(combo12);
      
  panel.add(controlPanel);
   
  return panel;
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:35,代码来源:ComboBoxDemo.java


注:本文中的javax.swing.plaf.metal.MetalIconFactory.getFileChooserNewFolderIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。