Esempio n. 1
0
    /**
     * Construct a full screen action.
     *
     * @param description A string that describes the action. Spaces are permitted, each word is
     *     usually capitalized.
     */
    public FullScreenAction(String description) {
      super(description);

      // Load the image by using the absolute path to the gif.
      // Using a relative location should work, but it does not.
      // Use the resource locator of the class.
      // For more information, see
      // jdk1.3/docs/guide/resources/resources.html
      GUIUtilities.addIcons(
          this,
          new String[][] {
            {"/ptolemy/vergil/basic/img/fullscreen.gif", GUIUtilities.LARGE_ICON},
            {"/ptolemy/vergil/basic/img/fullscreen_o.gif", GUIUtilities.ROLLOVER_ICON},
            {"/ptolemy/vergil/basic/img/fullscreen_ov.gif", GUIUtilities.ROLLOVER_SELECTED_ICON},
            {"/ptolemy/vergil/basic/img/fullscreen_on.gif", GUIUtilities.SELECTED_ICON}
          });

      putValue("tooltip", description);

      putValue(GUIUtilities.MNEMONIC_KEY, Integer.valueOf(KeyEvent.VK_S));
    }