| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| MenuCommandElement |
|
| 0.0;0 |
| 1 | /* | |
| 2 | * Copyright 2004-2008 the Seasar Foundation and the Others. | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
| 13 | * either express or implied. See the License for the specific language | |
| 14 | * governing permissions and limitations under the License. | |
| 15 | */ | |
| 16 | package org.seasar.uruma.rcp.configuration.elements; | |
| 17 | ||
| 18 | import org.seasar.uruma.annotation.ConfigurationAttribute; | |
| 19 | import org.seasar.uruma.rcp.configuration.ConfigurationElement; | |
| 20 | import org.seasar.uruma.util.AssertionUtil; | |
| 21 | ||
| 22 | /** | |
| 23 | * <code>command</code> 要素のための {@link ConfigurationElement} です。<br /> | |
| 24 | * | |
| 25 | * @author y-komori <a | |
| 26 | * href="http://help.eclipse.org/help33/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_menus.html#e.command">command</a> | |
| 27 | */ | |
| 28 | public class MenuCommandElement extends AbstractConfigurationElementContainer { | |
| 29 | /** | |
| 30 | * 要素名です。<br /> | |
| 31 | */ | |
| 32 | public static final String ELEMENT_NAME = "command"; | |
| 33 | ||
| 34 | /** | |
| 35 | * プッシュメニューを表すスタイル文字列です。<br /> | |
| 36 | */ | |
| 37 | public static final String STYLE_PUSH = "push"; | |
| 38 | ||
| 39 | /** | |
| 40 | * ラジオメニューを表すスタイル文字列です。<br /> | |
| 41 | */ | |
| 42 | public static final String STYLE_RADIO = "radio"; | |
| 43 | ||
| 44 | /** | |
| 45 | * トグルメニューを表すスタイル文字列です。<br /> | |
| 46 | */ | |
| 47 | public static final String STYLE_TOGGLE = "toggle"; | |
| 48 | ||
| 49 | /** | |
| 50 | * プルダウンメニューを表すスタイル文字列です。<br /> | |
| 51 | */ | |
| 52 | public static final String STYLE_PULLDOWN = "pulldown"; | |
| 53 | ||
| 54 | /** | |
| 55 | * 対応するコマンドの ID です。<br /> | |
| 56 | */ | |
| 57 | @ConfigurationAttribute(required = true) | |
| 58 | public String commandId; | |
| 59 | ||
| 60 | /** | |
| 61 | * コマンド ID です。<br /> | |
| 62 | */ | |
| 63 | @ConfigurationAttribute | |
| 64 | public String id; | |
| 65 | ||
| 66 | /** | |
| 67 | * ニーモニックです。<br /> | |
| 68 | */ | |
| 69 | @ConfigurationAttribute | |
| 70 | public String mnemonic; | |
| 71 | ||
| 72 | /** | |
| 73 | * アイコンのパスです。<br /> | |
| 74 | */ | |
| 75 | @ConfigurationAttribute | |
| 76 | public String icon; | |
| 77 | ||
| 78 | /** | |
| 79 | * ディスエーブル状態のアイコンパスです。<br /> | |
| 80 | */ | |
| 81 | @ConfigurationAttribute | |
| 82 | public String disabledIcon; | |
| 83 | ||
| 84 | /** | |
| 85 | * ホバー状態のアイコンパスです。<br /> | |
| 86 | */ | |
| 87 | @ConfigurationAttribute | |
| 88 | public String hoverIcon; | |
| 89 | ||
| 90 | /** | |
| 91 | * ラベルです。<br /> | |
| 92 | */ | |
| 93 | @ConfigurationAttribute | |
| 94 | public String label; | |
| 95 | ||
| 96 | /** | |
| 97 | * ツールチップテキストです。<br /> | |
| 98 | */ | |
| 99 | @ConfigurationAttribute | |
| 100 | public String tooltip; | |
| 101 | ||
| 102 | /** | |
| 103 | * ヘルプコンテクスト ID です。<br /> | |
| 104 | */ | |
| 105 | @ConfigurationAttribute | |
| 106 | public String helpContextId; | |
| 107 | ||
| 108 | /** | |
| 109 | * スタイルです。<br /> | |
| 110 | */ | |
| 111 | @ConfigurationAttribute | |
| 112 | public String style; | |
| 113 | ||
| 114 | /** | |
| 115 | * {@link MenuCommandElement} を構築します。<br /> | |
| 116 | * | |
| 117 | * @param commandId | |
| 118 | * コマンド ID | |
| 119 | */ | |
| 120 | public MenuCommandElement(final String commandId) { | |
| 121 | 0 | super(); |
| 122 | 0 | AssertionUtil.assertNotNull("commandId", commandId); |
| 123 | 0 | this.commandId = commandId; |
| 124 | 0 | } |
| 125 | } |