JavaTM 2 Platform
Std. Ed. v1.4.1

Uses of Class
java.awt.Graphics

Packages that use Graphics
java.awt Contains all of the classes for creating user interfaces and for painting graphics and images. 
java.awt.image Provides classes for creating and modifying images. 
java.awt.print Provides classes and interfaces for a general printing API. 
java.beans Contains classes related to developing beans -- components based on the JavaBeansTM architecture. 
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.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.plaf.multi Provides user interface objects that combine two or more look and feels. 
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 Graphics in java.awt
 

Subclasses of Graphics in java.awt
 class Graphics2D
          This Graphics2D class extends the Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
 

Methods in java.awt that return Graphics
abstract  Graphics PrintJob.getGraphics()
          Gets a Graphics object that will draw to the next page.
abstract  Graphics Image.getGraphics()
          Creates a graphics context for drawing to an off-screen image.
abstract  Graphics Graphics.create()
          Creates a new Graphics object that is a copy of this Graphics object.
 Graphics Graphics.create(int x, int y, int width, int height)
          Creates a new Graphics object based on this Graphics object, but with a new translation and clip area.
 Graphics Component.getGraphics()
          Creates a graphics context for this component.
 Graphics Component.FlipBufferStrategy.getDrawGraphics()
           
 Graphics Component.BltBufferStrategy.getDrawGraphics()
           
 

Methods in java.awt with parameters of type Graphics
 void Canvas.paint(Graphics g)
          Paints this canvas.
 void Canvas.update(Graphics g)
          Updates this canvas.
 void ScrollPane.printComponents(Graphics g)
          Prints the component in this scroll pane.
 LineMetrics FontMetrics.getLineMetrics(String str, Graphics context)
          Returns the LineMetrics object for the specified String in the specified Graphics context.
 LineMetrics FontMetrics.getLineMetrics(String str, int beginIndex, int limit, Graphics context)
          Returns the LineMetrics object for the specified String in the specified Graphics context.
 LineMetrics FontMetrics.getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context)
          Returns the LineMetrics object for the specified character array in the specified Graphics context.
 LineMetrics FontMetrics.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context)
          Returns the LineMetrics object for the specified CharacterIterator in the specified Graphics context.
 Rectangle2D FontMetrics.getStringBounds(String str, Graphics context)
          Returns the bounds of the specified String in the specified Graphics context.
 Rectangle2D FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context)
          Returns the bounds of the specified String in the specified Graphics context.
 Rectangle2D FontMetrics.getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)
          Returns the bounds of the specified array of characters in the specified Graphics context.
 Rectangle2D FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)
          Returns the bounds of the characters indexed in the specified CharacterIterator in the specified Graphics context.
 Rectangle2D FontMetrics.getMaxCharBounds(Graphics context)
          Returns the bounds for the character with the maximum bounds in the specified Graphics context.
 void Container.paint(Graphics g)
          Paints the container.
 void Container.update(Graphics g)
          Updates the container.
 void Container.print(Graphics g)
          Prints the container.
 void Container.paintComponents(Graphics g)
          Paints each of the components in this container.
 void Container.printComponents(Graphics g)
          Prints each of the components in this container.
 void Component.paint(Graphics g)
          Paints this component.
 void Component.update(Graphics g)
          Updates this component.
 void Component.paintAll(Graphics g)
          Paints this component and all of its subcomponents.
 void Component.print(Graphics g)
          Prints this component.
 void Component.printAll(Graphics g)
          Prints this component and all of its subcomponents.
 

Uses of Graphics in java.awt.image
 

Methods in java.awt.image that return Graphics
 Graphics BufferedImage.getGraphics()
          This method returns a Graphics2D, but is here for backwards compatibility.
 Graphics VolatileImage.getGraphics()
          This method returns a Graphics2D, but is here for backwards compatibility.
abstract  Graphics BufferStrategy.getDrawGraphics()
           
 

Uses of Graphics in java.awt.print
 

