Examples of registerKeyboardAction()


Examples of diva.graph.JGraph.registerKeyboardAction()

    public BubbleGraphDemo(AppContext context) {
        JGraph jg = new JGraph(new BubblePane());
        context.getContentPane().add("Center", jg);

        ActionListener deletionListener = new DeletionListener();
        jg.registerKeyboardAction(deletionListener, "Delete", KeyStroke
                .getKeyStroke(KeyEvent.VK_DELETE, 0),
                JComponent.WHEN_IN_FOCUSED_WINDOW);
        jg.setRequestFocusEnabled(true);

        context.setSize(600, 400);
View Full Code Here

Examples of javax.swing.JButton.registerKeyboardAction()

                          inputPane);

        CreateAction createAction = new CreateAction();
        CreateListener createListener = new CreateListener(createAction);
        JButton okButton = new JButton(createAction);
        okButton
                .registerKeyboardAction(createListener,
                                        KeyStroke
                                                .getKeyStroke(KeyEvent.VK_ENTER,
                                                              0,
                                                              false),
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

      public void actionPerformed(ActionEvent e)
      {
        // ignore
      }  
    };
    c.registerKeyboardAction(l1, "ABC", KeyStroke.getKeyStroke('a'),
            JComponent.WHEN_FOCUSED);
    harness.check(c.getInputMap(JComponent.WHEN_FOCUSED).keys()[0],
            KeyStroke.getKeyStroke('a'));
    Object link = c.getInputMap(JComponent.WHEN_FOCUSED).get(
            KeyStroke.getKeyStroke('a'));
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

      public void actionPerformed(ActionEvent e)
      {
        // ignore
      }  
    };
    c.registerKeyboardAction(l1, KeyStroke.getKeyStroke('a'),
            JComponent.WHEN_FOCUSED);
    harness.check(c.getInputMap(JComponent.WHEN_FOCUSED).keys()[0],
            KeyStroke.getKeyStroke('a'));
    Object link = c.getInputMap(JComponent.WHEN_FOCUSED).get(
            KeyStroke.getKeyStroke('a'));
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

            ISQLPanelAPI sqlPaneAPI = sqlInternalFrame.getSQLPanelAPI();
            CompleteBookmarkAction cba = new CompleteBookmarkAction(sess.getApplication(), resources, sqlPaneAPI.getSQLEntryPanel(), SQLBookmarkPlugin.this);
            JMenuItem item = sqlPaneAPI.addToSQLEntryAreaMenu(cba);
            resources.configureMenuItem(cba, item);
            JComponent comp = sqlPaneAPI.getSQLEntryPanel().getTextComponent();
            comp.registerKeyboardAction(cba, resources.getKeyStroke(cba), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
            sqlInternalFrame.addToToolsPopUp("bookmarkselect", cba);
         }

         public void objectTreeInternalFrameOpened(ObjectTreeInternalFrame objectTreeInternalFrame, ISession sess)
         {
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

            sqlPaneAPI.getSQLEntryPanel(),
            SQLBookmarkPlugin.this);
      JMenuItem item = sqlPaneAPI.addToSQLEntryAreaMenu(cba);
      resources.configureMenuItem(cba, item);
      JComponent comp = sqlPaneAPI.getSQLEntryPanel().getTextComponent();
      comp.registerKeyboardAction(cba,
         resources.getKeyStroke(cba),
         JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
      session.getSessionInternalFrame().addToToolsPopUp("bookmarkselect", cba);
   }
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

        ((JToolBar) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.TOOL_BAR_INTERFACE)).setFloatable(false);
        drawingArea.add((JToolBar) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.TOOL_BAR_INTERFACE), BorderLayout.WEST);
       
        JComponent viewArea = (JComponent) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.EDITOR_AREA_INTERFACE);
       
        viewArea.registerKeyboardAction(copyAction, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(pasteAction, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(cutAction, KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(deleteAction, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
       
        /***
 
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

        drawingArea.add((JToolBar) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.TOOL_BAR_INTERFACE), BorderLayout.WEST);
       
        JComponent viewArea = (JComponent) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.EDITOR_AREA_INTERFACE);
       
        viewArea.registerKeyboardAction(copyAction, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(pasteAction, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(cutAction, KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(deleteAction, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
       
        /***
         *  uiPanel = new JPanel();
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

       
        JComponent viewArea = (JComponent) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.EDITOR_AREA_INTERFACE);
       
        viewArea.registerKeyboardAction(copyAction, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(pasteAction, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(cutAction, KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(deleteAction, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
       
        /***
         *  uiPanel = new JPanel();
        dockingUI = new DockingUIComponent(uiPanel);
View Full Code Here

Examples of javax.swing.JComponent.registerKeyboardAction()

        JComponent viewArea = (JComponent) graphicalEditorUI.getInterface(de.FeatureModellingTool.GraphicalEditor.Manager.EDITOR_AREA_INTERFACE);
       
        viewArea.registerKeyboardAction(copyAction, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(pasteAction, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(cutAction, KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        viewArea.registerKeyboardAction(deleteAction, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, false), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
       
        /***
         *  uiPanel = new JPanel();
        dockingUI = new DockingUIComponent(uiPanel);
        DockingUILayout layout = dockingUI.getDockingUILayout();
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.