javax.swing.JTabbedPane.setMnemonicAt()方法的使用及代码示例

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

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

JTabbedPane.setMnemonicAt介绍

暂无

代码示例

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

tabbed.addTab("Abstract Syntax Tree / XPath / Symbol Table", resultsSplitPane);
tabbed.addTab("Data Flow Analysis", dfaPanel);
tabbed.setMnemonicAt(0, KeyEvent.VK_A);
tabbed.setMnemonicAt(1, KeyEvent.VK_D);

代码示例来源:origin: RS485/LogisticsPipes

private LogWindow() {
  super(new GridLayout(1, 1));
  JTabbedPane tabbedPane = new JTabbedPane();
  logArea = new JTextPane();
  logPane = new JScrollPane(logArea);
  tabbedPane.addTab("Console", null, logPane, "");
  tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
  baseNode = new DefaultMutableTreeNode("State Information");
  tree = new JTree(baseNode);
  // tree.addTreeExpansionListener(this);
  // tree.addMouseListener(this);
  treeView = new JScrollPane(tree);
  tabbedPane.addTab("Status List", null, treeView, "");
  tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
  add(tabbedPane);
  createAndShowGUI();
}

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

public MainPage() {
 getContentPane().setLayout(null);
 final JTabbedPane tabbedPane = new JTabbedPane();
 final JPanel panel1 = new JPanel();
 final JPanel panel2 = new JPanel();
 panel1.setLayout(null);
 panel2.setLayout(null);
 tabbedPane.add("aaa", panel1);
 panel1.setBackground(Color.CYAN);
 tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
 tabbedPane.add("bbbb", panel2);
 panel2.setBackground(Color.CYAN);
 tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
 Dimension sc = Toolkit.getDefaultToolkit().getScreenSize();
 int wid = sc.width/2;``
 int hig = sc.height/2;
 tabbedPane.setSize(wid, hig);
 add(tabbedPane);

代码示例来源:origin: org.apache.uima/uimaj-tools

if (this.typeRadioButtonScrollPane != null) {
 this.tabbedChoicePane.addTab("Annotation Types", this.typeRadioButtonScrollPane);
 this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
 this.tabbedChoicePane.setMnemonicAt(1, KeyEvent.VK_2);
 this.tabbedChoicePane.setMnemonicAt(2, KeyEvent.VK_3);

代码示例来源:origin: edu.utah.bmi.nlp/nlp-core

if (this.typeRadioButtonScrollPane != null) {
  this.tabbedChoicePane.addTab("Annotation Types", this.typeRadioButtonScrollPane);
  this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
  this.tabbedChoicePane.setMnemonicAt(1, KeyEvent.VK_2);
  this.tabbedChoicePane.setMnemonicAt(2, KeyEvent.VK_3);

代码示例来源:origin: com.quinsoft.zeidon/object-browser

/**
 *
 */
public MainPanel( BrowserEnvironment env )
{
  super( new BorderLayout() );
  this.env = env;
  OiDisplayPanel oiDisplay = env.createOiDisplay( this );
  env.createAttributePanel();
  leftTabbedPane = new JTabbedPane();
  leftTabbedPane.addTab( "Tasks/Views", new ViewChooser( env ) );
  leftTabbedPane.addTab( "Attributes", env.getAttributePanel() );
  leftTabbedPane.addTab( "Twins", new TwinInstancesPanel( this.env ) );
  leftTabbedPane.addTab( "Entity List", new EntityListPanel( this.env ) );
  leftTabbedPane.setMnemonicAt(0, KeyEvent.VK_V); // Alt-V
  leftTabbedPane.setMnemonicAt(1, KeyEvent.VK_A); // Alt-A
  leftTabbedPane.setMnemonicAt(2, KeyEvent.VK_W); // Alt-W
  leftTabbedPane.setMnemonicAt(3, KeyEvent.VK_E); // Alt-E
  JSplitPane splitPane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, leftTabbedPane, oiDisplay );
  add( splitPane, BorderLayout.CENTER );
}

代码示例来源:origin: xyz.cofe/gui.swing

@Override
public void setMnemonicAt(int tabIndex, int mnemonic) {
  Component cmpt = this.getTabComponentAt(tabIndex);
  if( cmpt instanceof TabQuery )((TabQuery)cmpt).setTabMnemonic(mnemonic);
  super.setMnemonicAt(tabIndex, mnemonic);
}

代码示例来源:origin: edu.utah.bmi.nlp/nlp-core

case MODE_ANNOTATIONS:
  this.tabbedChoicePane.addTab("Annotation Types", this.typeCheckBoxScrollPane);
  this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
  break;
case MODE_ENTITIES:
  this.tabbedChoicePane.addTab("Entities", this.entityCheckBoxScrollPane);
  this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
  break;
case MODE_FEATURES:
  this.tabbedChoicePane.addTab("Annotation Types", this.typeRadioButtonScrollPane);
  this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
  this.tabbedChoicePane.addTab("Features", this.featureRadioButtonScrollPane);
  this.tabbedChoicePane.setMnemonicAt(1, KeyEvent.VK_2);
  this.tabbedChoicePane.addTab("Feature Values", this.featureValueCheckBoxScrollPane);
  this.tabbedChoicePane.setMnemonicAt(2, KeyEvent.VK_3);
  break;
default:

代码示例来源:origin: org.apache.uima/uimaj-tools

case MODE_ANNOTATIONS:
 this.tabbedChoicePane.addTab("Annotation Types", this.typeCheckBoxScrollPane);
 this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
 break;
case MODE_ENTITIES:
 this.tabbedChoicePane.addTab("Entities", this.entityCheckBoxScrollPane);
 this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
 break;
case MODE_FEATURES:
 this.tabbedChoicePane.addTab("Annotation Types", this.typeRadioButtonScrollPane);
 this.tabbedChoicePane.setMnemonicAt(0, KeyEvent.VK_1);
 this.tabbedChoicePane.addTab("Features", this.featureRadioButtonScrollPane);
 this.tabbedChoicePane.setMnemonicAt(1, KeyEvent.VK_2);
 this.tabbedChoicePane.addTab("Feature Values", this.featureValueCheckBoxScrollPane);
 this.tabbedChoicePane.setMnemonicAt(2, KeyEvent.VK_3);
 break;
default:

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

tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
tabbedPane.setMnemonicAt(2, KeyEvent.VK_3);
tabbedPane.setMnemonicAt(3, KeyEvent.VK_4);

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing

@Override
  public void propertyChange(PropertyChangeEvent e) {
    String name = e.getPropertyName();
    if (name.equals(TabInfo.TITLE_PROPERTY)) {
      tabs.setTitleAt(tabIndex, (String) e.getNewValue());
    } else if (name.equals(TabInfo.TOOL_TIP_TEXT_PROPERTY)) {
      tabs.setToolTipTextAt(tabIndex, (String) e.getNewValue());
    } else if (name.equals(TabInfo.FOREGROUND_PROPERTY)) {
      tabs.setForegroundAt(tabIndex, (Color) e.getNewValue());
    } else if (name.equals(TabInfo.BACKGROUND_PROPERTY)) {
      tabs.setBackgroundAt(tabIndex, (Color) e.getNewValue());
    } else if (name.equals(TabInfo.MNEMONIC_PROPERTY)) {
      tabs.setMnemonicAt(tabIndex, (Integer) e.getNewValue());
    } else if (name.equals(TabInfo.DISPLAYED_MNEMONIC_INDEX_PROPERTY)) {
      tabs.setDisplayedMnemonicIndexAt(tabIndex, (Integer) e.getNewValue());
    } else if (name.equals(TabInfo.ICON_PROPERTY)) {
      tabs.setIconAt(tabIndex, (Icon) e.getNewValue());
    } else if (name.equals(TabInfo.DISABLED_ICON_PROPERTY)) {
      tabs.setDisabledIconAt(tabIndex, (Icon) e.getNewValue());
    }
  }
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime

@Override
  public void propertyChange(PropertyChangeEvent e) {
    String name = e.getPropertyName();
    if (name.equals(TabInfo.TITLE_PROPERTY)) {
      tabs.setTitleAt(tabIndex, (String) e.getNewValue());
    } else if (name.equals(TabInfo.TOOL_TIP_TEXT_PROPERTY)) {
      tabs.setToolTipTextAt(tabIndex, (String) e.getNewValue());
    } else if (name.equals(TabInfo.FOREGROUND_PROPERTY)) {
      tabs.setForegroundAt(tabIndex, (Color) e.getNewValue());
    } else if (name.equals(TabInfo.BACKGROUND_PROPERTY)) {
      tabs.setBackgroundAt(tabIndex, (Color) e.getNewValue());
    } else if (name.equals(TabInfo.MNEMONIC_PROPERTY)) {
      tabs.setMnemonicAt(tabIndex, (Integer) e.getNewValue());
    } else if (name.equals(TabInfo.DISPLAYED_MNEMONIC_INDEX_PROPERTY)) {
      tabs.setDisplayedMnemonicIndexAt(tabIndex, (Integer) e.getNewValue());
    } else if (name.equals(TabInfo.ICON_PROPERTY)) {
      tabs.setIconAt(tabIndex, (Icon) e.getNewValue());
    } else if (name.equals(TabInfo.DISABLED_ICON_PROPERTY)) {
      tabs.setDisabledIconAt(tabIndex, (Icon) e.getNewValue());
    } else if (name.equals(TabInfo.TAB_COMPONENT_PROPERTY)) {
      tabs.setTabComponentAt(tabIndex, (Component) e.getNewValue());
    } else if (name.equals(TabInfo.ENABLED_PROPERTY)) {
      tabs.setEnabledAt(tabIndex, (Boolean) e.getNewValue());
    }
  }
}

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime

@Override
  public void propertyChange(PropertyChangeEvent e) {
    String name = e.getPropertyName();
    if (name.equals(TabInfo.TITLE_PROPERTY)) {
      tabs.setTitleAt(tabIndex, (String) e.getNewValue());
    } else if (name.equals(TabInfo.TOOL_TIP_TEXT_PROPERTY)) {
      tabs.setToolTipTextAt(tabIndex, (String) e.getNewValue());
    } else if (name.equals(TabInfo.FOREGROUND_PROPERTY)) {
      tabs.setForegroundAt(tabIndex, (Color) e.getNewValue());
    } else if (name.equals(TabInfo.BACKGROUND_PROPERTY)) {
      tabs.setBackgroundAt(tabIndex, (Color) e.getNewValue());
    } else if (name.equals(TabInfo.MNEMONIC_PROPERTY)) {
      tabs.setMnemonicAt(tabIndex, (Integer) e.getNewValue());
    } else if (name.equals(TabInfo.DISPLAYED_MNEMONIC_INDEX_PROPERTY)) {
      tabs.setDisplayedMnemonicIndexAt(tabIndex, (Integer) e.getNewValue());
    } else if (name.equals(TabInfo.ICON_PROPERTY)) {
      tabs.setIconAt(tabIndex, (Icon) e.getNewValue());
    } else if (name.equals(TabInfo.DISABLED_ICON_PROPERTY)) {
      tabs.setDisabledIconAt(tabIndex, (Icon) e.getNewValue());
    } else if (name.equals(TabInfo.TAB_COMPONENT_PROPERTY)) {
      tabs.setTabComponentAt(tabIndex, (Component) e.getNewValue());
    } else if (name.equals(TabInfo.ENABLED_PROPERTY)) {
      tabs.setEnabledAt(tabIndex, (Boolean) e.getNewValue());
    }
  }
}

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

tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);

代码示例来源:origin: net.sourceforge.pmd/pmd-core

tabbed.addTab("Abstract Syntax Tree / XPath / Symbol Table", resultsSplitPane);
tabbed.addTab("Data Flow Analysis", dfaPanel);
tabbed.setMnemonicAt(0, KeyEvent.VK_A);
tabbed.setMnemonicAt(1, KeyEvent.VK_D);

代码示例来源:origin: abc9070410/JComicDownloader

tabbedPane.addTab( getTabeHtmlFontString( "檔案", "File" ), null, fileTablePanel,
          CommonGUI.getToolTipString( "有關於檔案存放的設定" ) );
tabbedPane.setMnemonicAt( 0, KeyEvent.VK_1 );
tabbedPane.addTab( getTabeHtmlFontString( "連線", "Connection" ), null, connectionTablePanel,
          CommonGUI.getToolTipString( "有關於連線下載的設定" ) );
tabbedPane.setMnemonicAt( 1, KeyEvent.VK_2 );
tabbedPane.addTab( getTabeHtmlFontString( "任務", "Mission" ), null,
          missionTablePanel, CommonGUI.getToolTipString( "有關於下載任務的設定" ) );
tabbedPane.setMnemonicAt( 2, KeyEvent.VK_3 );
tabbedPane.addTab( getTabeHtmlFontString( "介面", "UI" ), null, interfaceTablePanel,
          CommonGUI.getToolTipString( "有關於視窗介面的設定" ) );