Methods in java.awt.print with parameters of type Graphics
 int Printable.print(Graphics graphics, PageFormat pageFormat, int pageIndex)
          Prints the page at the specified index into the specified Graphics context in the specified format.
 

Uses of Graphics in java.beans
 

Methods in java.beans with parameters of type Graphics
 void PropertyEditorSupport.paintValue(Graphics gfx, Rectangle box)
          Paint a representation of the value into a given area of screen real estate.
 void PropertyEditor.paintValue(Graphics gfx, Rectangle box)
          Paint a representation of the value into a given area of screen real estate.
 

Uses of Graphics in javax.swing
 

Subclasses of Graphics in javax.swing
 class DebugGraphics
          Graphics subclass supporting graphics debugging.
 

Methods in javax.swing that return Graphics
 Graphics DebugGraphics.create()
          Overrides Graphics.create to return a DebugGraphics object.
 Graphics DebugGraphics.create(int x, int y, int width, int height)
          Overrides Graphics.create to return a DebugGraphics object.
protected  Graphics JComponent.getComponentGraphics(Graphics g)
          Returns the graphics object used to paint this component.
 Graphics JComponent.getGraphics()
          Returns this component's graphics context, which lets you draw on a component.
 

Methods in javax.swing with parameters of type Graphics
protected  void JToolBar.paintBorder(Graphics g)
          Paints the tool bar's border if the borderPainted property is true.
protected  void JSplitPane.paintChildren(Graphics g)
          Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
protected  void JProgressBar.paintBorder(Graphics g)
          Paints the progress bar's border if the borderPainted property is true.
 void JApplet.update(Graphics g)
          Just calls paint(g).
 void JDialog.update(Graphics g)
          Calls paint(g).
 void ImageIcon.paintIcon(Component c, Graphics g, int x, int y)
          Paints the icon.
 void JViewport.paint(Graphics g)
          Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
protected  void JInternalFrame.paintComponent(Graphics g)
          Overridden to allow optimized painting when the internal frame is being dragged.
 void CellRendererPane.paint(Graphics g)
          Shouldn't be called.
 void CellRendererPane.update(Graphics g)
          Shouldn't be called.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
          Paint a cell renderer component c on graphics object g.
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
          Calls this.paintComponent(g, c, p, x, y, w, h, false).
 void CellRendererPane.paintComponent(Graphics g, Component c, Container p, Rectangle r)
          Calls this.paintComponent() with the rectangles x,y,width,height fields.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
          Paints a component c on an arbitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
          Paints a component c on an arbitrary graphics g in the specified rectangle, specifying a Rectangle object.
 void JWindow.update(Graphics g)
          Calls paint(g).
protected  void JPopupMenu.paintBorder(Graphics g)
          Paints the popup menu's border if the borderPainted property is true.
 void Icon.paintIcon(Component c, Graphics g, int x, int y)
          Draw the icon at the specified location.
protected  void AbstractButton.paintBorder(Graphics g)
          Paint the button's border if BorderPainted property is true and the button has a border.
 void JLayeredPane.paint(Graphics g)
          Paints this JLayeredPane within the specified graphics context.
protected  void JMenuBar.paintBorder(Graphics g)
          Paints the menubar's border if BorderPainted property is true.
protected  Graphics JComponent.getComponentGraphics(Graphics g)
          Returns the graphics object used to paint this component.
protected  void JComponent.paintComponent(Graphics g)
          Calls the UI delegate's paint method, if the UI delegate is non-null.
protected  void JComponent.paintChildren(Graphics g)
          Paints this component's children.
protected  void JComponent.paintBorder(Graphics g)
          Paints the component's border.
 void JComponent.update(Graphics g)
          Calls paint.
 void JComponent.paint(Graphics g)
          Invoked by Swing to draw components.
 void JComponent.printAll(Graphics g)
          Invoke this method to print the component.
 void JComponent.print(Graphics g)
          Invoke this method to print the component.
protected  void JComponent.printComponent(Graphics g)
          This is invoked during a printing operation.
