Uses of Class java.awt.Graphics

Uses in package javax.swing.plaf.basic

Methods with parameter type java.awt.Graphics

void
BasicGraphicsUtils.drawBezel(Graphics g, int x, int y, int width, int height, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a border that is suitable for buttons of the Basic look and feel.
void
BasicGraphicsUtils.drawDashedRect(Graphics g, int x, int y, int width, int height)
Draws a rectangle, simulating a dotted stroke by painting only every second pixel along the one-pixel thick edge.
void
BasicGraphicsUtils.drawEtchedRect(Graphics g, int x, int y, int width, int height, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a rectangle that appears etched into the surface, given four colors that are used for drawing.
void
BasicGraphicsUtils.drawGroove(Graphics g, int x, int y, int width, int height, Color shadow, Color highlight)
Draws a rectangle that appears etched into the surface, given two colors that are used for drawing.
void
BasicGraphicsUtils.drawLoweredBezel(Graphics g, int x, int y, int width, int height, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a rectangle that appears lowered into the surface, given four colors that are used for drawing.
void
BasicGraphicsUtils.drawString(Graphics g, String text, int underlinedChar, int x, int y)
Draws a String at the given location, underlining the first occurence of a specified character.
void
BasicGraphicsUtils.drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
Draws a String at the given location, underlining the character at the specified index.
void
This method is called after the children of the JSplitPane are painted.
Point
BasicProgressBarUI.getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height)
This method returns the point (the top left of the bounding box) where the text should be painted.
void
This method paints the arrow button.
void
This method paints this Component.
void
Paints the divider by painting its border.
void
This method paints the DragWindow.
void
Paint the component, which is an AbstractButton, according to its current state.
void
Paints given menu item using specified graphics context
void
The method that paints the label according to its current state.
void
Paints the list by calling BasicListUI and then repeatedly calling paintCell(Graphics,int,Rectangle,ListCellRenderer,ListModel,ListSelectionModel,int) for each visible cell in the list.
void
Paints given menu item using specified graphics context
void
The Popup Menu Separator has two lines.
void
This method paints the progressBar.
void
This method is called when the component is painted.
void
Paints the component according to the design guidelines of the look and feel.
void
The separator is made of two lines.
void
This method is used to paint the JSlider.
void
This method is called to paint the JSplitPane.
void
This method paints the JTabbedPane.
void
Paints the component according to the design guidelines of the look and feel.
void
void
void
This method does nothing as a Separator is just blank space.
void
This method paints the given JComponent with the given Graphics object.
void
Paints the specified component appropriate for the look and feel.
void
Paints the component according to the design guidelines of the look and feel.
void
void
Paints background of the menu item
void
BasicBorders.ButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the ButtonBorder around a given component.
void
BasicBorders.FieldBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the FieldBorder around a given component.
void
BasicBorders.MenuBarBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the MenuBarBorder around a given component.
void
BasicBorders.RadioButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the RadioButtonBorder around a given component.
void
BasicBorders.RolloverButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border around a rollover button.
void
BasicBorders.SplitPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border around a JSplitPane.
void
BasicBorders.ToggleButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the ToggleButtonBorder around a given component.
void
Paints the background area of an AbstractButton in the pressed state.
void
BasicListUI.paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead)
Paints a single cell in the list.
void
This method paints the TitlePane.
void
BasicTabbedPaneUI.paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
This method paints the border around the content area.
void
BasicTabbedPaneUI.paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
This method paints the bottom edge of the content border.
void
BasicTabbedPaneUI.paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
This method paints the left edge of the content border.
void
BasicTabbedPaneUI.paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
This method paints the right edge of the content border.
void
BasicTabbedPaneUI.paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
This method paints the top edge of the content border.
void
BasicComboBoxUI.paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
This method paints currently selected value in the main part of the combo box (part without popup).
void
This method paints background of part of the combo box, where currently selected value is displayed.
void
This method is called when repainting and the mouse is pressed in the track.
void
This method is called if the painting to be done is for a determinate progressBar.
void
BasicLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paints the text if the label is disabled.
void
BasicLabelUI.paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
Paints the text if the label is enabled.
void
This method is called during a repaint if the slider has focus.
void
Paint any focus decoration this JComponent might have.
void
BasicTabbedPaneUI.paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
This method paints the focus rectangle around the selected tab.
void
This method paints the label on the horizontal slider at the value specified.
void
BasicTabbedPaneUI.paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
This method paints the icon.
void
Paint the icon for this component.
void
This method is called when repainting and the mouse is pressed in the track.
void
This method is called if the painting to be done is for an indeterminate progressBar.
void
This method paints all the labels from the slider's label table.
void
This method paints a major tick for a horizontal slider at the given x value. x represents the x coordinate to paint at.
void
This method paints a major tick for a vertical slider at the given y value. y represents the y coordinate to paint at.
void
BasicMenuItemUI.paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
Paints specified menu item
void
This method paints a minor tick for a horizontal slider at the given x value. x represents the x coordinate to paint at.
void
This method paints a minor tick for a vertical slider at the given y value. y represents the y coordinate to paint at.
void
void
BasicProgressBarUI.paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
This method paints the string for the progressBar.
void
BasicTabbedPaneUI.paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
This method paints an individual tab.
void
BasicTabbedPaneUI.paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
This method paints the tab area.
void
BasicTabbedPaneUI.paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
This method paints the background for an individual tab.
void
BasicTabbedPaneUI.paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
This method paints the border for an individual tab.
void
BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
This method paints the text for the given tab.
void
Paints the "text" property of an AbstractButton, using the textColor color.
void
Paints the "text" property of an AbstractButton, using the textColor color.
void
BasicMenuItemUI.paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
Paints label for the given menu item
void
This method paints a thumb.
void
This method paints the thumb.
void
This method is called during a repaint if the ticks are to be drawn.
void
This method paints the TitlePane's background.
void
This method is called during a repaint if the track is to be drawn.
void
This method paints the track.
void
BasicArrowButton.paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
The method paints a triangle with the given size and direction at the given x and y coordinates.
void
This method paints the label on the vertical slider at the value specified.
void
This method calls paint.

Uses in package javax.swing.plaf.metal

Methods with parameter type java.awt.Graphics

void
MetalBorders.MetalButtonBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Paints the button border.
void
MetalBorders.PopupMenuBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Paints the border for component c using the Graphics context g with the dimension x, y, w, h.
void
MetalBorders.ScrollPaneBorder.paintBorder(Component c, Graphics g, int x, int y, int w, int h)
Paints the border.
void
Paints the icon at the location (x, y).
void
Paints the icon at the location (x, y).
void
Paints the icon at the location (x, y).
void
void
Paints the slider button of the ScrollBar.

Uses in package javax.swing.plaf

Methods with parameter type java.awt.Graphics

void
Called by the JSplitPane after it has finished painting its children.
void
Paints the component according to the design guidelines of the look and feel.
void
BorderUIResource.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border around an enclosed component by calling the paintBorder method of the wrapped delegate.
void
IconUIResource.paintIcon(Component c, Graphics g, int x, int y)
Paints the icon by asking the delegate icon to paint itself.
void
Fills the specified component with its background color (unless the opaque property is false) before calling paint(Graphics,JComponent).

Uses in package java.beans

Methods with parameter type java.awt.Graphics

void
The RAD tool calls this to paint the actual value of the property.
void
Paints this object.

Uses in package java.awt.print

Methods with parameter type java.awt.Graphics

int
Printable.print(Graphics graphics, PageFormat format, int page_number)
This method prints the specified page to the specified graphics context in the specified format.

Uses in package java.awt

Classes derived from java.awt.Graphics

class

Methods with parameter type java.awt.Graphics

LineMetrics
FontMetrics.getLineMetrics(char[] chars, int begin, int limit, Graphics g)
Returns a LineMetrics object constructed with the specified text and the FontRenderContext of the Graphics object when it is an instance of Graphics2D or a generic FontRenderContext with a null transform, not anti-aliased and not using fractional metrics.
LineMetrics
FontMetrics.getLineMetrics(String text, int begin, int limit, Graphics g)
Returns a LineMetrics object constructed with the specified text and the FontRenderContext of the Graphics object when it is an instance of Graphics2D or a generic FontRenderContext with a null transform, not anti-aliased and not using fractional metrics.
LineMetrics
Returns a LineMetrics object constructed with the specified text and the FontRenderContext of the Graphics object when it is an instance of Graphics2D or a generic FontRenderContext with a null transform, not anti-aliased and not using fractional metrics.
LineMetrics
FontMetrics.getLineMetrics(CharacterIterator ci, int begin, int limit, Graphics g)
Returns a LineMetrics object constructed with the specified text and the FontRenderContext of the Graphics object when it is an instance of Graphics2D or a generic FontRenderContext with a null transform, not anti-aliased and not using fractional metrics.
Rectangle2D
FontMetrics.getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)
Rectangle2D
FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context)
Rectangle2D
Rectangle2D
FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)
void
Repaints the canvas window.
void
Paints this component on the screen.
void
Paints this container.
void
Paints this entire component, including any sub-components.
void
Paints all of the components in this container.
void
Prints this component.
void
Prints this container.
void
Prints this component, including all sub-components.
void
Prints all of the components in this container.
void
Prints all of the components in this container.
void
Updates the canvas in response to a request to repaint() it.
void
Updates this component.
void
Updates this container.

