List of usage examples for java.awt.event MouseEvent consume
public void consume()
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mouseDragged(MouseEvent e) { e.consume(); dispacciaEventoDrag(tmp12, e, e.getPoint(), true); jLayeredPane.moveToFront(component); }
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mouseEntered(MouseEvent e) { e.consume(); jLayeredPane.moveToFront(component); component.updateUI(); }
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mouseExited(MouseEvent e) { e.consume(); jLayeredPane.moveToFront(component); component.updateUI(); }
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mouseClicked(MouseEvent e) { e.consume(); dispacciaEvento(null, e, e.getPoint(), false); jLayeredPane.moveToFront(component); component.updateUI();/*w w w .ja va 2 s . co m*/ }
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mouseReleased(MouseEvent e) { e.consume(); dispacciaEvento(null, e, e.getPoint(), false); dispacciaEvento(tmp12, e, e.getPoint(), false); tmp12 = null;/*from w w w. j av a 2s . c o m*/ jLayeredPane.moveToFront(component); component.updateUI(); }
From source file:com.tag.MouseDragAndDrop.java
protected void prepare(MouseEvent e) { int mod = e.getModifiers(); if ((mod & MouseEvent.BUTTON1_MASK) == 0) e.consume(); }
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mouseMoved(MouseEvent e) { e.consume(); jLayeredPane.moveToFront(component); component.updateUI();/*from w w w . j av a2 s . c o m*/ //TODO vedere se questa tecnica va bene per ricreare l'albero in caso di duplicazione dovuta alla creazione di un join Boolean recreateTree = (Boolean) modello.getBean(Costanti.RECREATE_TREE); if ((recreateTree == null) || recreateTree == Boolean.FALSE) { return; } modello.removeBean(Costanti.RECREATE_TREE); if (logger.isDebugEnabled()) logger.debug("ricreo albero"); duplicateTree(); }
From source file:it.unibas.spicygui.vista.listener.MyMouseEventListener.java
public void mousePressed(MouseEvent e) { e.consume(); Component comS = SwingUtilities.getDeepestComponentAt(pannelloPrincipale, e.getX(), e.getY()); if ((comS instanceof JScrollBar || !((comS instanceof JPanel) || (comS instanceof JTree))) && comS != null) {//from www.j a va 2 s . c om if (tmp12 == null) { tmp12 = comS; } } if (!(Costanti.INTERMEDIE.equals(comS.getName()))) { dispacciaEvento(null, e, e.getPoint(), false); } jLayeredPane.moveToFront(component); component.updateUI(); }
From source file:ColorSink.java
/** Create a new ColorSink object */ public ColorSink() { // Listen for double clicks. Use them to trigger a paste action. addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { pastecolor();/* w w w .ja va2 s . com*/ e.consume(); } } }); // We have to create a DropTarget object to support Drag-and-Drop // It will listen for drops on top of us, and notify our DropTargetListener // methods when drag-and-drop related events occur. setDropTarget(new DropTarget(this, this)); }
From source file:net.andydvorak.intellij.lessc.ui.configurable.LessProfileConfigurableForm.java
public JComponent createOptionsPanel() { lessDirTextField = new TextFieldWithBrowseButtonImpl(project, UIBundle.message("file.chooser.less.title")); lessDirPanel.add(lessDirTextField, GRIDCONSTRAINTS_FILL_ALL); profileMappingTable.addMouseListener(new MouseListener() { @Override// w w w . ja v a 2s . c o m public void mouseClicked(MouseEvent mouseEvent) { if (mouseEvent.getClickCount() == 2 && !mouseEvent.isConsumed()) { mouseEvent.consume(); editRow(); } } @Override public void mousePressed(MouseEvent mouseEvent) { } @Override public void mouseReleased(MouseEvent mouseEvent) { } @Override public void mouseEntered(MouseEvent mouseEvent) { } @Override public void mouseExited(MouseEvent mouseEvent) { } }); final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(profileMappingTable); decorator.setAddAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { addRow(); } }).setEditAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { editRow(); } }).disableUpDownActions(); cssDirPanel.add(decorator.createPanel(), GRIDCONSTRAINTS_FILL_ALL); resetPromptsButton.setMnemonic('r'); resetPromptsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { lessManager.getState().resetPrompts(); lessProfilesPanel.setPromptButtonsEnabled(false); } }); resetPromptsButton.setEnabled(!lessManager.getState().hasDefaultPromptSettings()); return rootPanel; }