Examples of PopupListener


Examples of gov.nasa.arc.mct.gui.housing.MCTContentArea.PopupListener

    }

    @Test
    public void testPopupListener() {
        ActionManager.registerMenu(ViewMenu.class, "VIEW_MENU");
        PopupListener listener = contentArea.new PopupListener();
        listener.setTestMode();
        MouseEvent e = new MouseEvent(contentArea, 0, 0, 0, 0, 0, 0, true);
        assertFalse(listener.popupActivated());
        listener.mousePressed(e);
        assertTrue(listener.popupActivated());
        ActionManager.unregisterMenu(ViewMenu.class, "VIEW_MENU");
    }
View Full Code Here

Examples of net.sf.jpluck.swing.PopupListener

                    if (SwingUtilities.isLeftMouseButton(ev) && (ev.getClickCount() == 2)) {
                        editAction.actionPerformed(null);
                    }
                }
            });
        tableList.addMouseListener(new PopupListener(tableList, popupMenu) {
                protected void checkPopup(MouseEvent e) {
                    if (e.isPopupTrigger()) {
                        Point p = new Point(e.getX(), e.getY());
                        int idx = tableList.rowAtPoint(p);
                        int[] rows = tableList.getSelectedRows();
                        boolean inSelection = false;
                        for (int i = 0; i < rows.length; i++) {
                            if (rows[i] == idx) {
                                inSelection = true;
                                break;
                            }
                        }
                        if (!inSelection && (idx > -1)) {
                            tableList.setRowSelectionInterval(idx, idx);
                        }
                        this.popupMenu.show(component, e.getX(), e.getY());
                    }
                }
            });

        JPopupMenu tableHeaderMenu = new JPopupMenu();
        JMenuItem optimizeColumnWidths = new JMenuItem("Optimal Column Widths");
        optimizeColumnWidths.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    tableList.optimizeWidths(4);
                }
            });
        tableHeaderMenu.add(optimizeColumnWidths);
        tableList.getTableHeader().addMouseListener(new PopupListener(tableList.getTableHeader(), tableHeaderMenu));
        tableList.sortByColumn(0);

        JScrollPane scrollPane = new JScrollPane(tableList);
        scrollPane.getViewport().setBackground(UIManager.getColor("Table.background"));
        scrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));
        scrollPane.getViewport().addMouseListener(new PopupListener(tableList, popupMenu));

        Container c = getContentPane();
        c.add(BorderLayout.NORTH, toolBar);
        c.add(BorderLayout.CENTER, scrollPane);
View Full Code Here

Examples of net.sf.jpluck.swing.PopupListener

                            showcasePanel.showPreview(document.getName());
                        }
                    }
                }
            });
        tableList.addMouseListener(new PopupListener(tableList, popupMenu) {
                protected void checkPopup(MouseEvent e) {
                    if (e.isPopupTrigger()) {
                        Point p = new Point(e.getX(), e.getY());
                        int idx = tableList.rowAtPoint(p);
                        int[] rows = tableList.getSelectedRows();
View Full Code Here

Examples of org.apache.log4j.chainsaw.PopupListener

     */
    private void initMenus() {

        JPopupMenu popupMenu = new JPopupMenu();
        popupMenu.add(previewPane.getActions().TOGGLE_PREVIEW_PANEL);
        PopupListener popupListener = new PopupListener(popupMenu);
        rightSplit.addMouseListener(popupListener);
        this.addMouseListener(popupListener);
        previewPane.addMouseListener(popupListener);
        fileObjectTable.getTable().addMouseListener(popupListener);
        //        TODO Work out WTF is going on with this PopupListener not being
View Full Code Here

Examples of org.apache.log4j.chainsaw.PopupListener

    receiversTree.setCellRenderer(new ReceiverTreeCellRenderer());

    buttonPanel = new ReceiverToolbar();
    receiversTree.addTreeSelectionListener(buttonPanel);

    PopupListener popupListener = new PopupListener(popupMenu);
    receiversTree.addMouseListener(popupListener);
    this.addMouseListener(popupListener);

    JComponent component = receiversTree;
    JScrollPane pane = new JScrollPane(component);
View Full Code Here

Examples of org.apache.log4j.chainsaw.PopupListener

     
     

      newReceiverButton = new SmallButton(newReceiverButtonAction);
      newReceiverButton.setText(null);
      newReceiverButton.addMouseListener(new PopupListener(newReceiverPopup));

      add(newReceiverButton);
      add(restartAllButton);

      addSeparator();
View Full Code Here

Examples of org.apache.log4j.chainsaw.PopupListener

    receiversTree.setCellRenderer(new ReceiverTreeCellRenderer());

    buttonPanel = new ReceiverToolbar();
    receiversTree.addTreeSelectionListener(buttonPanel);

    PopupListener popupListener = new PopupListener(popupMenu);
    receiversTree.addMouseListener(popupListener);
    this.addMouseListener(popupListener);

    JComponent component = receiversTree;
    JScrollPane pane = new JScrollPane(component);
View Full Code Here

Examples of org.apache.log4j.chainsaw.PopupListener

     */
    private void initMenus() {

        JPopupMenu popupMenu = new JPopupMenu();
        popupMenu.add(previewPane.getActions().TOGGLE_PREVIEW_PANEL);
        PopupListener popupListener = new PopupListener(popupMenu);
        rightSplit.addMouseListener(popupListener);
        this.addMouseListener(popupListener);
        previewPane.addMouseListener(popupListener);
        fileObjectTable.getTable().addMouseListener(popupListener);
        //        TODO Work out WTF is going on with this PopupListener not being
View Full Code Here

Examples of org.apache.log4j.chainsaw.PopupListener

     
     

      newReceiverButton = new SmallButton(newReceiverButtonAction);
      newReceiverButton.setText(null);
      newReceiverButton.addMouseListener(new PopupListener(newReceiverPopup));

      add(newReceiverButton);
      add(restartAllButton);

      addSeparator();
View Full Code Here

Examples of org.apache.uima.tools.cvd.control.PopupListener

      this.textArea.setSelectionColor(selectionColor);
      this.textArea.setEditable(true);
      this.textArea.setLineWrap(true);
      this.textArea.setWrapStyleWord(true);
      this.textArea.setText(defaultText);
      this.textArea.addMouseListener(new PopupListener(this));
      // textArea.setFocusable(true);
      this.textArea.addFocusListener(new TextFocusHandler(this));
      this.textArea.getDocument().addDocumentListener(new TextChangedListener(this));
      this.textArea.addCaretListener(new CaretChangeHandler(this));
      this.undoMgr = new UndoMgr(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.