亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? actionmanager.java

?? 一個很好實用的工作流OSWORKFLOW開發例子.有著非常優秀的靈活性.
?? JAVA
字號:
package com.opensymphony.workflow.designer;import java.net.URL;import java.util.*;import javax.swing.*;/** * Central repository for all Actions. * On startup, the application is responsible for registering all actions via the {@link #register(java.lang.String, javax.swing.Action)} * method. Once this is done, any action can be retrieved via the {@link #get(java.lang.String)} method. * The action manager will look for an actions.properties file in the same package, and will read all properties * specified in it for a given action. * <p> * The benefit of specifying actions in the external file is that actions themselves need not be aware of their textual or * graphic representation or key bindings. */public final class ActionManager{	private static final String OS_NAME_STRING = System.getProperty("os.name").replace(' ', '_').toLowerCase();  private static final String SMALL_GRAY_ICON = "smallGrayIcon";  private static final String DISPLAYED_MNEMONIC_INDEX = "mnemonicIndex";  private static final ActionManager INSTANCE = new ActionManager();  private final Map actions;  private ResourceBundle bundle;  private ActionManager()  {    this.actions = new HashMap(50);    bundle = ResourceBundle.getBundle("com.opensymphony.workflow.designer.actions");  }  /**   * Register an action.   * @param id The action id denotes the set of properties that will be read for the action   * @param action The action instance to bind to the specified id.   * @return The action, once it has been initialised. If the id is not specified in the   * properties file, then null is returned.   * @throws NullPointerException if the specified action is null   */  public static Action register(String id, Action action)  {    if(action == null)      throw new NullPointerException("Registered actions must not be null.");		boolean exists = ActionReader.readAndPutValues(action, INSTANCE.bundle, id);		if(!exists) return null;    Object oldValue = INSTANCE.actions.put(id, action);    if(oldValue != null)			System.out.println("WARNING: Duplicate action id: " + id);    return action;  }	/**	 * Remove a registered action	 * @param id the action id	 * @return The removed action, if it existed.	 */	public static Action deregister(String id)	{		return (Action)INSTANCE.actions.remove(id);	}  /**   * Get a previously registered action   * @param id The action id   * @return The action bound to the specified id, or null if no action is bound.   */  public static Action get(String id)  {    Action action = (Action)(INSTANCE.actions.get(id));    if(null == action)    {			System.out.println("ERROR: No action found for id: " + id);      return null;    }    return action;  }  /**   * Retrieves and answers the small icon for the given <code>id</code>.   */  public static Icon getIcon(String id)  {    Action action = get(id);    if(action == null)      return null;    return (Icon)action.getValue(Action.SMALL_ICON);  }  /**   * Alias a particular id to another one.   * This allows one action to be bound to multiple keys.   * @param newKey The new alias to bind to.   * @param oldKey The old id to bind to.   */	public static void alias(String newKey, String oldKey)	{		Object oldValue = INSTANCE.actions.put(newKey, INSTANCE.actions.get(oldKey));		if(oldValue != null)			System.out.println("WARNING: Duplicate action id: " + newKey);	}  private static class ActionReader  {    private static final String LABEL = "label";    private static final char MNEMONIC_MARKER = '&';    private static final String DOT_STRING = "...";    private static final String SHORT_DESCRIPTION = "tooltip";    private static final String LONG_DESCRIPTION = "helptext";    private static final String ICON = "icon";    private static final String GRAY_ICON = ICON + ".gray";    private static final String ACCELERATOR = "accelerator";		private static final String COMMAND = "command";		private String id;		private String name;		private Integer mnemonic;		private Integer aMnemonicIndex;		private String shortDescription;		private String longDescription;		private ImageIcon icon;		private ImageIcon grayIcon;		private KeyStroke accelerator;		private String command;		private boolean exists = true;    /**     * Reads properties for <code>id</code> in <code>bundle</code>.     */    static void readValues(ResourceBundle bundle, String id)    {      new ActionReader(bundle, id);    }    /**     * Reads properties for <code>id</code> in <code>bundle</code> and     * sets the approriate values in the given <code>action</code>.     */		static boolean readAndPutValues(Action action, ResourceBundle bundle, String id)    {      ActionReader reader = new ActionReader(bundle, id);			if(!reader.actionExists()) return false;      reader.putValues(action);			return true;    }    private ActionReader(ResourceBundle bundle, String id)    {			String iconPath = getString(bundle, id + '.' + ICON, null);			if(getString(bundle, id + "." + LABEL, null) == null && iconPath == null)			{				exists = false;				return;			}      this.id = id;      String nameWithMnemonic = getString(bundle, id + "." + LABEL, id);      int index = mnemonicIndex(nameWithMnemonic);      name = stripName(nameWithMnemonic, index);      mnemonic = stripMnemonic(nameWithMnemonic, index);      aMnemonicIndex = new Integer(index);      shortDescription = getString(bundle, id + '.' + SHORT_DESCRIPTION, defaultShortDescription(name));      longDescription = getString(bundle, id + '.' + LONG_DESCRIPTION, name);			URL iconURL = iconPath != null ? getClass().getClassLoader().getResource(iconPath) : null;			if(iconURL == null && iconPath != null)			{				System.out.println("WARNING Invalid icon " + iconPath + " specified in actions.properties for action '" + name + "'");				icon = null;			}			else			{				icon = (iconPath == null) ? null : new ImageIcon(iconURL);			}      String grayIconPath = getString(bundle, id + '.' + GRAY_ICON, null);      grayIcon = (grayIconPath == null) ? null : new ImageIcon(getClass().getClassLoader().getResource(grayIconPath));			String shortcut = getString(bundle, id + '.' + ACCELERATOR + '.' + OS_NAME_STRING, null);			if(shortcut == null)			{				shortcut = getString(bundle, id + '.' + ACCELERATOR, null);			}      accelerator = getKeyStroke(shortcut);			command = getString(bundle, id + '.' + COMMAND, null);		}		public boolean actionExists()		{			return exists;    }    /**     * Put the ActionReader's properties as values in the Action.     */    private void putValues(Action action)    {      action.putValue(Action.NAME, name);      action.putValue(Action.SHORT_DESCRIPTION, shortDescription);      action.putValue(Action.LONG_DESCRIPTION, longDescription);			if(icon != null)        action.putValue(Action.SMALL_ICON, icon);			if(grayIcon != null)        action.putValue(ActionManager.SMALL_GRAY_ICON, grayIcon);			if(accelerator != null)        action.putValue(Action.ACCELERATOR_KEY, accelerator);			if(mnemonic != null)      action.putValue(Action.MNEMONIC_KEY, mnemonic);			if(command != null)				action.putValue(Action.ACTION_COMMAND_KEY, command);      action.putValue(ActionManager.DISPLAYED_MNEMONIC_INDEX, aMnemonicIndex);    }    private int mnemonicIndex(String nameWithMnemonic)    {      return nameWithMnemonic.indexOf(MNEMONIC_MARKER);    }    private String stripName(String nameWithMnemonic, int mnemonicIndex)    {      return mnemonicIndex == -1 ? nameWithMnemonic : nameWithMnemonic.substring(0, mnemonicIndex) + nameWithMnemonic.substring(mnemonicIndex + 1);    }    private Integer stripMnemonic(String nameWithMnemonic, int mnemonicIndex)    {      return mnemonicIndex == -1 ? null : new Integer(nameWithMnemonic.charAt(mnemonicIndex + 1));    }    private String defaultShortDescription(String nameWithDots)    {      return nameWithDots.endsWith(DOT_STRING) ? (nameWithDots.substring(0, nameWithDots.length() - DOT_STRING.length())) : nameWithDots;    }		private KeyStroke getKeyStroke(String accelerator)    {			if(accelerator == null)      {        return null;      }      else      {				KeyStroke keyStroke = KeyStroke.getKeyStroke(accelerator);        if(keyStroke == null)					System.out.println("WARNING: Action " + id + " has an invalid accelerator " + accelerator);        return keyStroke;      }    }    private String getString(ResourceBundle bundle, String key, String defaultString)    {      try      {        return bundle.getString(key);      }      catch(MissingResourceException e)      {        return defaultString;      }    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕在线不卡视频| 日本不卡在线视频| 欧美欧美午夜aⅴ在线观看| 成人av中文字幕| 99麻豆久久久国产精品免费| 成人动漫一区二区在线| 成人免费视频国产在线观看| 国产不卡在线一区| 国产99精品国产| 成人av网站在线观看免费| 高清久久久久久| www.日韩精品| 欧美日韩日日骚| 在线不卡一区二区| 亚洲精品在线免费观看视频| 亚洲日本在线a| 玉足女爽爽91| www.亚洲精品| 国产精品拍天天在线| 免费观看成人av| 久久精品欧美一区二区三区不卡| 国产精品日韩成人| a美女胸又www黄视频久久| 欧美在线观看你懂的| 热久久久久久久| 午夜精品久久久久久久| 精品一区二区三区免费视频| 国产精品狼人久久影院观看方式| 一本一道综合狠狠老| 激情小说亚洲一区| 中文字幕中文字幕一区二区| 欧美午夜精品理论片a级按摩| 捆绑调教一区二区三区| 亚洲人成网站精品片在线观看| 成人av网站大全| 精品乱人伦小说| 亚洲一区二区三区爽爽爽爽爽| 久久精品国产久精国产| 91精品午夜视频| 亚洲一区二区视频| 成人福利视频网站| 777a∨成人精品桃花网| 亚洲女同一区二区| 99久久精品国产观看| 2023国产一二三区日本精品2022| 亚洲精品一二三区| 9人人澡人人爽人人精品| 久久精品亚洲乱码伦伦中文| 狠狠色丁香婷婷综合久久片| 亚洲精品在线电影| 美女一区二区三区在线观看| 欧美一区二区三级| 七七婷婷婷婷精品国产| 精品国产乱码久久久久久1区2区 | 日本道精品一区二区三区| 欧美电视剧在线观看完整版| 国产一区二区三区精品视频| 久久久99精品免费观看不卡| 一本一道久久a久久精品| 久久看人人爽人人| 色综合天天综合狠狠| 粉嫩蜜臀av国产精品网站| 国产一区在线观看麻豆| 春色校园综合激情亚洲| 国产精品一卡二| 国产精品久久国产精麻豆99网站| 日本成人在线不卡视频| 欧美在线影院一区二区| av成人免费在线观看| 成人中文字幕在线| 一区二区三区美女视频| 欧美极品另类videosde| 久久久久免费观看| 久久看人人爽人人| 亚洲国产精品精华液ab| 精品国产免费一区二区三区四区 | 亚洲卡通动漫在线| 亚洲丝袜精品丝袜在线| 欧美日韩中文字幕一区二区| 国产一区二区福利| 七七婷婷婷婷精品国产| 亚洲人成在线观看一区二区| 欧美mv和日韩mv国产网站| 99久久er热在这里只有精品15| 一区二区在线观看不卡| 久久久不卡影院| 欧美日韩国产高清一区二区三区 | 亚洲精品成人悠悠色影视| 3d动漫精品啪啪一区二区竹菊| 精品一区二区av| 亚洲一区二区成人在线观看| xnxx国产精品| 欧美一二三在线| 69成人精品免费视频| 欧美视频一区在线观看| 91丨porny丨蝌蚪视频| 成人蜜臀av电影| 北岛玲一区二区三区四区| 老司机精品视频一区二区三区| 亚洲国产美国国产综合一区二区| 中文成人av在线| 欧美国产1区2区| 日韩午夜在线播放| 日韩一区二区电影在线| 国产精品伦理在线| 一区二区三区在线播| 黄色小说综合网站| 欧美日韩亚州综合| 天天亚洲美女在线视频| 色婷婷亚洲综合| 色先锋资源久久综合| 欧美性xxxxxx少妇| 色综合天天做天天爱| 日韩视频中午一区| 国产成人av一区二区三区在线观看| 欧美激情资源网| 精品一区二区三区免费观看 | 欧美亚洲综合久久| 精品国产一区二区精华| 国产精品青草综合久久久久99| 一区二区高清免费观看影视大全| 免费观看30秒视频久久| 成人av免费在线观看| 97se狠狠狠综合亚洲狠狠| 精品国产凹凸成av人导航| 久久久久久久综合| 午夜电影一区二区三区| 久久精品国产成人一区二区三区 | 欧美电视剧免费观看| 精品成人一区二区三区四区| 中文字幕乱码一区二区免费| 日韩中文字幕一区二区三区| 国产高清精品网站| 欧美色中文字幕| 亚洲国产成人私人影院tom| 日韩高清一区在线| av在线这里只有精品| 日韩一卡二卡三卡国产欧美| 国产精品乱码妇女bbbb| 久久成人麻豆午夜电影| 欧美情侣在线播放| 亚洲日韩欧美一区二区在线| 国产成人综合视频| 日韩一级精品视频在线观看| 国产精品传媒视频| 岛国一区二区在线观看| 久久久久久日产精品| 免费看黄色91| 91成人在线精品| 日本不卡视频在线| 日韩精品在线一区| 成人激情小说网站| 韩国三级中文字幕hd久久精品| 欧美性猛交xxxx黑人交| 国产一区不卡在线| 婷婷国产v国产偷v亚洲高清| 亚洲午夜免费福利视频| 亚洲黄色性网站| 久久久av毛片精品| av一区二区久久| 日本一区二区三级电影在线观看 | 亚洲女与黑人做爰| 欧美国产1区2区| 亚洲h在线观看| 国产乱子轮精品视频| 国产精品三级视频| 国产专区欧美精品| 久久九九99视频| 粉嫩绯色av一区二区在线观看| 日韩亚洲欧美中文三级| 日韩一区中文字幕| 丝袜美腿高跟呻吟高潮一区| 久久久久国产免费免费| 久久福利视频一区二区| 亚洲国产婷婷综合在线精品| 亚洲欧美另类图片小说| 国产精品三级在线观看| 亚洲国产精品ⅴa在线观看| 久久综合九色综合久久久精品综合 | 日韩视频不卡中文| 激情综合五月天| 亚洲视频一二三区| 日韩一卡二卡三卡国产欧美| 粉嫩一区二区三区在线看| 天天色天天爱天天射综合| 亚洲欧美一区二区不卡| 久久久国产一区二区三区四区小说 | 麻豆视频观看网址久久| 亚洲制服丝袜在线| 1区2区3区欧美| 中文字幕va一区二区三区| 日韩一区二区三区四区| 欧美一区二区三区在线看| 欧美性受xxxx黑人xyx性爽| 欧美在线三级电影| 在线观看欧美精品| 6080日韩午夜伦伦午夜伦| 欧美一三区三区四区免费在线看| 欧美日韩一卡二卡三卡| 国产99久久久久久免费看农村|