本文整理匯總了Java中java.awt.event.MouseEvent.BUTTON3_MASK屬性的典型用法代碼示例。如果您正苦於以下問題:Java MouseEvent.BUTTON3_MASK屬性的具體用法?Java MouseEvent.BUTTON3_MASK怎麽用?Java MouseEvent.BUTTON3_MASK使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類java.awt.event.MouseEvent
的用法示例。
在下文中一共展示了MouseEvent.BUTTON3_MASK屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: mouseClicked
public void mouseClicked(MouseEvent e) {
//System.out.println("PlotCanvas.mouseClicked");
/*
* System.out.println("PlotCanvas.mouseClicked"); System.out.println("
* mouseClick = [" + mouseClick[0] + " " + mouseClick[1] + "]");
* System.out.println(" mouseCurent = [" + mouseCurent[0] + " " +
* mouseCurent[1] + "]");
*/
mouseCurent[0] = e.getX();
mouseCurent[1] = e.getY();
e.consume();
mouseClick[0] = mouseCurent[0];
mouseClick[1] = mouseCurent[1];
if (allowEdit) {
if (e.getModifiers() == MouseEvent.BUTTON1_MASK && e.getClickCount() > 1) {
for (int i = 0; i < grid.getAxis().length; i++) {
if (grid.getAxis(i).isSelected(mouseClick, draw) != null) {
grid.getAxis(i).edit(this);
return;
}
}
for (int i = 0; i < plots.size(); i++) {
if (getPlot(i).isSelected(mouseClick, draw) != null) {
getPlot(i).edit(this);
return;
}
}
}
}
if (!dragging && allowNote) {
for (int i = 0; i < plots.size(); i++) {
double[] _coordNoted = getPlot(i).isSelected(mouseClick, draw);
if (e.getModifiers() == MouseEvent.BUTTON1_MASK) {
if (_coordNoted != null) {
getPlot(i).noted = !getPlot(i).noted;
} else {
getPlot(i).noted = false;
}
} else if (e.getModifiers() == MouseEvent.BUTTON3_MASK) {
if (_coordNoted != null) {
if (getPlot(i).coordNoted != null) {
boolean alreadyNoted = true;
for (int j = 0; j < _coordNoted.length; j++) {
alreadyNoted = alreadyNoted && _coordNoted[j] == getPlot(i).coordNoted[j];
}
if (alreadyNoted) {
getPlot(i).coordNoted = null;
} else {
getPlot(i).coordNoted = _coordNoted;
}
} else {
getPlot(i).coordNoted = _coordNoted;
}
}
}
}
repaint();
} else {
dragging = false;
}
}
示例2: GraphEnvironmentPopupPlugin
/** Creates a new instance of GraphPopupMenuMousePlugin */
public GraphEnvironmentPopupPlugin(BasicGraphGui parentGUI) {
super(MouseEvent.BUTTON3_MASK);
this.basicGraphGui = parentGUI;
this.graphController = this.basicGraphGui.getGraphEnvironmentController();
this.graphController.addObserver(this);
}
示例3: PopupMousePlugin
public PopupMousePlugin(){
this.modifiers = MouseEvent.BUTTON3_MASK;
}
示例4: PopupMousePlugin
public PopupMousePlugin(NetworkPanel networkPanel) {
this(MouseEvent.BUTTON3_MASK);
this.networkPanel = networkPanel;
}
示例5: PopupGraphMousePlugin
public PopupGraphMousePlugin() {
this(MouseEvent.BUTTON3_MASK);
}