JavaTM 2 Platform
Std. Ed. v1.4.2

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. 
javax.swing.colorchooser Contains classes and interfaces used by the JColorChooser component. 
javax.swing.filechooser Contains classes and interfaces used by the JFileChooser component. 
javax.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities. 
javax.swing.plaf.basic Provides user interface objects built according to the Basic look and feel. 
javax.swing.plaf.metal Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel. 
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components. 
javax.swing.text.html Provides the class HTMLEditorKit and supporting classes for creating HTML text editors. 
javax.swing.tree Provides classes and interfaces for dealing with javax.swing.JTree
 

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 JOptionPane.getIcon()
          Returns the icon this pane displays.
 Icon JTabbedPane.getIconAt(int index)
          Returns the tab icon at index.
 Icon JTabbedPane.getDisabledIconAt(int index)
          Returns the tab disabled icon at index.
 Icon JFileChooser.getIcon(File f)
          Returns the icon for this file or type of file, depending on the system.
 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 UIDefaults.getIcon(Object key)
          If the value of key is an Icon return it, otherwise return null.
 Icon UIDefaults.getIcon(Object key, Locale l)
          If the value of key for the given Locale is an Icon return it, otherwise return null.
static Icon UIManager.getIcon(Object key)
          Returns an Icon from the defaults table.
static Icon UIManager.getIcon(Object key, Locale l)
          Returns an Icon from the defaults table that is appropriate for the given locale.
 Icon TransferHandler.getVisualRepresentation(Transferable t)
          Returns an object that establishes the look of a transfer.
 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
 void JTextPane.insertIcon(Icon g)
          Inserts an icon into the document as a replacement for the currently selected content.
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.
static Object JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, 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(Component parentComponent, Object message, String title, int messageType, Icon icon)
          Brings up a dialog displaying a message, specifying all parameters.
