本文整理了Java中java.awt.event.MouseEvent.isControlDown()
方法的一些代码示例,展示了MouseEvent.isControlDown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MouseEvent.isControlDown()
方法的具体详情如下:
包路径:java.awt.event.MouseEvent
类名称:MouseEvent
方法名:isControlDown
暂无
代码示例来源:origin: libgdx/libgdx
public void mousePressed (MouseEvent event) {
movingIndex = overIndex;
moveAll = event.isControlDown();
if (moveAll) {
moveAllProportionally = event.isShiftDown();
moveAllPrevY = event.getY();
}
}
代码示例来源:origin: libgdx/libgdx
public void mousePressed (MouseEvent event) {
movingIndex = overIndex;
moveAll = event.isControlDown();
if (moveAll) {
moveAllProportionally = event.isShiftDown();
moveAllPrevY = event.getY();
}
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
*
* @param event
* @return Returns true if the given event should toggle selected cells.
*/
public boolean isCloneEvent(MouseEvent event)
{
return (event != null) ? event.isControlDown() : false;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
*
* @param event
* @return Returns true if the given event should toggle selected cells.
*/
public boolean isCloneEvent(MouseEvent event)
{
return (event != null) ? event.isControlDown() : false;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* @see MouseEvent
*/
public boolean isControlDown() {
return event.isControlDown();
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Invoked when the mouse exits a component.
*/
@Override
public void mouseDragged(MouseEvent e) {
ctrlKeyDown = e.isControlDown();
}
代码示例来源:origin: hneemann/Digital
@Override
public boolean isClickModifier(MouseEvent e) {
return e.isControlDown();
}
};
代码示例来源:origin: locationtech/jts
public void mousePressed(MouseEvent e)
{
zoomBoxStart = e.getPoint();
zoomBoxEnd = null;
isControlKeyDown = e.isControlDown();
isRightButton = SwingUtilities.isRightMouseButton(e);
}
代码示例来源:origin: protegeproject/protege
public void mouseReleased(MouseEvent e) {
if (e.getClickCount() == 3 && e.isControlDown() && e.isShiftDown()) {
reload();
}
if (e.isPopupTrigger()) {
showPopupMenu(e);
}
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
public void mouseReleased(MouseEvent e) {
if (e.getClickCount() == 3 && e.isControlDown() && e.isShiftDown()) {
reload();
}
if (e.isPopupTrigger()) {
showPopupMenu(e);
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
public void dragStarting(MouseEvent me) {
if (me.isControlDown()) {
// PENDING JW: this isn't aware of sorting/filtering - fix!
int row = SwingXUtilities.loc2IndexFileList(list, me.getPoint());
list.addSelectionInterval(row, row);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
public void dragStarting(MouseEvent me) {
if (me.isControlDown()) {
// PENDING JW: this isn't aware of sorting/filtering - fix!
int row = SwingXUtilities.loc2IndexFileList(list, me.getPoint());
list.addSelectionInterval(row, row);
}
}
代码示例来源:origin: com.synaptix/SynaptixWidget
private void performSelection(final MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) {
if (e.isControlDown()) {
addOrRemoveSelectionAtPoint(e.getPoint());
} else {
setSelectionAtPoint(e.getPoint());
}
} else if (e.getButton() == MouseEvent.BUTTON3) {
selectAtPointIfNotSelected(e.getPoint());
}
setSelectedValueAtPoint(e.getPoint());
}
代码示例来源:origin: freeplane/freeplane
@Override
public void mouseClicked(final MouseEvent e) {
if (e.getClickCount() == 2) {
final Point p = e.getPoint();
final int row = tableView.rowAtPoint(p);
selectNodes(row, new int[] { row });
if (!(e.isControlDown() || e.isMetaDown()))
disposeDialog();
}
}
}
代码示例来源:origin: org.cytoscape/vizmap-gui-impl
@Override
@SuppressWarnings("unchecked")
public void mouseClicked(final MouseEvent e) {
if (!e.isShiftDown() || e.isControlDown()) // Deselect all items
setSelectedItems(Collections.EMPTY_SET);
}
});
代码示例来源:origin: biojava/biojava
private boolean keyPressed(MouseEvent e) {
if (e.isShiftDown() || e.isControlDown() || e.isAltDown())
return true;
return false;
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
public void mouseDragged(MouseEvent e) {
Point p = e.getPoint();
int row = xyTable.rowAtPoint(p);
int column = xyTable.columnAtPoint(p);
xyTable.changeSelection(row, column, e.isControlDown(), true);
}
代码示例来源:origin: locationtech/jts
public void mouseReleased(MouseEvent e)
{
clearIndicator();
// don't process this event if the mouse was clicked or dragged a very short distance
if (! isSignificantMouseMove())
return;
isControlKeyDown = e.isControlDown();
isRightButton = SwingUtilities.isRightMouseButton(e);
gestureFinished();
}
代码示例来源:origin: de.sciss/scisslib
public void mousePressed( MouseEvent e )
{
if( !isEnabled() ) return;
requestFocus();
if( e.isControlDown() ) return;
model.setArmed( true );
repaint();
}
代码示例来源:origin: sc.fiji/MTrackJ_
public void mouseEntered(final MouseEvent e) { try {
if (mtrackj.settings().activateimage) {
mtrackj.window().toFront();
mtrackj.canvas().requestFocusInWindow();
}
cursor();
oncanvas = true;
snapctrl = e.isControlDown();
if (Toolbar.getToolId() != Toolbar.HAND && spacedown) spacedown = false;
redraw(); // In case snapping is on
} catch (Throwable x) { mtrackj.catcher().uncaughtException(Thread.currentThread(),x); } }
内容来源于网络,如有侵权,请联系作者删除!