Methods with return type java.awt.Graphics

Graphics
Returns a copy of this Graphics object.
Graphics
Graphics.create(int x, int y, int width, int height)
Returns a copy of this Graphics object.
Graphics
Retrieves a graphics object that can be used to draw into this strategy's image buffer.
Graphics
Retrieves a graphics object that can be used to draw into this strategy's image buffer.
Graphics
Returns a graphics object for this component.
Graphics
Returns a graphics context object for drawing an off-screen object.
Graphics
Returns a graphics context suitable for rendering the next page.

Uses in package javax.swing.tree

Methods with parameter type java.awt.Graphics

void
paint
void
paint

Uses in package javax.swing.text

Methods with parameter type java.awt.Graphics

int
PasswordView.drawEchoCharacter(Graphics g, int x, int y, char ch)
Draws one echo character at a given position.
void
PlainView.drawLine(int lineIndex, Graphics g, int x, int y)
int
PasswordView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
Draws selected text at a given position.
int
PlainView.drawSelectedText(Graphics g, int x, int y, int p0, int p1)
int
Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
Draws the given text segment.
int
PasswordView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Draws unselected text at a given position.
int
PlainView.drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
void
void
void
void
void
void
void
void
void
void
Shape
Shape
LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
void
DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
void
LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)

Methods with return type java.awt.Graphics

