Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-209 (Final Approval Ballot)

Uses of Interface
javax.swing.Icon

Packages that use Icon
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms. 
javax.swing.border Provides classes and interface for drawing specialized borders around a Swing component. 
 

Uses of Icon in javax.swing
 

Classes in javax.swing that implement Icon
 class ImageIcon
          An implementation of the Icon interface that paints Icons from Images.
 

Fields in javax.swing declared as Icon
protected  Icon JOptionPane.icon
          Icon used in pane.
protected  Icon JInternalFrame.frameIcon
          The icon shown in the top-left corner of this internal frame.
 

Methods in javax.swing that return Icon
 Icon JTabbedPane.getIconAt(int index)
          Returns the tab icon at index.
 Icon JTabbedPane.getDisabledIconAt(int index)
          Returns the tab disabled icon at index.
 Icon JOptionPane.getIcon()
          Returns the icon this pane displays.
 Icon JLabel.getIcon()
          Returns the graphic image (glyph, icon) that the label displays.
 Icon JLabel.getDisabledIcon()
          Returns the value of the disabledIcon property if it's been set, If it hasn't been set and the value of the icon property is an ImageIcon, we compute a "grayed out" version of the icon and update the disabledIcon property with that.
 Icon JInternalFrame.getFrameIcon()
          Returns the image displayed in the title bar of this internal frame (usually in the top-left corner).
 Icon AbstractButton.getIcon()
          Returns the default icon.
 Icon AbstractButton.getPressedIcon()
          Returns the pressed icon for the button.
 Icon AbstractButton.getSelectedIcon()
          Returns the selected icon for the button.
 Icon AbstractButton.getRolloverIcon()
          Returns the rollover icon for the button.
 Icon AbstractButton.getRolloverSelectedIcon()
          Returns the rollover selection icon for the button.
 Icon AbstractButton.getDisabledIcon()
          Returns the icon used by the button when it's disabled.
 Icon AbstractButton.getDisabledSelectedIcon()
          Returns the icon used by the button when it's disabled and selected.
 

Methods in javax.swing with parameters of type Icon
static java.lang.String SwingUtilities.layoutCompoundLabel(java.awt.FontMetrics fm, java.lang.String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
          Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.
 void JTextPane.insertIcon(Icon g)
          Inserts an icon into the document as a replacement for the currently selected content.
 void JTabbedPane.insertTab(java.lang.String title, Icon icon, java.awt.Component component, java.lang.String tip, int index)
          Inserts a component, at index, represented by a title and/or icon, either of which may be null.
 void JTabbedPane.addTab(java.lang.String title, Icon icon, java.awt.Component component, java.lang.String tip)
          Adds a component and tip represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(java.lang.String title, Icon icon, java.awt.Component component)
          Adds a component represented by a title and/or icon, either of which can be null.
 void JTabbedPane.setIconAt(int index, Icon icon)
          Sets the icon at index to icon which can be null.
 void JTabbedPane.setDisabledIconAt(int index, Icon disabledIcon)
          Sets the disabled icon at index to icon which can be null.
 int JTabbedPane.indexOfTab(Icon icon)
          Returns the first tab index with a given icon, or -1 if no tab has this icon.
static java.lang.Object JOptionPane.showInputDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int messageType, Icon icon, java.lang.Object[] selectionValues, java.lang.Object initialSelectionValue)
          Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.
static void JOptionPane.showMessageDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int messageType, Icon icon)
          Brings up a dialog displaying a message, specifying all parameters.
static int JOptionPane.showConfirmDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int optionType, int messageType, Icon icon)
          Brings up a dialog with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showOptionDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int optionType, int messageType, Icon icon, java.lang.Object[] options, java.lang.Object initialValue)
          Brings up a dialog with a specified icon, where the initial choice is determined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static void JOptionPane.showInternalMessageDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int messageType, Icon icon)
          Brings up an internal dialog panel displaying a message, specifying all parameters.
static int JOptionPane.showInternalConfirmDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int optionType, int messageType, Icon icon)
          Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the optionType parameter.
static int JOptionPane.showInternalOptionDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int optionType, int messageType, Icon icon, java.lang.Object[] options, java.lang.Object initialValue)
          Brings up an internal dialog panel with a specified icon, where the initial choice is determined by the initialValue parameter and the number of choices is determined by the optionType parameter.
static java.lang.Object JOptionPane.showInternalInputDialog(java.awt.Component parentComponent, java.lang.Object message, java.lang.String title, int messageType, Icon icon, java.lang.Object[] selectionValues, java.lang.Object initialSelectionValue)
          Prompts the user for input in a blocking internal dialog where the initial selection, possible selections, and all other options can be specified.
protected  void JMenuItem.init(java.lang.String text, Icon icon)
          Initializes the menu item with the specified text and icon.
 void JLabel.setIcon(Icon icon)
          Defines the icon this component will display.
 void JLabel.setDisabledIcon(Icon disabledIcon)
          Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)).
 void JInternalFrame.setFrameIcon(Icon icon)
          Sets an image to be displayed in the titlebar of this internal frame (usually in the top-left corner).