protected  void JComponent.printChildren(Graphics g)
          Prints this component's children.
protected  void JComponent.printBorder(Graphics g)
          Prints the component's border.
 void JFrame.update(Graphics g)
          Just calls paint(g).
 

Constructors in javax.swing with parameters of type Graphics
DebugGraphics(Graphics graphics, JComponent component)
          Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
DebugGraphics(Graphics graphics)
          Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.
 

Uses of Graphics in javax.swing.border
 

Methods in javax.swing.border with parameters of type Graphics
 void SoftBevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 void EtchedBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 void MatteBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the matte border.
 void BevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
protected  void BevelBorder.paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
           
protected  void BevelBorder.paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
           
 void LineBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 void EmptyBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Does no drawing by default.
 void CompoundBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the compound border by painting the outside border with the specified position and size and then painting the inside border at the specified position and size offset by the insets of the outside border.
 void TitledBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 void AbstractBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          This default implementation does no painting.
 void Border.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 

Uses of Graphics in javax.swing.colorchooser
 

Methods in javax.swing.colorchooser with parameters of type Graphics
 void AbstractColorChooserPanel.paint(Graphics g)
          Draws the panel.
 

Uses of Graphics in javax.swing.plaf
 

Methods in javax.swing.plaf with parameters of type Graphics
 void BorderUIResource.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
abstract  void SplitPaneUI.finishedPaintingChildren(JSplitPane jc, Graphics g)
          Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
 void IconUIResource.paintIcon(Component c, Graphics g, int x, int y)
           
 void ComponentUI.paint(Graphics g, JComponent c)
          Paints the specified component appropriate for the look and feel.
 void ComponentUI.update(Graphics g, JComponent c)
          Notifies this UI delegate that it's time to paint the specified component.
 

Uses of Graphics in javax.swing.plaf.basic
 

Methods in javax.swing.plaf.basic with parameters of type Graphics
 void BasicTreeUI.paint(Graphics g, JComponent c)
           
protected  void BasicTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
          Paints the horizontal part of the leg.
protected  void BasicTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
          Paints the vertical part of the leg.
protected  void BasicTreeUI.paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
          Paints the expand (toggle) part of a row.
protected  void BasicTreeUI.paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
          Paints the renderer part of a row.
protected  void BasicTreeUI.paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
          Paints a vertical line.
protected  void BasicTreeUI.paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
          Paints a horizontal line.
protected  void BasicTreeUI.drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
           
protected  void BasicTreeUI.drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)
           
protected  void BasicTreeUI.drawDashedVerticalLine(Graphics g, int x, int y1, int y2)
           
 void BasicToolTipUI.paint(Graphics g, JComponent c)
           
 void BasicToolBarUI.DragWindow.paint(Graphics g)
           
 void BasicToolBarSeparatorUI.paint(Graphics g, JComponent c)
           
 void BasicTableUI.paint(Graphics g, JComponent c)
          Paint a representation of the table instance that was set in installUI().
 void BasicTableHeaderUI.paint(Graphics g, JComponent c)
           
 void BasicTabbedPaneUI.paint(Graphics g, JComponent c)
           
protected  void BasicTabbedPaneUI.paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
          Paints the tabs in the tab area.
protected  void BasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
           
protected  void BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
           
protected  void BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
           
protected  void BasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void BasicTabbedPaneUI.paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
          this function draws the border around each tab note that this function does now draw the background of the tab.
protected  void BasicTabbedPaneUI.paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
           
protected  void BasicTabbedPaneUI.paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
           
protected  void BasicTabbedPaneUI.paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void BasicTabbedPaneUI.paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void BasicTabbedPaneUI.paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void BasicTabbedPaneUI.paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
 void BasicSplitPaneUI.finishedPaintingChildren(JSplitPane jc, Graphics g)
          Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
 void BasicSplitPaneUI.paint(Graphics g, JComponent jc)
          Messaged to paint the look and feel.
 void BasicSplitPaneDivider.paint(Graphics g)
          Paints the divider.
 void BasicSliderUI.paint(Graphics g, JComponent c)
           
 void BasicSliderUI.paintFocus(Graphics g)
           
 void BasicSliderUI.paintTrack(Graphics g)
           
 void BasicSliderUI.paintTicks(Graphics g)
           