Graphics

Uses in package java.awt.peer

Methods with parameter type java.awt.Graphics

void
void

Methods with return type java.awt.Graphics

Graphics

Uses in package java.awt.image

Methods with return type java.awt.Graphics

Graphics
Retrieves a graphics object that can be used to draw using this buffer strategy.
Graphics
Returns a graphics context object for drawing an off-screen object.
Graphics
Returns a Graphics2D object that can be used to draw onto this image.

Uses in package javax.swing.border

Methods with parameter type java.awt.Graphics

void
AbstractBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Performs nothing, because the default implementation provided by this class is an invisible, zero-width border.
void
BevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border for a given component.
void
Border.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border for a given component.
void
CompoundBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the compound border by first painting the outside border, then painting the inside border tightly nested into the outside.
void
EmptyBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Performs nothing because an EmptyBorder does not paint any pixels.
void
EtchedBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border for a given component.
void
LineBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the line border around a given Component.
void
MatteBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border for a given component.
void
SoftBevelBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border for a given component.
void
TitledBorder.paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border and the title text.
void
BevelBorder.paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
Paints a lowered bevel border around a component.
void
BevelBorder.paintRaisedBevel(Component c, Graphics g, int x, int y, int width, int height)
Paints a raised bevel border around a component.

Uses in package javax.swing

Classes derived from java.awt.Graphics

class
DebugGraphics

Constructors with parameter type java.awt.Graphics

Creates a DebugGraphics object.
Creates a DebugGraphics object.

Methods with parameter type java.awt.Graphics

Graphics
Prepares a graphics context for painting this object.
void
Should not be called.
void
Paint the component.
void
Paint the component.
void
Paints the button's border, if the button's "borderPainted" property is true, by out calling to the button's look and feel class.
void
Paint the component's border.
void
Paints border of the menu bar, if its borderPainted property is set to true.
void
This method paints the border of the JProgressBar
void
This method paints the border if the borderPainted property is true.
void
Paint the component's children.
void
This method overrides JComponent's paintChildren so the UI can be messaged when the children have finished painting.
void
Paint the component's body.
void
This method is overridden to allow for speedier painting while this JInternalFramme is being dragged.
void
CellRendererPane.paintComponent(Graphics graphics, Component c, Container p, int x, int y, int w, int h)
Paints the specified component c on the Graphics context graphics.
void
SwingUtilities.paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
This method paints the given component at the given position and size.
void
CellRendererPane.paintComponent(Graphics graphics, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
Paints the specified component c on the Graphics context graphics.
void
Paints the specified component c on the Graphics context g.
void
This method paints the given component in the given rectangle.
void
Icon.paintIcon(Component c, Graphics g, int x, int y)
void
ImageIcon.paintIcon(Component c, Graphics g, int x, int y)
void
Prints this component to the given Graphics context.
void
Prints this component to the given Graphics context.
void
Print this component's border to the specified Graphics context.
void
Print this component's children to the specified Graphics context.
void
Prints this component to the specified Graphics context.
void
Should not be called.
void
Updates this container.
void
Call paint.
void
This method simply calls paint and returns.
void
Updates this container.
void
Updates this container.

Methods with return type java.awt.Graphics

Graphics
Creates a overrides Graphics.create to create a DebugGraphics object.
Graphics
DebugGraphics.create(int x, int y, int width, int height)
Creates a overrides Graphics.create to create a DebugGraphics object.
Graphics
Prepares a graphics context for painting this object.
Graphics
Returns the Graphics context for this component.

Uses in package javax.swing.colorchooser

Methods with parameter type java.awt.Graphics

void
This method paints the chooser panel.