当前位置: 首页>>代码示例>>Java>>正文


Java MouseEvent.isMetaDown方法代码示例

本文整理汇总了Java中javafx.scene.input.MouseEvent.isMetaDown方法的典型用法代码示例。如果您正苦于以下问题:Java MouseEvent.isMetaDown方法的具体用法?Java MouseEvent.isMetaDown怎么用?Java MouseEvent.isMetaDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.input.MouseEvent的用法示例。


在下文中一共展示了MouseEvent.isMetaDown方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildModifiersText

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
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;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:21,代码来源:WSRecorder.java

示例2: mouseEventGetModifiersExText

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
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);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:31,代码来源:OSFXUtils.java

示例3: getModifiersExText

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
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();
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:33,代码来源:EventQueueDeviceTest.java

示例4: mouseEventGetModifiersExText

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
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);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:30,代码来源:JavaFxRecorderHook.java

示例5: mousePressed

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:RFXComponent.java

示例6: requestMoney

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
@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?");
        }
    }
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:15,代码来源:ClickableBitcoinAddress.java

示例7: hasMatchingModifiers

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:jfree,项目名称:jfreechart-fx,代码行数:18,代码来源:AbstractMouseHandlerFX.java

示例8: mouseClicked

import javafx.scene.input.MouseEvent; //导入方法依赖的package包/类
@Override protected void mouseClicked(MouseEvent me) {
    if (me.isControlDown() || me.isAltDown() || me.isMetaDown() || onCheckBox((Node) me.getTarget()))
        return;
    recorder.recordClick2(this, me, true);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:6,代码来源:RFXTreeTableView.java


注:本文中的javafx.scene.input.MouseEvent.isMetaDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。