本文整理汇总了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);
}