Package DisplayProject

Examples of DisplayProject.PsuedoDoubleClickAction


        this.tree.setToggleClickCount(0);
       
        // Map Enter to a double click action (as Forte does).  CraigM 03/10/2007.
        this.tree.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.tree.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.tree.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());

        // Can't seem to remove the border on a tree?
        // this.tree.setBorder(BorderFactory.createEmptyBorder());
        // this.tree.setBorder(null);
View Full Code Here


        this.putClientProperty("JTree.lineStyle", "Angled");
        this.setDoubleBuffered(true);
        this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
//      Forte fires the double click event when the user presses the ENTER key while in a TreeView - do the same here
        this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());

//      When the control gets focus set focus to the first node if none already selected
        this.addFocusListener(new FocusAdapter(){
            public void focusGained(FocusEvent e) {
                if (TreeViewWidget.this.getRowCount() > 0 && TreeViewWidget.this.getSelectionCount() == 0) {
View Full Code Here

        this.setCellSelectionEnabled(false);
        this.setRowSelectionAllowed(true);
        this.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());
        this.setBackground(java.awt.Color.WHITE); // Set the rest of the JTable to have a white background to mirror the Forte one
        this.setInheritsPopupMenu(true); //PM:9/10/07 ensure the popup is available in table mode
       
        if (font != null) {
            this.setFont(font);
View Full Code Here

    // This enables buttons to accept enter and be pressed.  CraigM 12/11/2007.
    im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "none");

    getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
    getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
    getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());

    //PM:27/9/07
    /*
     * changed the default background colour to be inherited from the parent
     * i.e. set it to null
View Full Code Here

        jt.setIntercellSpacing(new Dimension()); // CraigM: 19/07/2007 - Remove the gaps between the rows
        jt.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jt.addMouseListener(new ForteMouseAdapter());
        jt.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        jt.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        jt.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());
        return jt;
    }
View Full Code Here

    // This enables buttons to accept enter and be pressed.  CraigM 12/11/2007.
    im.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "none");

    getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
    getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
    getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());

    //PM:27/9/07
    /*
     * changed the default background colour to be inherited from the parent
     * i.e. set it to null
View Full Code Here

        jt.setIntercellSpacing(new Dimension()); // CraigM: 19/07/2007 - Remove the gaps between the rows
        jt.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jt.addMouseListener(new ForteMouseAdapter());
        jt.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        jt.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        jt.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());
        return jt;
    }
View Full Code Here

        this.tree.setToggleClickCount(0);
       
        // Map Enter to a double click action (as Forte does).  CraigM 03/10/2007.
        this.tree.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.tree.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.tree.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());

        // Can't seem to remove the border on a tree?
        // this.tree.setBorder(BorderFactory.createEmptyBorder());
        // this.tree.setBorder(null);
View Full Code Here

        this.putClientProperty("JTree.lineStyle", "Angled");
        this.setDoubleBuffered(true);
        this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
//      Forte fires the double click event when the user presses the ENTER key while in a TreeView - do the same here
        this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());

//      When the control gets focus set focus to the first node if none already selected
        this.addFocusListener(new FocusAdapter(){
            public void focusGained(FocusEvent e) {
                if (TreeViewWidget.this.getRowCount() > 0 && TreeViewWidget.this.getSelectionCount() == 0) {
View Full Code Here

        this.setCellSelectionEnabled(false);
        this.setRowSelectionAllowed(true);
        this.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_MASK),PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK);
        this.getActionMap().put(PsuedoDoubleClickAction.PSUED0_DOUBLE_CLICK, new PsuedoDoubleClickAction());
        this.setBackground(java.awt.Color.WHITE); // Set the rest of the JTable to have a white background to mirror the Forte one
        this.setInheritsPopupMenu(true); //PM:9/10/07 ensure the popup is available in table mode
       
        if (font != null) {
            this.setFont(font);
View Full Code Here

TOP

Related Classes of DisplayProject.PsuedoDoubleClickAction

Copyright © 2018 www.massapicom. 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.