javafx.scene.input.MouseEvent#isMetaDown ( )源码实例Demo

下面列出了javafx.scene.input.MouseEvent#isMetaDown ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: marathonv5   文件: WSRecorder.java
private String buildModifiersText(MouseEvent e) {
    StringBuilder sb = new StringBuilder();
    if (e.isAltDown()) {
        sb.append("Alt+");
    }
    if (e.isControlDown()) {
        sb.append("Ctrl+");
    }
    if (e.isMetaDown()) {
        sb.append("Meta+");
    }
    if (e.isShiftDown()) {
        sb.append("Shift+");
    }
    if (sb.length() > 0) {
        sb.setLength(sb.length() - 1);
    }
    String mtext = sb.toString();
    return mtext;
}
 
源代码2 项目: openstock   文件: AbstractMouseHandlerFX.java
/**
 * Returns <code>true</code> if the specified mouse event has modifier
 * keys that match this handler.
 * 
 * @param e  the mouse event (<code>null</code> not permitted).
 * 
 * @return A boolean. 
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码3 项目: FxDock   文件: FX.java
/** sometimes MouseEvent.isPopupTrigger() is not enough */
public static boolean isPopupTrigger(MouseEvent ev)
{
	if(ev.getButton() == MouseButton.SECONDARY)
	{
		if(CPlatform.isMac())
		{
			if
			(
				!ev.isAltDown() &&
				!ev.isMetaDown() &&
				!ev.isShiftDown()
			)
			{
				return true;
			}
		}
		else
		{
			if
			(
				!ev.isAltDown() &&
				!ev.isControlDown() &&
				!ev.isMetaDown() &&
				!ev.isShiftDown()
			)
			{
				return true;
			}
		}
	}
	return false;
}
 
源代码4 项目: ECG-Viewer   文件: AbstractMouseHandlerFX.java
/**
 * Returns <code>true</code> if the specified mouse event has modifier
 * keys that match this handler.
 * 
 * @param e  the mouse event (<code>null</code> not permitted).
 * 
 * @return A boolean. 
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码5 项目: green_android   文件: ClickableBitcoinAddress.java
@FXML
protected void requestMoney(MouseEvent event) {
    if (event.getButton() == MouseButton.SECONDARY || (event.getButton() == MouseButton.PRIMARY && event.isMetaDown())) {
        // User right clicked or the Mac equivalent. Show the context menu.
        addressMenu.show(addressLabel, event.getScreenX(), event.getScreenY());
    } else {
        // User left clicked.
        try {
            Desktop.getDesktop().browse(URI.create(uri()));
        } catch (IOException e) {
            GuiUtils.informationalAlert("Opening wallet app failed", "Perhaps you don't have one installed?");
        }
    }
}
 
源代码6 项目: marathonv5   文件: OSFXUtils.java
public static String mouseEventGetModifiersExText(MouseEvent event) {
    StringBuffer sb = new StringBuffer();

    if (event.isControlDown()) {
        sb.append("Ctrl+");
    }
    if (event.isMetaDown()) {
        sb.append("Meta+");
    }
    if (event.isAltDown()) {
        sb.append("Alt+");
    }
    if (event.isShiftDown()) {
        sb.append("Shift+");
    }
    if (event.isPrimaryButtonDown()) {
        sb.append("Button1+");
    }
    if (event.isMiddleButtonDown()) {
        sb.append("Button2+");
    }
    if (event.isSecondaryButtonDown()) {
        sb.append("Button3+");
    }
    String text = sb.toString();
    if (text.equals("")) {
        return text;
    }
    return text.substring(0, text.length() - 1);
}
 
源代码7 项目: marathonv5   文件: EventQueueDeviceTest.java
protected static String getModifiersExText(MouseEvent event) {
    StringBuffer buf = new StringBuffer();
    if (event.isMetaDown()) {
        buf.append("Meta");
        buf.append("+");
    }
    if (event.isControlDown()) {
        buf.append("Ctrl");
        buf.append("+");
    }
    if (event.isAltDown()) {
        buf.append("Alt");
        buf.append("+");
    }
    if (event.isShiftDown()) {
        buf.append("Shift");
        buf.append("+");
    }
    if (event.getButton() == MouseButton.PRIMARY) {
        buf.append("Button1");
        buf.append("+");
    }
    if (event.getButton() == MouseButton.MIDDLE) {
        buf.append("Button2");
        buf.append("+");
    }
    if (event.getButton() == MouseButton.SECONDARY) {
        buf.append("Button3");
        buf.append("+");
    }
    return buf.toString();
}
 
源代码8 项目: marathonv5   文件: JavaFxRecorderHook.java
public static String mouseEventGetModifiersExText(MouseEvent event) {
    StringBuffer sb = new StringBuffer();
    if (event.isControlDown()) {
        sb.append("Ctrl+");
    }
    if (event.isMetaDown()) {
        sb.append("Meta+");
    }
    if (event.isAltDown()) {
        sb.append("Alt+");
    }
    if (event.isShiftDown()) {
        sb.append("Shift+");
    }
    if (event.isPrimaryButtonDown()) {
        sb.append("Button1+");
    }
    if (event.isMiddleButtonDown()) {
        sb.append("Button2+");
    }
    if (event.isSecondaryButtonDown()) {
        sb.append("Button3+");
    }
    String text = sb.toString();
    if (text.equals("")) {
        return text;
    }
    return text.substring(0, text.length() - 1);
}
 
源代码9 项目: marathonv5   文件: RFXComponent.java
protected void mousePressed(MouseEvent me) {
    if (me.isPrimaryButtonDown() && me.getClickCount() == 1 && !me.isAltDown() && !me.isMetaDown() && !me.isControlDown()) {
        mouseButton1Pressed(me);
    } else {
        recorder.recordClick2(this, me, true);
    }
}
 
源代码10 项目: buffer_bci   文件: AbstractMouseHandlerFX.java
/**
 * Returns <code>true</code> if the specified mouse event has modifier
 * keys that match this handler.
 * 
 * @param e  the mouse event (<code>null</code> not permitted).
 * 
 * @return A boolean. 
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码11 项目: jfreechart-fx   文件: AbstractMouseHandlerFX.java
/**
 * Returns {@code true} if the specified mouse event has modifier
 * keys that match this handler.
 * 
 * @param e  the mouse event ({@code null} not permitted).
 * 
 * @return A boolean. 
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码12 项目: TAcharting   文件: TaAbstractMouseHandlerFX.java
/**
 * Returns {@code true} if the specified mouse event has modifier
 * keys that match this handler.
 *
 * @param e  the mouse event ({@code null} not permitted).
 *
 * @return A boolean.
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码13 项目: ccu-historian   文件: AbstractMouseHandlerFX.java
/**
 * Returns <code>true</code> if the specified mouse event has modifier
 * keys that match this handler.
 * 
 * @param e  the mouse event (<code>null</code> not permitted).
 * 
 * @return A boolean. 
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码14 项目: devcoretalk   文件: ClickableBitcoinAddress.java
@FXML
protected void requestMoney(MouseEvent event) {
    if (event.getButton() == MouseButton.SECONDARY || (event.getButton() == MouseButton.PRIMARY && event.isMetaDown())) {
        // User right clicked or the Mac equivalent. Show the context menu.
        addressMenu.show(addressLabel, event.getScreenX(), event.getScreenY());
    } else {
        // User left clicked.
        try {
            Desktop.getDesktop().browse(URI.create(uri()));
        } catch (IOException e) {
            GuiUtils.informationalAlert("Opening wallet app failed", "Perhaps you don't have one installed?");
        }
    }
}
 
源代码15 项目: SIMVA-SoS   文件: AbstractMouseHandlerFX.java
/**
 * Returns <code>true</code> if the specified mouse event has modifier
 * keys that match this handler.
 * 
 * @param e  the mouse event (<code>null</code> not permitted).
 * 
 * @return A boolean. 
 */
