Java Platform 1.2
Beta 4

Uses of Class
java.awt.Graphics

Packages that use Graphics
com.sun.java.swing Provides a set of "lightweight" (all-Java
com.sun.java.swing.border Provides classes and interface for drawing specialized borders around a Swing component.  
com.sun.java.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.  
com.sun.java.swing.text Provides classes and interfaces that deal with editable and noneditable text components.  
com.sun.java.swing.text.html Provides the class (HTMLEditorKit) and supporting classes for creating HTML text editors.  
com.sun.java.swing.tree Provides classes and interfaces for dealing with java.awt.swing. 
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. The API includes such features as: the ability to specify document types mechanisms for control of page setup and page formats the ability to manage job control dialogs
java.beans Contains classes related to Java Beans development.  
 

Uses of Graphics in com.sun.java.swing
 

Subclasses of Graphics in com.sun.java.swing
  DebugGraphics
          Graphics subclass supporting graphics debugging.
 

Methods in com.sun.java.swing that return Graphics
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.
 Graphics DebugGraphics.create()
           
 Graphics DebugGraphics.create(int x, int y, int width, int height)
           
 

Methods in com.sun.java.swing with parameters of type Graphics
protected  Graphics JComponent.getComponentGraphics(Graphics g)
          Returns the graphics object used to paint this component.
protected  void JComponent.paintComponent(Graphics g)
          If the UI delegate is non-null, call its paint method.
protected  void JComponent.paintChildren(Graphics g)
          Paint this component's children.
protected  void JComponent.paintBorder(Graphics g)
          Paint the component's border.
 void JComponent.update(Graphics g)
          Calls paint(g).
 void JComponent.paint(Graphics g)
          This method is invoked by Swing to draw components.
 void JLayeredPane.paint(Graphics g)
          Paints this JLayeredPane within the specified graphics context.
 void JFrame.update(Graphics g)
          Just calls paint(g).
protected  void AbstractButton.paintBorder(Graphics g)
          Paint the button's border if BorderPainted property is true.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
          Paint a component c on an abitrary graphics g in the specified rectangle.
static void SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r)
           
protected  void JToolBar.paintBorder(Graphics g)
          Paint the toolbar's border if BorderPainted property is true.
 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.
 void JDialog.update(Graphics g)
          Just calls paint(g).
protected  void JPopupMenu.paintBorder(Graphics g)
          Paint the popup menu's border if BorderPainted property is true.
protected  void JMenuBar.paintBorder(Graphics g)
          Paint the menubar's border if BorderPainted property is true.
 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.
 void JApplet.update(Graphics g)
          Just calls paint(g).
protected  void JProgressBar.paintBorder(Graphics g)
          Paint the progress bar's border if BorderPainted property is true.
 void Icon.paintIcon(Component c, Graphics g, int x, int y)
          Draw the icon at the specified location.
protected  void JSplitPane.paintChildren(Graphics g)
          Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
 

Constructors in com.sun.java.swing with parameters of type Graphics
DebugGraphics.DebugGraphics(Graphics graphics, JComponent component)
          Handle on AWT Graphics
DebugGraphics.DebugGraphics(Graphics graphics)
           
 

Uses of Graphics in com.sun.java.swing.border
 

Methods in com.sun.java.swing.border with parameters of type Graphics
 void AbstractBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          This default implementation does no painting.
 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 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 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.
 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 EmptyBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Does no drawing by default.
 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 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 MatteBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the matte 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.
 

Uses of Graphics in com.sun.java.swing.plaf
 

Methods in com.sun.java.swing.plaf with parameters of type Graphics
 void ComponentUI.paint(Graphics g, JComponent c)
           
 void ComponentUI.update(Graphics g, JComponent c)
           
 void IconUIResource.paintIcon(Component c, Graphics g, int x, int y)
           
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 BorderUIResource.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 

Uses of Graphics in com.sun.java.swing.text
 

Methods in com.sun.java.swing.text with parameters of type Graphics
abstract  void View.paint(Graphics g, Shape allocation)
          Renders using the given rendering surface and area on that surface.
protected  void BoxView.paintChild(Graphics g, Rectangle alloc, int index)
          Paints a child.
 void BoxView.paint(Graphics g, Shape allocation)
          Renders using the given rendering surface and area on that surface.
protected  void PlainView.drawLine(int lineIndex, Graphics g, int x, int y)
          Renders a line of text, suppressing whitespace at the end and exanding 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.
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.
 void DefaultHighlighter.paint(Graphics g)
          Renders the highlights.
 void DefaultHighlighter.DefaultHighlightPainter.paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
          Paints a highlight.
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.
 void ComponentView.paint(Graphics g, Shape a)
          Paints a component view.
 void IconView.paint(Graphics g, Shape a)
          Paints the icon.
 void ParagraphView.paint(Graphics g, Shape a)
          Renders using the given rendering surface and area on that surface.
 void LabelView.paint(Graphics g, Shape a)
          Renders a portion of a text style run.
 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.
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.
 void DefaultCaret.paint(Graphics g)
          Renders the caret as a vertical line.
 

Uses of Graphics in com.sun.java.swing.text.html
 

Methods in com.sun.java.swing.text.html with parameters of type Graphics
 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.
 void ParagraphView.paint(Graphics g, Shape allocation)
          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.
protected  void ListView.paintChild(Graphics g, Rectangle alloc, int index)
          Paints one of the children; called by paint().
 

Uses of Graphics in com.sun.java.swing.tree
 

Methods in com.sun.java.swing.tree with parameters of type Graphics
 void DefaultTreeCellEditor.EditorContainer.paint(Graphics g)
           
 void DefaultTreeCellRenderer.paint(Graphics g)
          Paints the value.
 

Uses of Graphics in java.awt
 

Subclasses of Graphics in java.awt
  Graphics2D
          This is the fundamental class for 2D rendering in Java.
 

Methods in java.awt that return Graphics
 Graphics Component.getGraphics()
          Creates a graphics context for this component.
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.
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.
 

Methods in java.awt with parameters of type Graphics
 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.
 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 Canvas.paint(Graphics g)
          This method is called to repaint this canvas.
 void ScrollPane.printComponents(Graphics g)
          Prints the component in this scroll pane.
 LineMetrics FontMetrics.getLineMetrics(String str, Graphics context)
           
 LineMetrics FontMetrics.getLineMetrics(String str, int beginIndex, int limit, Graphics context)
           
 LineMetrics FontMetrics.getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context)
           
 LineMetrics FontMetrics.getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context)
           
 Rectangle2D FontMetrics.getStringBounds(String str, Graphics context)
           
 Rectangle2D FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context)
           
 Rectangle2D FontMetrics.getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)
           
 Rectangle2D FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)
           
 Rectangle2D FontMetrics.getMaxCharBounds(Graphics context)
           
 

Uses of Graphics in java.awt.image
 

Methods in java.awt.image that return Graphics
 Graphics BufferedImage.getGraphics()
          This method will actually return a Graphics2D but is here for backwards compatibility. createGraphics() is more convenient, since it is declared to return a Graphics2D.
 

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)
          A PrinterJob will call the Printable interface requesting that a page be rendered into 'graphics'.
 

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.
 


Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.