Examples of Icon


Examples of javax.swing.Icon

      };

      mGlueAction.putValue(ToolBar.ACTION_ID_KEY, "#glue");
      mGlueAction.putValue(ToolBar.ACTION_TYPE_KEY, ToolBar.GLUE);
      mGlueAction.putValue(Action.NAME, mLocalizer.msg("flexibleSpace","Flexible Space"));
      mGlueAction.putValue(Plugin.BIG_ICON, new Icon() {

        public int getIconHeight() {
          return 22;
        }
View Full Code Here

Examples of javax.swing.Icon

      };

      mSpaceAction.putValue(ToolBar.ACTION_ID_KEY, "#space");
      mSpaceAction.putValue(ToolBar.ACTION_TYPE_KEY, ToolBar.SPACE);
      mSpaceAction.putValue(Action.NAME, mLocalizer.msg("space","Space"));
      mSpaceAction.putValue(Plugin.BIG_ICON, new Icon() {

        public int getIconHeight() {
          return 22;
        }
View Full Code Here

Examples of javax.swing.Icon

  /**
   * Create a User-Icon
   * @return Icon
   */
  private Icon createUserIcon() {
    Icon icon;
    if ((mIconFile != null) && (mIconFile.exists())) {
      Image img = ImageUtilities.createImageAsynchronous(mIconFile.getAbsolutePath());
      if (img != null) {
        icon = UiUtilities.createChannelIcon(new ImageIcon(img));
      } else {
View Full Code Here

Examples of javax.swing.Icon

        ContextMenuIf menuIf = (ContextMenuIf) value;
        Program exampleProgram = Plugin.getPluginManager().getExampleProgram();

        // Get the context menu item text
        StringBuilder text = new StringBuilder();
        Icon icon = null;
        // Action[] actionArr = plugin.getContextMenuActions(exampleProgram);
        ActionMenu actionMenu = menuIf.getContextMenuActions(exampleProgram);
        if (actionMenu != null) {
          Action action = actionMenu.getAction();
          if (action != null) {
View Full Code Here

Examples of javax.swing.Icon

          + "</div></html>");
      button.setBorder(new CompoundBorder(BorderFactory
          .createEmptyBorder(1, 1, 1, 1), BorderFactory.createEmptyBorder(1, 1,
          1, 1)));

      Icon icon = (Icon) action.getValue(Plugin.BIG_ICON);
      if (icon == null) {
        mLog.warning("Big icon missing for action " + action.getValue(Action.NAME));
        icon = (Icon) action.getValue(Action.SMALL_ICON);
      }
      if ((icon != null)
          && ((icon.getIconHeight() != TVBrowserIcons.SIZE_LARGE) || (icon.getIconWidth() != TVBrowserIcons.SIZE_LARGE))) {
        icon = UiUtilities.scaleIcon(icon, TVBrowserIcons.SIZE_LARGE, TVBrowserIcons.SIZE_LARGE);
      }
      button.setIcon(icon);
      button.setDisabledIcon(icon);
      button.setVerticalTextPosition(SwingConstants.BOTTOM);
View Full Code Here

Examples of javax.swing.Icon

  }

  private void addButtonProperties(final AbstractButton button,
      final Action action) {
    String tooltip = (String) action.getValue(Action.SHORT_DESCRIPTION);
    Icon icon = getIcon(action);
    String title = getTitle(action);

    button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        action.actionPerformed(new ActionEvent(action,ActionEvent.ACTION_PERFORMED,""));
View Full Code Here

Examples of javax.swing.Icon

    return null;
  }

  private Icon getIcon(Action action) {
    if ((mStyle & STYLE_ICON) == STYLE_ICON) {
      Icon icon;
      if (mIconSize == ICON_BIG) {
        icon = (Icon) action.getValue(Plugin.BIG_ICON);
        if (icon == null) {
          mLog.warning("Big icon missing for action " + action.getValue(Action.NAME));
          icon = (Icon) action.getValue(Action.SMALL_ICON);
        }
        if ((icon != null)
            && ((icon.getIconHeight() != TVBrowserIcons.SIZE_LARGE) || (icon.getIconWidth() != TVBrowserIcons.SIZE_LARGE))) {
          icon = UiUtilities.scaleIcon(icon, TVBrowserIcons.SIZE_LARGE, TVBrowserIcons.SIZE_LARGE);
        }

      } else {
        icon = (Icon) action.getValue(Action.SMALL_ICON);

        if ((icon != null)
            && ((icon.getIconHeight() != 16) || (icon.getIconWidth() != 16))) {
          icon = UiUtilities.scaleIcon(icon, 16, 16);
        }

      }
      return icon;
View Full Code Here

Examples of javax.swing.Icon

        ContextMenuIf menuIf = (ContextMenuIf) value;
        Program exampleProgram = Plugin.getPluginManager().getExampleProgram();

        // Get the context menu item text
        StringBuilder text = new StringBuilder();
        Icon icon = null;
        ActionMenu actionMenu = menuIf.getContextMenuActions(exampleProgram);
        if (actionMenu != null) {
          Action action = actionMenu.getAction();
          if (action != null) {
            text.append((String) action.getValue(Action.NAME));
View Full Code Here

Examples of javax.swing.Icon

    updateChannelItems();
    updateTimeItems();

    mLicenseMenu = createLicenseMenuItems();

    Icon urlHelpImg = IconLoader.getInstance().getIconFromTheme("apps",
        "help-browser", 16);
    Icon urlBrowserImg = IconLoader.getInstance().getIconFromTheme("apps",
        "internet-web-browser", 16);

    mInstallPluginsMI = createMenuItem("menuitem.installPlugins",
        "Install/Update Plugins", urlBrowserImg, true);
    mInstallPluginsMI.addActionListener(this);
View Full Code Here

Examples of javax.swing.Icon

    });
    return item;
  }

  private JMenuItem createChannelMenuItem(final Channel channel) {
    Icon icon = null;
    if (Settings.propShowChannelIconsInChannellist.getBoolean()) {
      icon = UiUtilities.createChannelIcon(channel.getIcon());
    }
    JMenuItem item = new JMenuItem(channel.getName(), icon);
    item.addActionListener(new ActionListener() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.