List of usage examples for java.awt.event MouseAdapter subclass-usage
From source file MouseClickListener.java
class MouseClickListener extends MouseAdapter { public void mouseClicked(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e)) { System.out.print("The mouse left button was clicked"); } else if (SwingUtilities.isRightMouseButton(e)) { System.out.print("The mouse right button was clicked");
From source file MouseEnterFocusMover.java
class MouseEnterFocusMover extends MouseAdapter { public void mouseEntered(MouseEvent mouseEvent) { Component component = mouseEvent.getComponent(); if (!component.hasFocus()) { component.requestFocusInWindow(); }
From source file DragMouseAdapter.java
class DragMouseAdapter extends MouseAdapter { public void mousePressed(MouseEvent e) { JComponent c = (JComponent) e.getSource(); TransferHandler handler = c.getTransferHandler(); handler.exportAsDrag(c, e, TransferHandler.COPY); }
From source file com.mac.tarchan.desktop.event.DoubleClickHandler.java
/** * DoubleClickHandler */ public class DoubleClickHandler extends MouseAdapter { /** */ private static final Log log = LogFactory.getLog(DoubleClickHandler.class);
From source file Main.java
class ColumnHeaderListener extends MouseAdapter { public void mouseClicked(MouseEvent evt) { JTable table = ((JTableHeader) evt.getSource()).getTable(); TableColumnModel colModel = table.getColumnModel(); int index = colModel.getColumnIndexAtX(evt.getX());
From source file Main.java
class MyMouseListener extends MouseAdapter { public void mouseClicked(MouseEvent evt) { if ((evt.getModifiers() & InputEvent.BUTTON1_MASK) != 0) { System.out.println("left" + (evt.getPoint())); } if ((evt.getModifiers() & InputEvent.BUTTON2_MASK) != 0) {
From source file Main.java
class MyMouseListener extends MouseAdapter { public void mouseClicked(MouseEvent evt) { if (evt.getClickCount() == 3) { System.out.println("triple-click"); } else if (evt.getClickCount() == 2) { System.out.println("double-click");
From source file MainClass.java
class MyMouseAdapter extends MouseAdapter { MainClass sampleFonts; public MyMouseAdapter(MainClass sampleFonts) { this.sampleFonts = sampleFonts; }
From source file cgpanalyser.gui.chart.XYMouseMarker.java
/** * * @author Vlastimil Kapusta, xkapus02@stud.fit.vutbr.cz */ public final class XYMouseMarker extends MouseAdapter {
From source file Main.java
class Adapter1 extends MouseAdapter { MouseMotionAdapterDemo mmad; public Adapter1(MouseMotionAdapterDemo mmad) { this.mmad = mmad; }