protected  void BasicSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void BasicSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void BasicSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void BasicSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
 void BasicSliderUI.paintLabels(Graphics g)
           
protected  void BasicSliderUI.paintHorizontalLabel(Graphics g, int value, Component label)
          Called for every label in the label table.
protected  void BasicSliderUI.paintVerticalLabel(Graphics g, int value, Component label)
          Called for every label in the label table.
 void BasicSliderUI.paintThumb(Graphics g)
           
 void BasicScrollPaneUI.paint(Graphics g, JComponent c)
           
 void BasicScrollBarUI.paint(Graphics g, JComponent c)
           
protected  void BasicScrollBarUI.paintDecreaseHighlight(Graphics g)
           
protected  void BasicScrollBarUI.paintIncreaseHighlight(Graphics g)
           
protected  void BasicScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
           
protected  void BasicScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
           
 void BasicProgressBarUI.paint(Graphics g, JComponent c)
          Delegates painting to one of two methods: paintDeterminate or paintIndeterminate.
protected  void BasicProgressBarUI.paintIndeterminate(Graphics g, JComponent c)
          All purpose paint method that should do the right thing for all linear bouncing-box progress bars.
protected  void BasicProgressBarUI.paintDeterminate(Graphics g, JComponent c)
          All purpose paint method that should do the right thing for almost all linear, determinate progress bars.
protected  void BasicProgressBarUI.paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
           
protected  Point BasicProgressBarUI.getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height)
          Designate the place where the progress string will be painted.
 void BasicSeparatorUI.paint(Graphics g, JComponent c)
           
 void BasicPopupMenuSeparatorUI.paint(Graphics g, JComponent c)
           
 void BasicMenuItemUI.update(Graphics g, JComponent c)
          We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
 void BasicMenuItemUI.paint(Graphics g, JComponent c)
           
protected  void BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
           
protected  void BasicMenuItemUI.paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
          Draws the background of the menu item.
protected  void BasicMenuItemUI.paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
          Renders the text of the current menu item.
protected  void BasicListUI.paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
          Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.
 void BasicListUI.paint(Graphics g, JComponent c)
          Paint the rows that intersect the Graphics objects clipRect.
protected  void BasicLabelUI.paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
          Paint clippedText at textX, textY with the labels foreground color.
protected  void BasicLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
          Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().
 void BasicLabelUI.paint(Graphics g, JComponent c)
          Paint the label text in the foreground color, if the label is opaque then paint the entire background with the background color.
 void BasicInternalFrameTitlePane.paintComponent(Graphics g)
           
protected  void BasicInternalFrameTitlePane.paintTitleBackground(Graphics g)
          Invoked from paintComponent.
 void BasicInternalFrameTitlePane.SystemMenuBar.paint(Graphics g)
           
static void BasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
           
static void BasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
           
static void BasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
           
static void BasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
           
static void BasicGraphicsUtils.drawString(Graphics g, String text, int underlinedChar, int x, int y)
          Draw a string with the graphics g at location (x,y) just like g.drawString would.
static void BasicGraphicsUtils.drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
          Draw a string with the graphics g at location (x, y) just like g.drawString would.
static void BasicGraphicsUtils.drawDashedRect(Graphics g, int x, int y, int width, int height)
           
 void BasicDesktopPaneUI.paint(Graphics g, JComponent c)
           
 void BasicComboBoxUI.paint(Graphics g, JComponent c)
           
 void BasicComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
          Paints the currently selected item.
 void BasicComboBoxUI.paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
          Paints the background of the currently selected item.
 void BasicToggleButtonUI.paint(Graphics g, JComponent c)
           