static int JOptionPane.showConfirmDialog(Component parentComponent, Object message, 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(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, 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(Component parentComponent, Object message, String title, int messageType, Icon icon)
          Brings up an internal dialog panel displaying a message, specifying all parameters.
static int JOptionPane.showInternalConfirmDialog(Component parentComponent, Object message, 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(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, 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 Object JOptionPane.showInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, 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.
 void JOptionPane.setIcon(Icon newIcon)
          Sets the icon to display.
 void JTabbedPane.insertTab(String title, Icon icon, Component component, 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(String title, Icon icon, Component component, String tip)
          Adds a component and tip represented by a title and/or icon, either of which can be null.
 void JTabbedPane.addTab(String title, Icon icon, 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.
 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 String SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, 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.
static String SwingUtilities.layoutCompoundLabel(FontMetrics fm, 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.
protected  void JMenuItem.init(String text, Icon icon)
          Initializes the menu item with the specified text and 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(String text, Icon icon)
           
 

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

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(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.
 

Uses of Icon in javax.swing.colorchooser
 

Methods in javax.swing.colorchooser that return Icon
abstract  Icon AbstractColorChooserPanel.getSmallDisplayIcon()
          Returns the small display icon for the panel.
abstract  Icon AbstractColorChooserPanel.getLargeDisplayIcon()
          Returns the large display icon for the panel.
 

Uses of Icon in javax.swing.filechooser
 

Methods in javax.swing.filechooser that return Icon
 Icon FileSystemView.getSystemIcon(File f)
          Icon for a file, directory, or folder as it would be displayed in a system file browser.
 Icon FileView.getIcon(File f)
          The icon that represents this file in the JFileChooser.
 

Uses of Icon in javax.swing.plaf
 

Classes in javax.swing.plaf that implement Icon
 class IconUIResource
           
 

Constructors in javax.swing.plaf with parameters of type Icon
BorderUIResource.MatteBorderUIResource(int top, int left, int bottom, int right, Icon tileIcon)
           
BorderUIResource.MatteBorderUIResource(Icon tileIcon)
           
IconUIResource(Icon delegate)
          Creates a UIResource icon object which wraps an existing Icon instance.
 

Uses of Icon in javax.swing.plaf.basic
 

Fields in javax.swing.plaf.basic declared as Icon
protected  Icon BasicTreeUI.collapsedIcon
           
protected  Icon BasicTreeUI.expandedIcon
           
protected  Icon BasicMenuItemUI.arrowIcon
           
protected  Icon BasicMenuItemUI.checkIcon
           
protected  Icon BasicInternalFrameTitlePane.maxIcon
           
protected  Icon BasicInternalFrameTitlePane.minIcon
           
protected  Icon BasicInternalFrameTitlePane.iconIcon
           
protected  Icon BasicInternalFrameTitlePane.closeIcon
           
protected  Icon BasicFileChooserUI.directoryIcon
           
protected  Icon BasicFileChooserUI.fileIcon
           
protected  Icon BasicFileChooserUI.computerIcon
           
protected  Icon BasicFileChooserUI.hardDriveIcon
           
protected  Icon BasicFileChooserUI.floppyDriveIcon
           
protected  Icon BasicFileChooserUI.newFolderIcon
           
protected  Icon BasicFileChooserUI.upFolderIcon
           
protected  Icon BasicFileChooserUI.homeFolderIcon
           
protected  Icon BasicFileChooserUI.listViewIcon
           
protected  Icon BasicFileChooserUI.detailsViewIcon
           
protected  Icon BasicRadioButtonUI.icon
           
 

Methods in javax.swing.plaf.basic that return Icon
 Icon BasicTreeUI.getExpandedIcon()
           
 Icon BasicTreeUI.getCollapsedIcon()
           
protected  Icon BasicTabbedPaneUI.getIconForTab(int tabIndex)
           
protected  Icon BasicOptionPaneUI.getIcon()
          Returns the icon from the JOptionPane the receiver is providing the look and feel for, or the default icon as returned from getDefaultIcon.
protected  Icon BasicOptionPaneUI.getIconForType(int messageType)
          Returns the icon to use for the passed in type.
static Icon BasicIconFactory.getMenuItemCheckIcon()
           
static Icon BasicIconFactory.getMenuItemArrowIcon()
           
static Icon BasicIconFactory.getMenuArrowIcon()
           
static Icon BasicIconFactory.getCheckBoxIcon()
           
static Icon BasicIconFactory.getRadioButtonIcon()
           
static Icon BasicIconFactory.getCheckBoxMenuItemIcon()
           
static Icon BasicIconFactory.getRadioButtonMenuItemIcon()
           
static Icon BasicIconFactory.createEmptyFrameIcon()
           
 Icon BasicFileChooserUI.BasicFileView.getCachedIcon(File f)
           
 Icon BasicFileChooserUI.BasicFileView.getIcon(File f)
           
 Icon BasicRadioButtonUI.getDefaultIcon()
           
 

Methods in javax.swing.plaf.basic with parameters of type Icon
 void BasicTreeUI.setExpandedIcon(Icon newG)
           
 void BasicTreeUI.setCollapsedIcon(Icon newG)
           
protected  void BasicTreeUI.drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
           
protected  void BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
           
protected  Dimension BasicMenuItemUI.getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
           
protected  void BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
           
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
          Forwards the call to SwingUtilities.layoutCompoundLabel().
 void BasicFileChooserUI.BasicFileView.cacheIcon(File f, Icon i)
           
 

Uses of Icon in javax.swing.plaf.metal
 

Classes in javax.swing.plaf.metal that implement Icon
 class MetalCheckBoxIcon
          CheckboxIcon implementation for OrganicCheckBoxUI
 class MetalComboBoxIcon
          This utility class draws the horizontal bars which indicate a MetalComboBox
static class MetalIconFactory.FileIcon16
           Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class MetalIconFactory.FolderIcon16
           Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class MetalIconFactory.PaletteCloseIcon
          Defines an icon for Palette close
static class MetalIconFactory.TreeControlIcon
           Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class MetalIconFactory.TreeFolderIcon
           Warning: Serialized objects of this class will not be compatible with future Swing releases.
static class MetalIconFactory.TreeLeafIcon
           
 

Fields in javax.swing.plaf.metal declared as Icon
protected static Icon MetalSliderUI.horizThumbIcon
           
protected static Icon MetalSliderUI.vertThumbIcon
           
protected  Icon MetalInternalFrameTitlePane.paletteCloseIcon
           
protected  Icon MetalComboBoxButton.comboIcon
           
 

Methods in javax.swing.plaf.metal that return Icon
static Icon MetalIconFactory.getFileChooserDetailViewIcon()
           
static Icon MetalIconFactory.getFileChooserHomeFolderIcon()
           
static Icon MetalIconFactory.getFileChooserListViewIcon()
           
static Icon MetalIconFactory.getFileChooserNewFolderIcon()
           
static Icon MetalIconFactory.getFileChooserUpFolderIcon()
           
static Icon MetalIconFactory.getInternalFrameAltMaximizeIcon(int size)
           
static Icon MetalIconFactory.getInternalFrameCloseIcon(int size)
           
static Icon MetalIconFactory.getInternalFrameDefaultMenuIcon()
           
static Icon MetalIconFactory.getInternalFrameMaximizeIcon(int size)
           
static Icon MetalIconFactory.getInternalFrameMinimizeIcon(int size)
           
static Icon MetalIconFactory.getRadioButtonIcon()
           
static Icon MetalIconFactory.getCheckBoxIcon()
          Returns a checkbox icon.
static Icon MetalIconFactory.getTreeComputerIcon()
           
static Icon MetalIconFactory.getTreeFloppyDriveIcon()
           
static Icon MetalIconFactory.getTreeFolderIcon()
           
static Icon MetalIconFactory.getTreeHardDriveIcon()
           
static Icon MetalIconFactory.getTreeLeafIcon()
           
static Icon MetalIconFactory.getTreeControlIcon(boolean isCollapsed)
           
static Icon MetalIconFactory.getMenuArrowIcon()
           
static Icon MetalIconFactory.getMenuItemCheckIcon()
          Returns an icon to be used by JCheckBoxMenuItem.
static Icon MetalIconFactory.getMenuItemArrowIcon()
           
static Icon MetalIconFactory.getCheckBoxMenuItemIcon()
           
static Icon MetalIconFactory.getRadioButtonMenuItemIcon()
           
static Icon MetalIconFactory.getHorizontalSliderThumbIcon()
           
static Icon MetalIconFactory.getVerticalSliderThumbIcon()
           
 Icon MetalComboBoxButton.getComboIcon()
           
 

Methods in javax.swing.plaf.metal with parameters of type Icon
 void MetalComboBoxButton.setComboIcon(Icon i)
           
 

Constructors in javax.swing.plaf.metal with parameters of type Icon
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
           
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)
           
 

Uses of Icon in javax.swing.text
 

Methods in javax.swing.text that return Icon
static Icon StyleConstants.getIcon(AttributeSet a)
          Gets the icon setting from the attribute list.
 

Methods in javax.swing.text with parameters of type Icon
static void StyleConstants.setIcon(MutableAttributeSet a, Icon c)
          Sets the icon attribute.
 

Uses of Icon in javax.swing.text.html
 

Methods in javax.swing.text.html that return Icon
 Icon ImageView.getNoImageIcon()
          Returns the icon to use if the image couldn't be found.
 Icon ImageView.getLoadingImageIcon()
          Returns the icon to use while in the process of loading the image.
 

Uses of Icon in javax.swing.tree
 

Fields in javax.swing.tree declared as Icon
protected  Icon DefaultTreeCellRenderer.closedIcon
          Icon used to show non-leaf nodes that aren't expanded.
protected  Icon DefaultTreeCellRenderer.leafIcon
          Icon used to show leaf nodes.
protected  Icon DefaultTreeCellRenderer.openIcon
          Icon used to show non-leaf nodes that are expanded.
protected  Icon DefaultTreeCellEditor.editingIcon
          Icon to use when editing.
 

Methods in javax.swing.tree that return Icon
 Icon DefaultTreeCellRenderer.getDefaultOpenIcon()
          Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are expanded.
 Icon DefaultTreeCellRenderer.getDefaultClosedIcon()
          Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded.
 Icon DefaultTreeCellRenderer.getDefaultLeafIcon()
          Returns the default icon, for the current laf, that is used to represent leaf nodes.
 Icon DefaultTreeCellRenderer.getOpenIcon()
          Returns the icon used to represent non-leaf nodes that are expanded.
 Icon DefaultTreeCellRenderer.getClosedIcon()
          Returns the icon used to represent non-leaf nodes that are not expanded.
 Icon DefaultTreeCellRenderer.getLeafIcon()
          Returns the icon used to represent leaf nodes.
 

Methods in javax.swing.tree with parameters of type Icon
 void DefaultTreeCellRenderer.setOpenIcon(Icon newIcon)
          Sets the icon used to represent non-leaf nodes that are expanded.
 void DefaultTreeCellRenderer.setClosedIcon(Icon newIcon)
          Sets the icon used to represent non-leaf nodes that are not expanded.
 void DefaultTreeCellRenderer.setLeafIcon(Icon newIcon)
          Sets the icon used to represent leaf nodes.
 


JavaTM 2 Platform
Std. Ed. v1.4.2

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 2003, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.