static MatteBorder BorderFactory.createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
          Creates a matte-look border that consists of multiple tiles of a specified icon.
 void AbstractButton.setIcon(Icon defaultIcon)
          Sets the button's default icon.
 void AbstractButton.setPressedIcon(Icon pressedIcon)
          Sets the pressed icon for the button.
 void AbstractButton.setSelectedIcon(Icon selectedIcon)
          Sets the selected icon for the button.
 void AbstractButton.setRolloverIcon(Icon rolloverIcon)
          Sets the rollover icon for the button.
 void AbstractButton.setRolloverSelectedIcon(Icon rolloverSelectedIcon)
          Sets the rollover selected icon for the button.
 void AbstractButton.setDisabledIcon(Icon disabledIcon)
          Sets the disabled icon for the button.
 void AbstractButton.setDisabledSelectedIcon(Icon disabledSelectedIcon)
          Sets the disabled selection icon for the button.
protected  void AbstractButton.init(java.lang.String text, Icon icon)
           
 

Constructors in javax.swing with parameters of type Icon
JToggleButton(Icon icon)
          Creates an initially unselected toggle button with the specified image but no text.
JToggleButton(Icon icon, boolean selected)
          Creates a toggle button with the specified image and selection state, but no text.
JToggleButton(java.lang.String text, Icon icon)
          Creates a toggle button that has the specified text and image, and that is initially unselected.
JToggleButton(java.lang.String text, Icon icon, boolean selected)
          Creates a toggle button with the specified text, image, and selection state.
JRadioButton(Icon icon)
          Creates an initially unselected radio button with the specified image but no text.
JRadioButton(Icon icon, boolean selected)
          Creates a radio button with the specified image and selection state, but no text.
JRadioButton(java.lang.String text, Icon icon)
          Creates a radio button that has the specified text and image, and that is initially unselected.
JRadioButton(java.lang.String text, Icon icon, boolean selected)
          Creates a radio button that has the specified text, image, and selection state.
JRadioButtonMenuItem(Icon icon)
          Creates a JRadioButtonMenuItem with an icon.
JRadioButtonMenuItem(java.lang.String text, Icon icon)
          Creates a radio button menu item with the specified text and Icon.
JRadioButtonMenuItem(Icon icon, boolean selected)
          Creates a radio button menu item with the specified image and selection state, but no text.
JRadioButtonMenuItem(java.lang.String text, Icon icon, boolean selected)
          Creates a radio button menu item that has the specified text, image, and selection state.
JOptionPane(java.lang.Object message, int messageType, int optionType, Icon icon)
          Creates an instance of JOptionPane to display a message with the specified message type, options, and icon.
JOptionPane(java.lang.Object message, int messageType, int optionType, Icon icon, java.lang.Object[] options)
          Creates an instance of JOptionPane to display a message with the specified message type, icon, and options.
JOptionPane(java.lang.Object message, int messageType, int optionType, Icon icon, java.lang.Object[] options, java.lang.Object initialValue)
          Creates an instance of JOptionPane to display a message with the specified message type, icon, and options, with the initially-selected option specified.
JMenuItem(Icon icon)
          Creates a JMenuItem with the specified icon.
JMenuItem(java.lang.String text, Icon icon)
          Creates a JMenuItem with the specified text and icon.
JLabel(java.lang.String text, Icon icon, int horizontalAlignment)
          Creates a JLabel instance with the specified text, image, and horizontal alignment.
JLabel(Icon image, int horizontalAlignment)
          Creates a JLabel instance with the specified image and horizontal alignment.
JLabel(Icon image)
          Creates a JLabel instance with the specified image.
JCheckBox(Icon icon)
          Creates an initially unselected check box with an icon.
JCheckBox(Icon icon, boolean selected)
          Creates a check box with an icon and specifies whether or not it is initially selected.
JCheckBox(java.lang.String text, Icon icon)
          Creates an initially unselected check box with the specified text and icon.
JCheckBox(java.lang.String text, Icon icon, boolean selected)
          Creates a check box with text and icon, and specifies whether or not it is initially selected.
JButton(Icon icon)
          Creates a button with an icon.
JButton(java.lang.String text, Icon icon)
          Creates a button with initial text and an icon.
AbstractAction(java.lang.String name, Icon icon)
          Defines an Action object with the specified description string and a the specified icon.
JCheckBoxMenuItem(Icon icon)
          Creates an initially unselected check box menu item with an icon.
JCheckBoxMenuItem(java.lang.String text, Icon icon)
          Creates an initially unselected check box menu item with the specified text and icon.
JCheckBoxMenuItem(java.lang.String text, Icon icon, boolean b)
          Creates a check box menu item with the specified text, icon, and selection state.
 

Uses of Icon in javax.swing.border
 

Fields in javax.swing.border declared as Icon
protected  Icon MatteBorder.tileIcon
           
 

Methods in javax.swing.border that return Icon
 Icon MatteBorder.getTileIcon()
          Returns the icon used for tiling the border or null if a solid color is being used.
 

Constructors in javax.swing.border with parameters of type Icon
MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
          Creates a matte border with the specified insets and tile icon.
MatteBorder(java.awt.Insets borderInsets, Icon tileIcon)
          Creates a matte border with the specified insets and tile icon.
MatteBorder(Icon tileIcon)
          Creates a matte border with the specified tile icon.
 


JSR-209 (Final Approval Ballot)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 209 specification.