protected  void BasicToggleButtonUI.paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
           
 void BasicRadioButtonUI.paint(Graphics g, JComponent c)
          paint the radio button
protected  void BasicRadioButtonUI.paintFocus(Graphics g, Rectangle textRect, Dimension size)
           
 void BasicButtonUI.paint(Graphics g, JComponent c)
           
protected  void BasicButtonUI.paintIcon(Graphics g, JComponent c, Rectangle iconRect)
           
protected  void BasicButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
          As of Java 2 platform v 1.4 this method should not be used or overriden.
protected  void BasicButtonUI.paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
          Method which renders the text of the current button.
protected  void BasicButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void BasicButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
           
 void BasicBorders.RolloverButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void BasicBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void BasicBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void BasicBorders.RadioButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void BasicBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void BasicBorders.FieldBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void BasicBorders.SplitPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 void BasicArrowButton.paint(Graphics g)
           
 void BasicArrowButton.paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
           
protected  void BasicTextUI.paintBackground(Graphics g)
          Paints a background for the view.
protected  void BasicTextUI.paintSafely(Graphics g)
          Paints the interface safely with a guarantee that the model won't change from the view of this thread.
 void BasicTextUI.update(Graphics g, JComponent c)
          Superclass paints background in an uncontrollable way (i.e.
 void BasicTextUI.paint(Graphics g, JComponent c)
          Paints the interface.
 

Uses of Graphics in javax.swing.plaf.metal
 

Methods in javax.swing.plaf.metal with parameters of type Graphics
 void MetalTreeUI.paint(Graphics g, JComponent c)
           
protected  void MetalTreeUI.paintHorizontalSeparators(Graphics g, JComponent c)
           
protected  void MetalTreeUI.paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
           
protected  void MetalTreeUI.paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
           
protected  void MetalToggleButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
           
protected  void MetalToggleButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
           
protected  void MetalToggleButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
 void MetalToolTipUI.paint(Graphics g, JComponent c)
           
protected  void MetalTabbedPaneUI.paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
           
protected  void MetalTabbedPaneUI.paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
           
protected  void MetalTabbedPaneUI.paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
           
protected  void MetalTabbedPaneUI.paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
           
protected  void MetalTabbedPaneUI.paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
           
 void MetalTabbedPaneUI.update(Graphics g, JComponent c)
           
protected  void MetalTabbedPaneUI.paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
           
 void MetalTabbedPaneUI.paint(Graphics g, JComponent c)
           
protected  void MetalTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void MetalTabbedPaneUI.paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void MetalTabbedPaneUI.paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void MetalTabbedPaneUI.paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void MetalTabbedPaneUI.paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
 void MetalSliderUI.paintThumb(Graphics g)
           
 void MetalSliderUI.paintTrack(Graphics g)
           
 void MetalSliderUI.paintFocus(Graphics g)
           
protected  void MetalSliderUI.paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void MetalSliderUI.paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void MetalSliderUI.paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void MetalSliderUI.paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
 void MetalScrollButton.paint(Graphics g)
           
protected  void MetalScrollBarUI.paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
           
protected  void MetalScrollBarUI.paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
           
 void MetalProgressBarUI.paintDeterminate(Graphics g, JComponent c)
          Draws a bit of special highlighting on the progress bar.
 void MetalProgressBarUI.paintIndeterminate(Graphics g, JComponent c)
          Draws a bit of special highlighting on the progress bar and bouncing box.
 void MetalSeparatorUI.paint(Graphics g, JComponent c)
           
 void MetalPopupMenuSeparatorUI.paint(Graphics g, JComponent c)
           
 void MetalInternalFrameTitlePane.paintPalette(Graphics g)
           
 void MetalInternalFrameTitlePane.paintComponent(Graphics g)
           
 void MetalIconFactory.TreeControlIcon.paintIcon(Component c, Graphics g, int x, int y)
           
 void MetalIconFactory.TreeControlIcon.paintMe(Component c, Graphics g, int x, int y)
           
 void MetalIconFactory.PaletteCloseIcon.paintIcon(Component c, Graphics g, int x, int y)
           
 void MetalIconFactory.FolderIcon16.paintIcon(Component c, Graphics g, int x, int y)
           
 void MetalIconFactory.FileIcon16.paintIcon(Component c, Graphics g, int x, int y)
           
protected  void MetalLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
          Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.
 void MetalRadioButtonUI.paint(Graphics g, JComponent c)
           
protected  void MetalRadioButtonUI.paintFocus(Graphics g, Rectangle t, Dimension d)
           
 void MetalCheckBoxIcon.paintIcon(Component c, Graphics g, int x, int y)
           
protected  void MetalCheckBoxIcon.drawCheck(Component c, Graphics g, int x, int y)
           
 void MetalComboBoxUI.paint(Graphics g, JComponent c)
           
 void MetalComboBoxIcon.paintIcon(Component c, Graphics g, int x, int y)
          Paints the horizontal bars for the
 void MetalComboBoxButton.paintComponent(Graphics g)
           
protected  void MetalButtonUI.paintButtonPressed(Graphics g, AbstractButton b)
           
protected  void MetalButtonUI.paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void MetalButtonUI.paintText(Graphics g, JComponent c, Rectangle textRect, String text)
           
 void MetalBorders.TableHeaderBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.ScrollPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.TextFieldBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.ToolBarBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.RolloverButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.PopupMenuBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.MenuItemBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.OptionDialogBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.PaletteBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.Flush3DBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 void MetalBorders.InternalFrameBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
           
 

Uses of Graphics in javax.swing.plaf.multi
 

Methods in javax.swing.plaf.multi with parameters of type Graphics
 void MultiViewportUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiViewportUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiTreeUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiTreeUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiToolTipUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiToolTipUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiToolBarUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiToolBarUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiTextUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiTextUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiTableUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiTableUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiTableHeaderUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiTableHeaderUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiTabbedPaneUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiTabbedPaneUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiSplitPaneUI.finishedPaintingChildren(JSplitPane a, Graphics b)
          Invokes the finishedPaintingChildren method on each UI handled by this object.
 void MultiSplitPaneUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiSplitPaneUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiSpinnerUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiSpinnerUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiSliderUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiSliderUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiSeparatorUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiSeparatorUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiScrollPaneUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiScrollPaneUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiScrollBarUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiScrollBarUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiRootPaneUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiRootPaneUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiProgressBarUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiProgressBarUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiPopupMenuUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiPopupMenuUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiPanelUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiPanelUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiOptionPaneUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiOptionPaneUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiMenuItemUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiMenuItemUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiMenuBarUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiMenuBarUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiListUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiListUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiLabelUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiLabelUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiInternalFrameUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiInternalFrameUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiFileChooserUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiFileChooserUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiDesktopPaneUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiDesktopPaneUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiDesktopIconUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiDesktopIconUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiComboBoxUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiComboBoxUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiColorChooserUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiColorChooserUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 void MultiButtonUI.update(Graphics a, JComponent b)
          Invokes the update method on each UI handled by this object.
 void MultiButtonUI.paint(Graphics a, JComponent b)
          Invokes the paint method on each UI handled by this object.
 

Uses of Graphics in javax.swing.text
 

Methods in javax.swing.text that return Graphics
 Graphics View.getGraphics()
          Fetch a Graphics for rendering.
 

Methods in javax.swing.text with parameters of type Graphics
protected  int PasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
          Renders the given range in the model as normal unselected text.
protected  int PasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
          Renders the given range in the model as selected text.
protected  int PasswordView.drawEchoCharacter(Graphics g, int x, int y, char c)
          Renders the echo character, or whatever graphic should be used to display the password characters.
protected  void PlainView.drawLine(int lineIndex, Graphics g, int x, int y)
          Renders a line of text, suppressing whitespace at the end and expanding any tabs.
protected  int PlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
          Renders the given range in the model as normal unselected text.
protected  int PlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
          Renders the given range in the model as selected text.
 void PlainView.paint(Graphics g, Shape a)
          Renders using the given rendering surface and area on that surface.
 void FieldView.paint(Graphics g, Shape a)
          Renders using the given rendering surface and area on that surface.
 void AsyncBoxView.paint(Graphics g, Shape alloc)
          Render the view using the given allocation and rendering surface.
 void AsyncBoxView.ChildLocator.paintChildren(Graphics g)
          Paint the children that intersect the clip area.
 void IconView.paint(Graphics g, Shape a)
          Paints the icon.
 void ComponentView.paint(Graphics g, Shape a)
          The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).
