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


Java Shortcut类代码示例

本文整理汇总了Java中org.openstreetmap.josm.tools.Shortcut的典型用法代码示例。如果您正苦于以下问题:Java Shortcut类的具体用法?Java Shortcut怎么用?Java Shortcut使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ImproveWayAccuracyAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
/**
 * Constructs a new {@code ImproveWayAccuracyAction}.
 * @param mapFrame Map frame
 */
public ImproveWayAccuracyAction(MapFrame mapFrame) {
    super(tr("Improve Way"), "improveway",
            tr("Improve Way mode"),
            Shortcut.registerShortcut("mapmode:ImproveWay",
            tr("Mode: {0}", tr("Improve Way")),
            KeyEvent.VK_W, Shortcut.DIRECT), mapFrame, Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));

    helpersShortcut = Shortcut.registerShortcut("mapmode:enablewayaccuracyhelpers",
            tr("Mode: Enable way accuracy helpers"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);

    cursorSelect = ImageProvider.getCursor("normal", "mode");
    cursorSelectHover = ImageProvider.getCursor("hand", "mode");
    cursorImprove = ImageProvider.getCursor("crosshair", null);
    cursorImproveAdd = ImageProvider.getCursor("crosshair", "addnode");
    cursorImproveDelete = ImageProvider.getCursor("crosshair", "delete_node");
    cursorImproveAddLock = ImageProvider.getCursor("crosshair",
            "add_node_lock");
    cursorImproveLock = ImageProvider.getCursor("crosshair", "lock");
    ExpertToggleAction.addExpertModeChangeListener(this, true);
    Main.pref.addPreferenceChangeListener(this);
    readPreferences();
}
 
开发者ID:kolesar-andras,项目名称:josm-plugin-improve-way,代码行数:27,代码来源:ImproveWayAccuracyAction.java

示例2: createCustomizeStopAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
/**
 * Constructs a stop area customizing action.
 * @return the stop area customizing action
 */
public static CustomizeStopAction createCustomizeStopAction() 
{
	CustomizeStopAction action = new CustomizeStopAction(
            tr(CUSTOMIZE_STOP_ACTION_MENU_NAME), CUSTOMIZE_STOP_ACTION_ICON_NAME,
            tr(CUSTOMIZE_STOP_ACTION_MENU_TOOLTIP),
            Shortcut.registerShortcut("tools:customizestop", tr("Tool: {0}", tr(CUSTOMIZE_STOP_ACTION_MENU_NAME)),
            		KeyEvent.VK_U, Shortcut.DIRECT), true);
    action.putValue("help", ht("/Action/CustomizeStopAction"));
    return action;
}
 
开发者ID:bwr57,项目名称:CustomizePublicTransportStop,代码行数:15,代码来源:CustomizeStopAction.java

示例3: OrthogonalizeAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
/**
 * Constructs a new {@code OrthogonalizeAction}.
 */
public OrthogonalizeAction() {
    super(tr("Orthogonalize Shape"),
            "ortho",
            tr("Move nodes so all angles are 90 or 180 degrees"),
            Shortcut.registerShortcut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize Shape")),
                    KeyEvent.VK_Q,
                    Shortcut.DIRECT), true);
    putValue("help", ht("/Action/OrthogonalizeShape"));
}
 
开发者ID:stefanocudini,项目名称:orthogonalize-js,代码行数:13,代码来源:OrthogonalizeAction.josm.java

示例4: Undo

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
/**
 * Constructor
 */
public Undo() {
    super(tr("Orthogonalize Shape / Undo"), "ortho",
            tr("Undo orthogonalization for certain nodes"),
            Shortcut.registerShortcut("tools:orthogonalizeUndo", tr("Tool: {0}", tr("Orthogonalize Shape / Undo")),
                    KeyEvent.VK_Q,
                    Shortcut.SHIFT),
            true, "action/orthogonalize/undo", true);
}
 
开发者ID:stefanocudini,项目名称:orthogonalize-js,代码行数:12,代码来源:OrthogonalizeAction.josm.java

示例5: ReverseTerraceAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
public ReverseTerraceAction() {
    super(tr("Reverse a terrace"),
        "reverse_terrace",
        tr("Reverses house numbers on a terrace."),
        Shortcut.registerShortcut("tools:ReverseTerrace",
                tr("Tool: {0}", tr("Reverse a Terrace")),
                KeyEvent.VK_V, Shortcut.ALT_CTRL_SHIFT),
                    true);
}
 
开发者ID:derickr,项目名称:josm-plugin-uberterrace,代码行数:10,代码来源:ReverseTerraceAction.java

示例6: TerracerAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
public TerracerAction() {
    super(tr("Terrace a building"), "terrace",
            tr("Creates individual buildings from a long building."),
            Shortcut.registerShortcut("tools:Terracer", tr("Tool: {0}",
                    tr("Terrace a building")), KeyEvent.VK_T,
                    Shortcut.SHIFT), true);
}
 
开发者ID:derickr,项目名称:josm-plugin-uberterrace,代码行数:8,代码来源:TerracerAction.java

示例7: ConnectNodesAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
public ConnectNodesAction() {
	super(tr("Ways routing between nodes"), "dzik",
			tr("Select and split ways beetween selected nodes"), Shortcut
					.registerShortcut("tools:easyrouting",
							tr("Tool: {0}", tr("EasyRouting")),
							KeyEvent.VK_B, Shortcut.ALT), true, true);
}
 
开发者ID:ztmtoosm,项目名称:easy-routes,代码行数:8,代码来源:ConnectNodesAction.java

示例8: ColorAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
public ColorAction() {
    super(tr("Color "), "dialogs/Color.png", tr("Choose or set a color for objects."),
            Shortcut.registerShortcut("tools:Color", tr("Tool: {0}", tr("Color Plugin")), KeyEvent.VK_Y, Shortcut.CTRL_SHIFT),
            true, "Color", true);
}
 
开发者ID:andreimaneasa,项目名称:ColorPlugin,代码行数:6,代码来源:ColorAction.java

示例9: CustomizeStopAction

import org.openstreetmap.josm.tools.Shortcut; //导入依赖的package包/类
/**
 * Constructor of stop area customizing action
 * @param name Name of action in josm menu
 * @param iconName Name of icon file for josm menu
 * @param tooltip Tooltip of action in josm menu
 * @param shortcut Short key of action on josm
 * @param registerInToolbar Flag of registration in josm menu
 */
protected CustomizeStopAction(String name, String iconName, String tooltip,
           Shortcut shortcut, boolean registerInToolbar) 
{
       super(name, iconName, tooltip, shortcut, registerInToolbar);
   }
 
开发者ID:bwr57,项目名称:CustomizePublicTransportStop,代码行数:14,代码来源:CustomizeStopAction.java


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