View Javadoc

1   /**
2    * This program is free software; you can redistribute it and/or modify
3    * it under the terms of the GNU General Public License version 2 as 
4    * published by the Free Software Foundation;
5    */
6   
7   package net.curre.prefcount.gui.type;
8   
9   /**
10   * This interface provides a common way to access text and
11   * shortcut attributes of a UI item (i.e. button, menu item, etc.).
12   * <p/>
13   * Created date: May 8, 2008
14   *
15   * @author Yevgeny Nyden
16   */
17  public interface UIItem {
18  
19    /**
20     * Gets the item text resource key.
21     *
22     * @return the item text resource key.
23     */
24    String getTextKey();
25  
26    /**
27     * Gets the item shortcut resource key.
28     *
29     * @return the item shortcut resource key or null if there
30     *         is no shortcut for this item.
31     */
32    String getShortcutKey();
33  
34    /**
35     * Gets the item shortcut index resource key. This is the
36     * index of the shortcut letter in the item's text string.
37     * Note, that "-1" indicates that the item's shortcut does
38     * not appear in the text string.
39     *
40     * @return the item shortcut index resource key or null
41     *         if there is no shortcut for this item.
42     */
43    String getShortcutIndexKey();
44  
45  }