protected  void WrappedPlainView.drawLine(int p0, int p1, Graphics g, int x, int y)
          Renders a line of text, suppressing whitespace at the end and expanding any tabs.
protected  int WrappedPlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
          Renders the given range in the model as normal unselected text.
protected  int WrappedPlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
          Renders the given range in the model as selected text.
 void WrappedPlainView.paint(Graphics g, Shape a)
          Renders using the given rendering surface and area on that surface.
abstract  void LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
          When leaf Views (such as LabelView) are rendering they should call into this method.
abstract  Shape LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
           
 void DefaultHighlighter.paint(Graphics g)
          Renders the highlights.
 void DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
          When leaf Views (such as LabelView) are rendering they should call into this method.
 void DefaultHighlighter.DefaultHighlightPainter.paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
          Paints a highlight.
 Shape DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
          Paints a portion of a highlight.
 void GlyphView.paint(Graphics g, Shape a)
          Renders a portion of a text style run.
abstract  void GlyphView.GlyphPainter.paint(GlyphView v, Graphics g, Shape a, int p0, int p1)
          Paint the glyphs representing the given range.
static int Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
          Draws the given text, expanding any tabs that are contained using the given tab expansion technique.
protected  void BoxView.paintChild(Graphics g, Rectangle alloc, int index)
          Paints a child.
 void BoxView.paint(Graphics g, Shape allocation)
          Renders the BoxView using the given rendering surface and area on that surface.
 void ParagraphView.paint(Graphics g, Shape a)
          Renders using the given rendering surface and area on that surface.
 void DefaultCaret.paint(Graphics g)
          Renders the caret as a vertical line.
 void Highlighter.paint(Graphics g)
          Renders the highlights.
 void Highlighter.HighlightPainter.paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c)
          Renders the highlight.
 void Caret.paint(Graphics g)
          Renders the caret.
