import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JRadioButtonMenuItem;
-import javax.swing.SwingUtilities;
public class PDBViewer extends JInternalFrame implements Runnable
{
@Override
public void mousePressed(MouseEvent evt)
{
- if (evt.isControlDown()
- || SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
radioItem.removeActionListener(radioItem.getActionListeners()[0]);
@Override
public void mousePressed(MouseEvent evt)
{
- if (evt.isControlDown()
- || SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
radioItem.removeActionListener(radioItem.getActionListeners()[0]);
@Override
public void tabbedPane_mousePressed(MouseEvent e)
{
- if (SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
String msg = MessageManager.getString("label.enter_view_name");
String reply = JOptionPane.showInternalInputDialog(this, msg, msg,
}
}
}
- if (!SwingUtilities.isRightMouseButton(evt))
+ if (!evt.isPopupTrigger())
{
return;
}
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.Scrollable;
-import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
}
}
- if (SwingUtilities.isRightMouseButton(evt) && activeRow != -1)
+ if (evt.isPopupTrigger() && activeRow != -1)
{
if (av.getColumnSelection() == null)
{
public void textarea_mousePressed(MouseEvent e)
{
- if (SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
JPopupMenu popup = new JPopupMenu(
MessageManager.getString("action.edit"));
@Override
public void textarea_mousePressed(MouseEvent e)
{
- if (SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
JPopupMenu popup = new JPopupMenu(
MessageManager.getString("action.edit"));
{
public void mouseClicked(MouseEvent evt)
{
- if (evt.getClickCount() == 2
- || SwingUtilities.isRightMouseButton(evt))
+ if (evt.getClickCount() == 2 || evt.isPopupTrigger())
{
editRemoveLocalSource(evt);
}
@Override
public void mousePressed(MouseEvent evt)
{
- if (SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
showPasteMenu(evt.getX(), evt.getY());
}
public void mousePressed(MouseEvent evt)
{
selectedRow = table.rowAtPoint(evt.getPoint());
- if (SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
popupSort(selectedRow, (String) table.getValueAt(selectedRow, 0),
table.getValueAt(selectedRow, 1), fr.getMinMax(),
* Ignore single click. Ignore 'left' click followed by 'right' click (user
* selects a row then its pop-up menu).
*/
- if (e.getClickCount() < 2 || SwingUtilities.isRightMouseButton(e))
+ if (e.getClickCount() < 2 || e.isPopupTrigger())
{
return;
}
int seq = alignPanel.getSeqPanel().findSeq(e);
- if (SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq);
// build a new links menu based on the current links + any non-positional
public void mouseClicked(MouseEvent e)
{
- if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
}
public void mouseClicked(MouseEvent e)
{
- if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
}
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
-import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
min = res;
max = res;
- if (SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
rightMouseButtonPressed(evt, res);
}
}
- if (SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
List<SequenceFeature> allFeatures = ap.getFeatureRenderer()
.findFeaturesAtRes(sequence.getDatasetSequence(),
import javax.swing.JColorChooser;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
-import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
{
if (highlightNode != null)
{
- if (SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
Color col = JColorChooser.showDialog(this,
MessageManager.getString("label.select_subtree_colour"),
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JTabbedPane;
import javax.swing.KeyStroke;
-import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
@Override
public void mousePressed(MouseEvent evt)
{
- if (evt.isControlDown()
- || SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
radioItem.removeActionListener(radioItem.getActionListeners()[0]);