Examples of Icon


Examples of javax.swing.Icon

    mPluginsMenu.add(mPluginManagerMI);
  }

  private JMenuItem createMenuItem(ActionMenu menu) {
    JMenuItem result;
    Icon icon = (Icon) menu.getAction().getValue(Action.SMALL_ICON);
    if (icon != null) {
      // resize any icon that is not a channel icon
      if (icon.getIconWidth() != 42 || icon.getIconHeight() != 22) {
        icon = new FixedSizeIcon(16, 16, icon);
      }
    }
    if (menu.hasSubItems()) {
      result = new ScrollableMenu(menu.getTitle());
View Full Code Here

Examples of javax.swing.Icon

    // Use an uneditable editor pane to let user select text in dialog
    JEditorPane messagePane = new JEditorPane("text/html", message);
    messagePane.setOpaque(false);
    messagePane.setEditable(false);
    String title = this.preferences.getLocalizedString(EditorPane.class, "about.title");
    Icon   icon  = new ImageIcon(EditorPane.class.getResource(
        this.preferences.getLocalizedString(EditorPane.class, "about.icon")));
    JOptionPane.showMessageDialog(SwingUtilities.getRootPane(this),
        messagePane, title, JOptionPane.INFORMATION_MESSAGE, icon);
  }
View Full Code Here

Examples of javax.swing.Icon

    }

    JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

    if (value instanceof PluginProxy || value instanceof InternalPluginProxyIf || value instanceof TvDataServiceProxy) {
      Icon iconValue = null;
      String nameValue = null;
      String descValue = null;
      boolean isActivated = true;

      if (value instanceof PluginProxy) {
View Full Code Here

Examples of javax.swing.Icon

      return new ToolTipWithIcon(null, null);
    }
    boolean showIcon = false;
    boolean showText = false;
    JToolTip tip;
    Icon channelIcon = mChannel.getIcon();
    if (channelIcon != null && channelIcon instanceof ImageIcon) {
      Icon shownIcon = this.getIcon();
      if (shownIcon != null && (channelIcon.getIconHeight() > shownIcon.getIconHeight() || channelIcon.getIconWidth() > shownIcon.getIconWidth())) {
        showIcon = true;
      }
    }
    if (showIcon) {
      tip = new ToolTipWithIcon((ImageIcon) channelIcon);
View Full Code Here

Examples of javax.swing.Icon

  @Override
  public Point getToolTipLocation(MouseEvent event) {
    FontMetrics metrics = this.getFontMetrics(this.getFont());
    int stringWidth = SwingUtilities.computeStringWidth(metrics, this.getText());
    int x = 0;
    Icon icon = this.getIcon();

    int iconWidth = getIcon().getIconWidth();
    if (mChannel.getIcon() != null) {
      iconWidth = mChannel.getIcon().getIconWidth();
    }

    int iconHeight = getIcon().getIconHeight();
    if (mChannel.getIcon() != null) {
      iconHeight = mChannel.getIcon().getIconHeight();
    }

    if (icon != null) {
      x = (this.getWidth() - stringWidth - this.getIconTextGap() - icon.getIconWidth()) / 2;
      if (x < 0) {
        x = 0;
      }
      x += (icon.getIconWidth() - iconWidth) / 2;
    }
    int y = (this.getHeight() - iconHeight - 2) / 2;
    return new Point(x, y);
  }
View Full Code Here

Examples of javax.swing.Icon

          row, hasFocus);

      if (leaf) {
        Object userO = ((DefaultMutableTreeNode)value).getUserObject();
        if (userO instanceof JTreeLeafDetails) {
          Icon i = ((JTreeLeafDetails)userO).getIcon();
          if (i != null) {
            setIcon(i);
          }       
        }
      }
View Full Code Here

Examples of javax.swing.Icon

    if (PLUGIN_PERSPECTIVES.size() > 0) {

      // add the main perspective first
      String titleM = m_mainKFPerspective.getPerspectiveTitle();
      Icon icon = m_mainKFPerspective.getPerspectiveIcon();
      JToggleButton tBut = new JToggleButton(titleM, icon, true);
      tBut.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          KFPerspective current = (KFPerspective)m_perspectiveHolder.getComponent(0);
          current.setActive(false);
View Full Code Here

Examples of javax.swing.Icon

      KFPerspective toAdd = PERSPECTIVE_CACHE.get(c);
      if (toAdd instanceof JComponent) {
        toAdd.setLoaded(true);
        m_perspectives.add(toAdd);
        String titleM = toAdd.getPerspectiveTitle();
        Icon icon = toAdd.getPerspectiveIcon();
        JToggleButton tBut = null;
        if (icon != null) {
          tBut = new JToggleButton(titleM, icon, false);
        } else {
          tBut = new JToggleButton(titleM, false);
View Full Code Here

Examples of javax.swing.Icon

      if(url == null)
        smileys[i - 1] = new SmileyComponent(null, smileyTexts[i - 1], smileyNames[i - 1]);
      else
      {
        Icon icon = new ImageIcon(url);
        smileys[i - 1] = new SmileyComponent(icon, smileyTexts[i - 1], smileyNames[i - 1]);
      }
    }

    return smileys;
View Full Code Here

Examples of javax.swing.Icon

    iconNames[1] = rect;
    iconNames[2] = din;
  }
 
  private Icon getIcon(int type) {
    Icon ret = icons[type];
    if (ret != null) {
      return ret;
    } else {
      String iconName = iconNames[type];
      if (iconName == null) {
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.