tabbedPane.setMnemonicAt( 3, KeyEvent.VK_4 );
tabbedPane.addTab( getTabeHtmlFontString( "瀏覽", "View" ), null, viewTablePanel,
          CommonGUI.getToolTipString( "有關於開啟圖片或壓縮檔的設定" ) );
tabbedPane.setMnemonicAt( 3, KeyEvent.VK_4 );
tabbedPane.addTab( getTabeHtmlFontString( "音效", "Audio" ), null, audioTablePanel,
          CommonGUI.getToolTipString( "有關於開啟圖片或壓縮檔的設定" ) );
tabbedPane.setMnemonicAt( 4, KeyEvent.VK_5 );
tabbedPane.addTab( getTabeHtmlFontString( "佈景", "Theme" ), null, backgroundTablePanel,
          CommonGUI.getToolTipString( "有關於背景圖片的設定" ) );
tabbedPane.setMnemonicAt( 5, KeyEvent.VK_6 );
tabbedPane.addTab( getTabeHtmlFontString( "腳本", "Script" ), null, scriptTablePanel,

代码示例来源:origin: abc9070410/JComicDownloader

new CommonGUI().getImageIcon("tab_download.png"),
    downTablePanel, CommonGUI.getToolTipString("所有欲下載的任務都會出現在此處,可依序下載"));
tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
    new CommonGUI().getImageIcon("tab_bookmark.png"),
    bookmarkTablePanel, CommonGUI.getToolTipString("希望持續追蹤的漫畫可加入到此處"));
tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
    new CommonGUI().getImageIcon("tab_record.png"),
    recordTablePanel, CommonGUI.getToolTipString("所有曾經加入到下載任務的漫畫都會記錄在這邊,可由『選項』來選擇持續記錄或關閉後清空"));
tabbedPane.setMnemonicAt(2, KeyEvent.VK_3);

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

public void addColorChooserPanel( final AbstractColorChooserPanel panel ) {
 multiSelectorPane.addTab( panel.getDisplayName(), panel.getSmallDisplayIcon(), panel );
 multiSelectorPane.setMnemonicAt( multiSelectorPane.getTabCount() - 1, panel.getMnemonic() );
 multiSelectorPane
  .setDisplayedMnemonicIndexAt( multiSelectorPane.getTabCount() - 1, panel.getDisplayedMnemonicIndex() );
 panel.installChooserPanel( colorModel );
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

_tabPnl.setMnemonicAt(idx, mnemonic.intValue());

代码示例来源:origin: realXuJiang/bigtable-sql

_tabPnl.setMnemonicAt(idx, mnemonic.intValue());

相关文章

JTabbedPane类方法