Package javax.swing

Examples of javax.swing.ImageIcon


     */
    private TableCellRenderer getHeaderRenderer() {
      // Return a table renderer that displays the icon matching current sort
      return new TableCellRenderer() {
          private TableCellRenderer headerRenderer;       
          private ImageIcon ascendingSortIcon = new ImageIcon(getClass().getResource("resources/ascending.png"));
          private ImageIcon descendingSortIcon = new ImageIcon(getClass().getResource("resources/descending.png"));
         
          public Component getTableCellRendererComponent(JTable table,
               Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            if (this.headerRenderer == null) {
              this.headerRenderer = table.getTableHeader().getDefaultRenderer();
View Full Code Here


    if (image == null || image.getImageURL() == null)
  return;

    outputCellStart(image);

    ImageIcon icon = image.getImageIcon(); // For width and height
    String url = image.getImageURL().toString();
    if (url.startsWith("file:"))
  url = url.substring(5);

    // Make an alt attribute from the URL
    String alt = url;
    int pos = alt.lastIndexOf("/");
    if (pos != -1)
  alt = alt.substring(pos + 1);

    out.print("<img src=\"" + StringUtils.escapeHTML(url) + "\" alt=\""
        + StringUtils.escapeHTML(alt)
        + "\" width=\"" + icon.getIconWidth()
        + "\" height=\"" + icon.getIconHeight()
        + "\">");
    outputCellEnd();
}
View Full Code Here

  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 {
        icon = UiUtilities.createChannelIcon(mChannel.getIcon());
      }
    } else {
      icon = UiUtilities.createChannelIcon(mChannel.getDefaultIcon());
View Full Code Here

    g.setColor(mColor);
    g.fillRect(1, 1, 23, 13);
    g.setColor(Color.BLACK);
    g.drawRect(0, 0, 24, 14);
   
    ImageIcon icon = new ImageIcon(img);

    return icon;
  }
View Full Code Here

    g2.setColor(new Color(255,0,0,0));
    g2.fillRect(0, 0, 22, 22);
   
    g2.setColor(getForeground());
    g2.drawLine(0, 11, 22, 11);
    setIcon(new ImageIcon(image));
  }
View Full Code Here

    mPluginInfoDlgMI.addActionListener(this);
    new MenuHelpTextAdapter(mPluginInfoDlgMI, mLocalizer.msg(
        "menuinfo.pluginInfoDlg",
        "Describes the Plugin functionality of TV-Browser."), mLabel);

    mAboutMI = createMenuItem("menuitem.about", "About", new ImageIcon(
        "imgs/tvbrowser16.png"), false);
    mAboutMI.addActionListener(this);
    new MenuHelpTextAdapter(mAboutMI, mLocalizer.msg("menuinfo.about", ""),
        mLabel);
View Full Code Here

        .getDataServices();
    for (TvDataServiceProxy service : services) {
      final String license = service.getInfo().getLicense();
      if (license != null) {
        String name = service.getInfo().getName();
        JMenuItem item = new JMenuItem(name, new ImageIcon(
            "imgs/tvbrowser16.png"));
        setMnemonic(item);
        item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            LicenseBox box = new LicenseBox(mMainFrame, license, false);
View Full Code Here

    super(dialog, true);
    setTitle(pluginInfo.getName());
    mPluginInfo = pluginInfo;

    if (icon == null) {
      icon = new ImageIcon("imgs/Jar16.gif");
    }

    mPluginIcon = icon;
    initGui();
  }
View Full Code Here

          } else {
            add((JComponent)editorView);
          }
        }
      };
    furnitureFrame.setIconImage(new ImageIcon(
        FurnitureLibraryEditor.class.getResource("resources/frameIcon.png")).getImage());
    furnitureFrame.setLocationByPlatform(true);
    furnitureFrame.pack();
    furnitureFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    furnitureFrame.setVisible(true);
View Full Code Here

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

TOP

Related Classes of javax.swing.ImageIcon

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.