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