Package javax.swing

Examples of javax.swing.Icon


      }
    });

    add(new JScrollPane(mExclusionsList), cc.xywh(2, 1, 1, 5));

    Icon newIcon = TVBrowserIcons.newIcon(TVBrowserIcons.SIZE_SMALL);
    Icon editIcon = TVBrowserIcons.edit(TVBrowserIcons.SIZE_SMALL);
    Icon deleteIcon = TVBrowserIcons.delete(TVBrowserIcons.SIZE_SMALL);

    mNewExclusionBtn = new JButton(newIcon);
    mEditExclusionBtn = new JButton(editIcon);
    mDeleteExclusionBtn = new JButton(deleteIcon);
View Full Code Here


          }
        }

        // get icon from node
        if (value instanceof Node) {
          Icon icon = ((Node)value).getIcon();

          if (icon != null) {
            label.setIcon(icon);
          }
        }
View Full Code Here

  public Icon getIcon() {
    if ((mSettingsTab != null) && (mSettingsTab.getIcon() != null)) {
      return mSettingsTab.getIcon();
    }

    Icon icon = mPlugin.getPluginIcon();
    if (icon != null
        && icon instanceof ImageIcon
        && ((ImageIcon) icon).toString().equals(
            AbstractPluginProxy.DEFAULT_PLUGIN_ICON_NAME)) {
      return null;
View Full Code Here

    }
  }

  public Icon getIcon() {
    try {
      Icon icon = mSettingsTab.getIcon();
      if (icon != null) {
        return new FixedSizeIcon(16, 16, icon);
      }
      return icon;
    }catch(Throwable t) {
View Full Code Here

      };

      mSeparatorAction.putValue(ToolBar.ACTION_ID_KEY, "#separator");
      mSeparatorAction.putValue(ToolBar.ACTION_TYPE_KEY, ToolBar.SEPARATOR);
      mSeparatorAction.putValue(Action.NAME, "Separator");
      mSeparatorAction.putValue(Plugin.BIG_ICON, new Icon() {

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

      };

      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

      };

      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

  /**
   * 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

        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

          + "</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

TOP

Related Classes of javax.swing.Icon

Copyright © 2018 www.massapicom. 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.