Package javax.swing

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


    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

      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

      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

    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

  @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

      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

  }

  @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

        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

              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

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.