@Override
public boolean hasMatchingModifiers(MouseEvent e) {
    boolean b = true;
    b = b && (this.altKey == e.isAltDown());
    b = b && (this.ctrlKey == e.isControlDown());
    b = b && (this.metaKey == e.isMetaDown());
    b = b && (this.shiftKey == e.isShiftDown());
    return b;
}
 
源代码16 项目: chart-fx   文件: MouseEventsHelper.java
public static boolean isOnlyCtrlModifierDown(final MouseEvent event) {
    return event.isControlDown() && !event.isAltDown() && !event.isMetaDown() && !event.isShiftDown();
}
 
源代码17 项目: scenic-view   文件: DragSupport.java
private boolean isModifierCorrect(MouseEvent t, KeyCode keyCode) {
    return (keyCode != KeyCode.ALT ^ t.isAltDown())
            && (keyCode != KeyCode.CONTROL ^ t.isControlDown())
            && (keyCode != KeyCode.SHIFT ^ t.isShiftDown())
            && (keyCode != KeyCode.META ^ t.isMetaDown());
}
 
源代码18 项目: marathonv5   文件: RFXTreeTableView.java
@Override
protected void mouseClicked(MouseEvent me) {
    if (me.isControlDown() || me.isAltDown() || me.isMetaDown() || onCheckBox((Node) me.getTarget()))
        return;
    recorder.recordClick2(this, me, true);
}
 
源代码19 项目: marathonv5   文件: RFXTableView.java
@Override
protected void mouseClicked(MouseEvent me) {
    if (me.isControlDown() || me.isAltDown() || me.isMetaDown() || onCheckBox((Node) me.getTarget()))
        return;
    recorder.recordClick2(this, me, true);
}
 
源代码20 项目: marathonv5   文件: RFXListView.java
@Override
protected void mouseClicked(MouseEvent me) {
    if (me.isControlDown() || me.isAltDown() || me.isMetaDown() || onCheckBox((Node) me.getTarget()))
        return;
    recorder.recordClick2(this, me, true);
}