コード例 #1
0
 public void showPanel(int n) {
   currItems ^= 1 << n;
   if (currItems > 0) {
     rearrange();
     manageMenu.setSelected(n);
     this.revalidate();
   } else {
     currItems ^= 1 << n;
     manageMenu.setSelected(n, true);
   }
 }
コード例 #2
0
  private void menuForViews() {
    CPopupMenu m1 = new CPopupMenu(this);
    CPopupMenu m2 = new CPopupMenu(this);
    JPopupMenu m3 = xmlView.getPopupMenu();
    m3.addSeparator();
    m3.add(m1.getViews());

    this.setComponentPopupMenu(m2);
    xmlView.addPopMenu(m3);
    textView.addPopMenu(m2);
    treeView.addPopMenu(m2);

    manageMenu.setView((JMenu) m3.getComponent(12));
    manageMenu.setMenu(m2);
  }