abstract  void View.paint(Graphics g, Shape allocation)
          Renders using the given rendering surface and area on that surface.
 

Uses of Graphics in javax.swing.text.html
 

Methods in javax.swing.text.html with parameters of type Graphics
 void ImageView.paint(Graphics g, Shape a)
          Paints the View.
 void ListView.paint(Graphics g, Shape allocation)
          Renders using the given rendering surface and area on that surface.
protected  void ListView.paintChild(Graphics g, Rectangle alloc, int index)
          Paints one of the children; called by paint().
 void ParagraphView.paint(Graphics g, Shape a)
          Renders using the given rendering surface and area on that surface.
 void BlockView.paint(Graphics g, Shape allocation)
          Renders using the given rendering surface and area on that surface.
 void StyleSheet.BoxPainter.paint(Graphics g, float x, float y, float w, float h, View v)
          Paints the CSS box according to the attributes given.
 void StyleSheet.ListPainter.paint(Graphics g, float x, float y, float w, float h, View v, int item)
          Paints the CSS list decoration according to the attributes given.
 

Uses of Graphics in javax.swing.tree
 

Methods in javax.swing.tree with parameters of type Graphics
 void DefaultTreeCellRenderer.paint(Graphics g)
          Paints the value.
 void DefaultTreeCellEditor.EditorContainer.paint(Graphics g)
          Overrides Container.paint to paint the node's icon and use the selection color for the background.
 


JavaTM 2 Platform
Std. Ed. v1.4.1

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 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.