List of usage examples for java.awt.event MouseEvent getClickCount
public int getClickCount()
From source file:es.emergya.ui.base.Message.java
@Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { if (this.frame != null) this.frame.dispose(); this.m.getNext(); }/*from w w w.j a va 2s.c o m*/ }
From source file:de.tbuchloh.kiskis.gui.systray.Java6SystemTray.java
/** * @see de.tbuchloh.kiskis.gui.systray.ISystemTray#show() */// w w w . j a va 2 s.com public void show() { if (!SystemTray.isSupported()) { LOG.error("System tray is not supported!"); return; } final SystemTray tray = SystemTray.getSystemTray(); final Image image = Toolkit.getDefaultToolkit().getImage(_main.getTrayIconURL()); final MouseListener mouseListener = new MouseAdapter() { @Override public void mouseClicked(final MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() >= 2) { _main.setVisible(!_main.isVisible()); } } }; final PopupMenu popup = _main.getPopupMenu(); _trayIcon = new TrayIcon(image, BuildProperties.getFullTitle(), popup); _trayIcon.setImageAutoSize(true); _trayIcon.addMouseListener(mouseListener); try { tray.add(_trayIcon); } catch (final AWTException e) { e.printStackTrace(); } }
From source file:streaming.swing.JPanelListFilm.java
private void jTableListFilmMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableListFilmMouseClicked if (evt.getClickCount() == 2) { int i = jTableListFilm.getSelectedRow(); Film f = tmListeFilm.getFilm().get(i); JDialogFilm jdg = new JDialogFilm(null, true, f); jdg.setVisible(true);/*from w w w . ja v a 2s. c o m*/ } }
From source file:gtu._work.ui.LoadJspCheckTagUI.java
private void jTree1MouseClicked(MouseEvent evt) { if (evt.getClickCount() == 2) { this.jTreeListener(evt); }//from www .ja va2s . c om }
From source file:org.nuclos.client.genericobject.statehistory.StateHistoryController.java
private void setupDoubleClickListener(final StateHistoryPanel pnlStateHistory) { pnlStateHistory.getTable().addMouseListener(new MouseAdapter() { @Override//from w w w . j ava2 s . c o m public void mouseClicked(MouseEvent ev) { if (ev.getClickCount() == 2) { final int iSelectedRow = pnlStateHistory.getTable().getSelectedRow(); if (iSelectedRow >= 0) { final StateHistoryVO stateHistory = ((StateHistoryPanel.TableModel) pnlStateHistory .getTable().getModel()).getRow(iSelectedRow); // Workaround for retrieval problems with initial state Calendar cal = Calendar.getInstance(); cal.setTime(stateHistory.getCreatedAt()); cal.add(Calendar.MINUTE, 1); cmdShowHistoricalGenericObject(getTabbedPane(), cal.getTime()); } } } }); }
From source file:uk.nhs.cfh.dsp.yasb.expression.builder.panels.SnomedRelationshipPropertyExpressionPanel.java
/** * Inits the components.//from ww w . ja v a 2s. co m */ public synchronized void initComponents() { // create attributeOperatorMap createAttributeOperatorMap(); attributeLabel = new JLabel(); attributeLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { logger.debug("Mouse double clicked on attribute label"); } } }); // create and add operator label operatorLabel = new JLabel(); operatorLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { logger.debug("Mouse double clicked on operator label"); } } }); // create value panel valuePanel = new JPanel(); // set main layout to box layout setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); add(attributeLabel); add(operatorLabel); add(valuePanel); }
From source file:ru.codemine.pos.ui.windows.document.cheque.ChequeListWindow.java
@Override public void setupActionListeners() { setEditActionListener(viewCheque);//from w w w .j av a2 s . c om table.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { Point p = e.getPoint(); int row = table.rowAtPoint(p); if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) { menuItemEdit.doClick(); } } }); actionListenersInit = true; }
From source file:edu.scripps.fl.pubchem.xmltool.gui.PubChemXMLExtractorGUI.java
public void mouseClicked(MouseEvent e) { if (e.getClickCount() > 0) { if (e.getSource() == jtfFileXML) { if (jtfFileXML.getText().equals(aidText)) jtfFileXML.setText(""); }/*from w ww. j a va 2 s . c o m*/ if (e.getSource() == this) { if (jtfFileXML.getText().equals("")) jtfFileXML.setText(aidText); } } }
From source file:ru.codemine.pos.ui.windows.users.UsersListWindow.java
@Override public void setupActionListeners() { setNewActionListener(newUser);/*from www .j a va 2 s. c om*/ setEditActionListener(editUser); setDeleteActionListener(deleteUser); setRefreshActionListener(refreshUsersList); table.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { Point p = e.getPoint(); int row = table.rowAtPoint(p); if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) { menuItemEdit.doClick(); } } }); actionListenersInit = true; }
From source file:ru.codemine.pos.ui.windows.stores.StoresListWindow.java
@Override public void setupActionListeners() { setNewActionListener(newStore);/*from w w w. j a v a 2 s . c o m*/ setEditActionListener(editStore); setDeleteActionListener(deleteStore); setRefreshActionListener(refreshStoreList); table.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { Point p = e.getPoint(); int row = table.rowAtPoint(p); if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) { menuItemEdit.doClick(); } } }); actionListenersInit = true; }