Examples of addMouseListener()


Examples of javax.swing.JTabbedPane.addMouseListener()

        JTabbedPane pane = new JTabbedPane();
        pane.setTabPlacement(tabPlacement);
        UIManager.put(LookAndFeelSettings.TAB_PANE_BORDER_INSETS, oldInsets);

        TabbedDragListener tdl = new TabbedDragListener();
        pane.addMouseListener(tdl);
        pane.addMouseMotionListener(tdl);
        return pane;
    }

    protected void updateTab(Dockable dockable) {
View Full Code Here

Examples of javax.swing.JTable.addMouseListener()

        //Container that displays table showing items in cart
        tableModel = new TableModel( );
        JTable table = new JTable( tableModel );
        //handler removes item to shopping cart
        table.addMouseListener( new TableSelectionHandler( ) );
        ListSelectionModel tableSelectionModel = table.getSelectionModel( );
        tableSelectionModel
                           .setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
        TableColumnModel tableColumnModel = table.getColumnModel( );
        //notice we have a custom renderer for each column as both columns
View Full Code Here

Examples of javax.swing.JTextArea.addMouseListener()

                selectedTexturePack = texturePackIndex;
                updateTexturePacks();
            }
        };
        p.addMouseListener(lin);
        filler.addMouseListener(lin);
        logo.addMouseListener(lin);
        p.add(filler);
        p.add(logo);
        texturePackPanels.add(p);
        texturePacks.add(p);
View Full Code Here

Examples of javax.swing.JTextField.addMouseListener()

          JOptionPane.ERROR_MESSAGE);
      return;
    }

    final JTextField urlField = new JTextField();
    urlField.addMouseListener(new ContextMenuMouseListener());
    urlField.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(final MouseEvent e) {

      }
View Full Code Here

Examples of javax.swing.JTextPane.addMouseListener()

  // widget before getting here.
  fw.getField().setValue(newText);

  fw.getSectionWidget().setIgnoreKeys(false);

  textPane.addMouseListener(fw);
  textPane.addMouseMotionListener(fw);
    }

    sectionResizeCommand.perform();
}
View Full Code Here

Examples of javax.swing.JToggleButton.addMouseListener()

        optionPanel.setBorder(BorderFactory.createEtchedBorder());

        final JToggleButton strokeButton = new JToggleButton(Resources.ICON_STROKE);
        optionPanel.add(strokeButton);
        strokeButton.setText("Stroke Order");
        strokeButton.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent mouseEvent) {
                if (strokeButton.isEnabled()) {
                    setStrokeOrderVisible(!isStrokeOrderVisible());
                }
View Full Code Here

Examples of javax.swing.JTree.addMouseListener()

      DefaultMutableTreeNode node = new DefaultMutableTreeNode("node");
      root.add(node);
      JTree tree = new JTree(root);
      tree.collapseRow(0);
      tree.setName("tree");
      tree.addMouseListener(new MyMouseListener(popupMenu()));
      return tree;
    }

    private static JPopupMenu popupMenu() {
      JPopupMenu popupMenu = new JPopupMenu();
View Full Code Here

Examples of javax.swing.JViewport.addMouseListener()

      if (furnitureView instanceof Scrollable) {
        JScrollPane furnitureScrollPane = new HomeScrollPane(furnitureView);
        // Add a mouse listener that gives focus to furniture view when
        // user clicks in its viewport (tables don't spread vertically if their row count is too small)
        final JViewport viewport = furnitureScrollPane.getViewport();
        viewport.addMouseListener(
            new MouseAdapter() {
              @Override
              public void mouseClicked(MouseEvent ev) {
                viewport.getView().requestFocusInWindow();
              }
View Full Code Here

Examples of javax.swing.JWindow.addMouseListener()

                g.fillRect(getWidth()/4, getHeight()/4, getWidth()/2, getHeight()/2);
                g.drawRect(0, 0, getWidth()-1, getHeight()-1);
                g.dispose();
            }
        });
        transparent.addMouseListener(handler);
        transparent.addMouseMotionListener(handler);
       
        SwingUtilities.invokeAndWait(new Runnable() { public void run() {
            background.pack();
            background.setSize(new Dimension(W, H));
View Full Code Here

Examples of javax.swing.plaf.basic.BasicSplitPaneDivider.addMouseListener()

        this.window = window;
        window.addComponentListener(this);

        BasicSplitPaneDivider divider = getDividerComponent();
        divider.addComponentListener(this);
        divider.addMouseListener(this);

        // Set null minimum size for both components so that divider can be moved all the way left/up and right/down
        Dimension nullDimension = new Dimension(0,0);
        if(leftComponent!=null)
            leftComponent.setMinimumSize(nullDimension);
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.