Examples of Icon


Examples of javax.swing.Icon

  @Override
  public final void paintIcon(InstancePainter painter) {
    Graphics g = painter.getGraphics();
    g.setColor(Color.black);
    if (painter.getGateShape() == AppPreferences.SHAPE_RECTANGULAR) {
      Icon iconRect = getIconRectangular();
      if (iconRect != null) {
        iconRect.paintIcon(painter.getDestination(), g, 2, 2);
      } else {
        paintIconRectangular(painter);
      }
    } else if (painter.getGateShape() == AppPreferences.SHAPE_DIN40700) {
      Icon iconDin = getIconDin40700();
      if (iconDin != null) {
        iconDin.paintIcon(painter.getDestination(), g, 2, 2);
      } else {
        paintIconRectangular(painter);
      }
    } else {
      Icon iconShaped = getIconShaped();
      if (iconShaped != null) {
        iconShaped.paintIcon(painter.getDestination(), g, 2, 2);
      } else {
        paintIconShaped(painter);
      }
    }
  }
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

  }

  @Override
  public void paintIcon(InstancePainter painter) {
    Graphics g = painter.getGraphics();
    Icon icon = isInverter ? ICON_INVERTER : ICON_BUFFER;
    if (icon != null) {
      icon.paintIcon(painter.getDestination(), g, 2, 2);
    } else {
      int x = isInverter ? 0 : 2;
      g.setColor(Color.BLACK);
      int[] xp = new int[] { x + 15, x + 1, x + 1, x + 15 };
      int[] yp = new int[] { 10,     3,     17,    10 };
View Full Code Here

Examples of javax.swing.Icon

        mLog.log(Level.SEVERE, "Can't execute AppleScript\n\n" + script, e);
      }
    } else {
      final Notification notification = new Notification(mApplication,
          mNotificationProgram, title, desc, program.getID());
      Icon icon = program.getChannel().getIcon();
      if (icon != null && icon instanceof ImageIcon) {
        try {
          File file = File.createTempFile("tvbrowser", ".png");
          file.deleteOnExit();
          if (IOUtilities.writeImageIconToFile((ImageIcon) icon, "png", file)) {
View Full Code Here

Examples of javax.swing.Icon

              container.getId(), TimeZone.getTimeZone("UTC"), group.getCountry(),
              group.getCopyright(), group.getUrl(), group, null, category);

      if (StringUtils.isNotEmpty(container.getIconUrl())) {
        try {
          Icon icon = iconLoader.getIcon(container.getId(), container.getIconUrl());
          channel.setDefaultIcon(icon);
        } catch (IOException e) {
          mLog.severe("Unable to load icon for "
                  + container.getId() + " on URL "
                  + container.getIconUrl());
View Full Code Here

Examples of javax.swing.Icon

        colCount = 2;
      }
      int iconHeight = 0;
      int currentX = x;
      for (int i = 0; i < mIconArr.length; i++) {
        Icon icon = mIconArr[i];
        boolean nextColumn = (colCount == 1) || (i % 2 == 0);
        if (nextColumn) {
          currentX = x;
          iconHeight = icon.getIconHeight();
        }
        else {
          iconHeight = Math.max(iconHeight, icon.getIconHeight());
        }
        if ((y + iconHeight) < mHeight) {
          icon.paintIcon(this, grp, currentX, y);
        }
        if (nextColumn) {
          currentX += icon.getIconWidth() + ICON_DISTANCE_X;
        }
        if (!nextColumn || (colCount == 1)) {
          y += iconHeight + ICON_DISTANCE_Y;
        }
      }
View Full Code Here

Examples of javax.swing.Icon

   *
   * @param collapseIcon
   *          collapse icon for this disclosure triangle container
   */
  public void setCollapseIcon(final Icon collapseIcon) {
    Icon oldCollapseIcon = this.collapseIcon;
    this.collapseIcon = collapseIcon;
    firePropertyChange("collapseIcon", oldCollapseIcon, this.collapseIcon);
    if (!collapsed) {
      label.setIcon(this.collapseIcon);
    }
View Full Code Here

Examples of javax.swing.Icon

   *
   * @param expandIcon
   *          expand icon for this disclosure triangle container
   */
  public void setExpandIcon(final Icon expandIcon) {
    Icon oldExpandIcon = this.expandIcon;
    this.expandIcon = expandIcon;
    firePropertyChange("expandIcon", oldExpandIcon, this.expandIcon);
    if (collapsed) {
      label.setIcon(this.expandIcon);
    }
View Full Code Here

Examples of javax.swing.Icon

    for (PluginProxy plugin : PluginProxyManager.getInstance().getActivatedPlugins()) {
      final String iconText = plugin.getProgramTableIconText();
      if (iconText != null) {
        Icon[] icons = plugin.getProgramTableIcons(PluginManagerImpl.getInstance().getExampleProgram());
        Icon icon;
        if (icons != null && icons.length > 0) {
          icon = icons[0];
        }
        else {
          icon = null;
View Full Code Here

Examples of javax.swing.Icon

      }
    }

    // Found closest match, resize it
    if (closestMatch != null) {
      Icon closestIcon = getImageFromTheme(closestMatch);
      return (ImageIcon) UiUtilities.scaleIcon(closestIcon, icon.getSize(), icon.getSize());
    }
   
    return 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.