Uses of Class
java.awt.Graphics
-
Packages that use Graphics Package Description 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 JavaBeans™ 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 theJColorChooser
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.plaf.synth Synth is a skinnable look and feel in which all painting is delegated.javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.javax.swing.text.html Provides the classHTMLEditorKit
and supporting classes for creating HTML text editors.javax.swing.tree Provides classes and interfaces for dealing withjavax.swing.JTree
. -
-
Uses of Graphics in java.awt
Subclasses of Graphics in java.awt Modifier and Type Class Description class
Graphics2D
ThisGraphics2D
class extends theGraphics
class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.Methods in java.awt that return Graphics Modifier and Type Method Description abstract Graphics
Graphics. create()
Creates a newGraphics
object that is a copy of thisGraphics
object.Graphics
Graphics. create(int x, int y, int width, int height)
Creates a newGraphics
object based on thisGraphics
object, but with a new translation and clip area.Graphics
Component.BltBufferStrategy. getDrawGraphics()
Graphics
Component.FlipBufferStrategy. getDrawGraphics()
Graphics
Component. getGraphics()
Creates a graphics context for this component.abstract Graphics
Image. getGraphics()
Creates a graphics context for drawing to an off-screen image.abstract Graphics
PrintJob. getGraphics()
Gets a Graphics object that will draw to the next page.Methods in java.awt with parameters of type Graphics Modifier and Type Method Description LineMetrics
FontMetrics. getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context)
Returns theLineMetrics
object for the specified character array in the specifiedGraphics
context.LineMetrics
FontMetrics. getLineMetrics(String str, int beginIndex, int limit, Graphics context)
LineMetrics
FontMetrics. getLineMetrics(String str, Graphics context)
LineMetrics
FontMetrics. getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context)
Returns theLineMetrics
object for the specifiedCharacterIterator
in the specifiedGraphics
context.Rectangle2D
FontMetrics. getMaxCharBounds(Graphics context)
Returns the bounds for the character with the maximum bounds in the specifiedGraphics
context.Rectangle2D
FontMetrics. getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)
Returns the bounds of the specified array of characters in the specifiedGraphics
context.Rectangle2D
FontMetrics. getStringBounds(String str, int beginIndex, int limit, Graphics context)
Returns the bounds of the specifiedString
in the specifiedGraphics
context.Rectangle2D
FontMetrics. getStringBounds(String str, Graphics context)
Returns the bounds of the specifiedString
in the specifiedGraphics
context.Rectangle2D
FontMetrics. getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)
Returns the bounds of the characters indexed in the specifiedCharacterIterator
in the specifiedGraphics
context.void
Canvas. paint(Graphics g)
Paints this canvas.void
Component. paint(Graphics g)
Paints this component.void
Container. paint(Graphics g)
Paints the container.void
Window. paint(Graphics g)
Paints the container.void
Component. paintAll(Graphics g)
Paints this component and all of its subcomponents.void
Container. paintComponents(Graphics g)
Paints each of the components in this container.void
Component. print(Graphics g)
Prints this component.void
Container. print(Graphics g)
Prints the container.void
Component. printAll(Graphics g)
Prints this component and all of its subcomponents.void
Container. printComponents(Graphics g)
Prints each of the components in this container.void
ScrollPane. printComponents(Graphics g)
Prints the component in this scroll pane.void
Canvas. update(Graphics g)
Updates this canvas.void
Component. update(Graphics g)
Updates this component.void
Container. update(Graphics g)
Updates the container. -
Uses of Graphics in java.awt.image
Methods in java.awt.image that return Graphics Modifier and Type Method Description abstract Graphics
BufferStrategy. getDrawGraphics()
Creates a graphics context for the drawing buffer.Graphics
AbstractMultiResolutionImage. getGraphics()
As per the contract of the baseImage#getGraphics()
method, this implementation will always throwUnsupportedOperationException
since only off-screen images can return aGraphics
object.Graphics
BufferedImage. getGraphics()
This method returns aGraphics2D
, but is here for backwards compatibility.Graphics
VolatileImage. getGraphics()
This method returns aGraphics2D
, but is here for backwards compatibility. -
Uses of Graphics in java.awt.print
Methods in java.awt.print with parameters of type Graphics Modifier and Type Method Description int
Printable. print(Graphics graphics, PageFormat pageFormat, int pageIndex)
Prints the page at the specified index into the specifiedGraphics
context in the specified format. -
Uses of Graphics in java.beans
Methods in java.beans with parameters of type Graphics Modifier and Type Method Description void
PropertyEditor. paintValue(Graphics gfx, Rectangle box)
Paint a representation of the value into a given area of screen real estate.void
PropertyEditorSupport. 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 Modifier and Type Class Description class
DebugGraphics
Graphics subclass supporting graphics debugging.Methods in javax.swing that return Graphics Modifier and Type Method Description Graphics
DebugGraphics. create()
OverridesGraphics.create
to return a DebugGraphics object.Graphics
DebugGraphics. create(int x, int y, int width, int height)
OverridesGraphics.create
to return a DebugGraphics object.protected Graphics
JComponent. getComponentGraphics(Graphics g)
Returns the graphics object used to paint this component.Graphics
JApplet. getGraphics()
Deprecated.Creates a graphics context for this component.Graphics
JComponent. getGraphics()
Returns this component's graphics context, which lets you draw on a component.Graphics
JDialog. getGraphics()
Creates a graphics context for this component.Graphics
JFrame. getGraphics()
Creates a graphics context for this component.Graphics
JWindow. getGraphics()
Creates a graphics context for this component.Methods in javax.swing with parameters of type Graphics Modifier and Type Method Description protected Graphics
JComponent. getComponentGraphics(Graphics g)
Returns the graphics object used to paint this component.void
CellRendererPane. paint(Graphics g)
Shouldn't be called.void
JComponent. paint(Graphics g)
Invoked by Swing to draw components.void
JLayer. paint(Graphics g)
Delegates all painting to theLayerUI
object.void
JLayeredPane. paint(Graphics g)
Paints this JLayeredPane within the specified graphics context.void
JViewport. paint(Graphics g)
Depending on whether thebackingStore
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
AbstractButton. paintBorder(Graphics g)
Paint the button's border ifBorderPainted
property is true and the button has a border.protected void
JComponent. paintBorder(Graphics g)
Paints the component's border.protected void
JMenuBar. paintBorder(Graphics g)
Paints the menubar's border ifBorderPainted
property is true.protected void
JPopupMenu. paintBorder(Graphics g)
Paints the popup menu's border if theborderPainted
property istrue
.protected void
JProgressBar. paintBorder(Graphics g)
Paints the progress bar's border if theborderPainted
property istrue
.protected void
JToolBar. paintBorder(Graphics g)
Paints the tool bar's border if theborderPainted
property istrue
.protected void
JComponent. paintChildren(Graphics g)
Paints this component's children.protected void
JSplitPane. paintChildren(Graphics g)
Subclassed to message the UI withfinishedPaintingChildren
after super has been messaged, as well as painting the border.protected void
Box.Filler. paintComponent(Graphics g)
Paints thisFiller
.protected void
Box. paintComponent(Graphics g)
Paints thisBox
.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, 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, Rectangle r)
Calls this.paintComponent() with the rectangles x,y,width,height fields.protected void
JComponent. paintComponent(Graphics g)
Calls the UI delegate's paint method, if the UI delegate is non-null
.protected void
JInternalFrame. paintComponent(Graphics g)
Overridden to allow optimized painting when the internal frame is being dragged.protected void
JLayer. paintComponent(Graphics g)
This method is empty, because all painting is done byJLayer.paint(Graphics)
andComponentUI.update(Graphics, JComponent)
methodsstatic void
SwingUtilities. paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
Paints a component to the specifiedGraphics
.static void
SwingUtilities. paintComponent(Graphics g, Component c, Container p, Rectangle r)
Paints a component to the specifiedGraphics
.void
Icon. paintIcon(Component c, Graphics g, int x, int y)
Draw the icon at the specified location.void
ImageIcon. paintIcon(Component c, Graphics g, int x, int y)
Paints the icon.void
JComponent. print(Graphics g)
Invoke this method to print the component to the specifiedGraphics
.void
JComponent. printAll(Graphics g)
Invoke this method to print the component.protected void
JComponent. printBorder(Graphics g)
Prints the component's border.protected void
JComponent. printChildren(Graphics g)
Prints this component's children.protected void
JComponent. printComponent(Graphics g)
This is invoked during a printing operation.void
CellRendererPane. update(Graphics g)
Shouldn't be called.void
JApplet. update(Graphics g)
Deprecated.Just callspaint(g)
.void
JComponent. update(Graphics g)
Callspaint
.void
JDialog. update(Graphics g)
Callspaint(g)
.void
JFrame. update(Graphics g)
Just callspaint(g)
.void
JWindow. update(Graphics g)
Callspaint(g)
.Constructors in javax.swing with parameters of type Graphics Constructor Description DebugGraphics(Graphics graphics)
Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.DebugGraphics(Graphics graphics, JComponent component)
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component. -
Uses of Graphics in javax.swing.border
Methods in javax.swing.border with parameters of type Graphics Modifier and Type Method Description 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.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
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
EmptyBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Does no drawing by default.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
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
MatteBorder. paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the matte border.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
StrokeBorder. 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
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.protected void
BevelBorder. paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
Paints a lowered bevel 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)
Paints a raised bevel 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 Modifier and Type Method Description 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 Modifier and Type Method Description 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
ComponentUI. paint(Graphics g, JComponent c)
Paints the specified component appropriately for the look and feel.void
LayerUI. paint(Graphics g, JComponent c)
Paints the specified component.void
ComponentUI. update(Graphics g, JComponent c)
Notifies this UI delegate that it is 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 Modifier and Type Method Description 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)
Draws a bezel.protected void
BasicTreeUI. drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
Draws theicon
centered at (x,y).protected void
BasicTreeUI. drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)
Draws a horizontal dashed line.static void
BasicGraphicsUtils. drawDashedRect(Graphics g, int x, int y, int width, int height)
Draws dashed rectangle.protected void
BasicTreeUI. drawDashedVerticalLine(Graphics g, int x, int y1, int y2)
Draws a vertical dashed line.static void
BasicGraphicsUtils. drawEtchedRect(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws an etched rectangle.static void
BasicGraphicsUtils. drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
Draws a groove.static void
BasicGraphicsUtils. drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Draws a lowered bezel.static void
BasicGraphicsUtils. drawString(Graphics g, String text, int underlinedChar, int x, int y)
Draw a string with the graphicsg
at location (x,y) just likeg.drawString
would.static void
BasicGraphicsUtils. drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
Draw a string with the graphicsg
at location (x
,y
) just likeg.drawString
would.void
BasicSplitPaneUI. finishedPaintingChildren(JSplitPane sp, Graphics g)
Called when the specified split pane has finished painting its children.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
BasicLabelUI. paint(Graphics g, JComponent c)
Paints the label text with the foreground color, if the label is opaque then paints the entire background with the background color.void
BasicListUI. paint(Graphics g, JComponent c)
Paint the rows that intersect the Graphics objects clipRect.void
BasicProgressBarUI. paint(Graphics g, JComponent c)
Delegates painting to one of two methods: paintDeterminate or paintIndeterminate.void
BasicRadioButtonUI. paint(Graphics g, JComponent c)
paint the radio buttonvoid
BasicSplitPaneDivider. paint(Graphics g)
Paints the divider.void
BasicTableUI. paint(Graphics g, JComponent c)
Paint a representation of thetable
instance that was set in installUI().void
BasicTextUI. paint(Graphics g, JComponent c)
Paints the interface.protected void
BasicMenuItemUI. paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
Draws the background of the menu item.protected void
BasicTextUI. paintBackground(Graphics g)
Paints a background for the view.protected void
BasicButtonUI. paintButtonPressed(Graphics g, AbstractButton b)
Paints a pressed button.protected void
BasicListUI. paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer<Object> cellRenderer, ListModel<Object> dataModel, ListSelectionModel selModel, int leadIndex)
Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use theCellRendererPane
to paint it.protected void
BasicTabbedPaneUI. paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
Paints the content border.protected void
BasicTabbedPaneUI. paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Paints the content border bottom edge.protected void
BasicTabbedPaneUI. paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Paints the content border left edge.protected void
BasicTabbedPaneUI. paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Paints the content border right edge.protected void
BasicTabbedPaneUI. paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Paints the content border top edge.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.protected void
BasicScrollBarUI. paintDecreaseHighlight(Graphics g)
Paints the decrease highlight.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
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().protected void
BasicToolBarUI. paintDragWindow(Graphics g)
Paints the contents of the window used for dragging.protected void
BasicTreeUI. paintDropLine(Graphics g)
Paints the drop line.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
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
BasicButtonUI. paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
Paints a focused button.protected void
BasicRadioButtonUI. paintFocus(Graphics g, Rectangle textRect, Dimension size)
Paints focused radio button.void
BasicSliderUI. paintFocus(Graphics g)
Paints focus.protected void
BasicTabbedPaneUI. paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
Paints the focus indicator.protected void
BasicSliderUI. paintHorizontalLabel(Graphics g, int value, Component label)
Called for every label in the label table.protected void
BasicTreeUI. paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
Paints a horizontal line.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
BasicButtonUI. paintIcon(Graphics g, JComponent c, Rectangle iconRect)
Paints an icon of the current button.protected void
BasicTabbedPaneUI. paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
Paints an icon.protected void
BasicToggleButtonUI. paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
Paints an icon in the specified location.protected void
BasicScrollBarUI. paintIncreaseHighlight(Graphics g)
Paints the increase highlight.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.void
BasicSliderUI. paintLabels(Graphics g)
Paints the labels.protected void
BasicSliderUI. paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Paints major tick for horizontal slider.protected void
BasicSliderUI. paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Paints major tick for vertical slider.protected void
BasicMenuItemUI. paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
Paints a menu item.protected void
BasicSliderUI. paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Paints minor tick for horizontal slider.protected void
BasicSliderUI. paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Paints minor tick for vertical slider.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
BasicTextUI. paintSafely(Graphics g)
Paints the interface safely with a guarantee that the model won't change from the view of this thread.protected void
BasicProgressBarUI. paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b)
Paints the progress string.protected void
BasicTabbedPaneUI. paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
Paints a tab.protected void
BasicTabbedPaneUI. paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
Paints the tabs in the tab area.protected void
BasicTabbedPaneUI. paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
Paints the tab background.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
BasicButtonUI. paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
Method which renders the text of the current button.protected void
BasicButtonUI. paintText(Graphics g, JComponent c, Rectangle textRect, String text)
Method which renders the text of the current button.protected void
BasicMenuItemUI. paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
Renders the text of the current menu item.protected void
BasicTabbedPaneUI. paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
Paints text.protected void
BasicScrollBarUI. paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
Paints the thumb.void
BasicSliderUI. paintThumb(Graphics g)
Paints the thumb.void
BasicSliderUI. paintTicks(Graphics g)
Paints ticks.protected void
BasicInternalFrameTitlePane. paintTitleBackground(Graphics g)
Invoked from paintComponent.protected void
BasicScrollBarUI. paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
Paints the track.void
BasicSliderUI. paintTrack(Graphics g)
Paints track.void
BasicArrowButton. paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
Paints a triangle.protected void
BasicSliderUI. paintVerticalLabel(Graphics g, int value, Component label)
Called for every label in the label table.protected void
BasicTreeUI. paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
Paints a vertical line.protected void
BasicTreeUI. paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
Paints the vertical part of the leg.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
BasicTextUI. update(Graphics g, JComponent c)
Superclass paints background in an uncontrollable way (i.e. one might want an image tiled into the background). -
Uses of Graphics in javax.swing.plaf.metal
Methods in javax.swing.plaf.metal with parameters of type Graphics Modifier and Type Method Description protected void
MetalCheckBoxIcon. drawCheck(Component c, Graphics g, int x, int y)
PaintsMetalCheckBoxIcon
.protected void
MetalTabbedPaneUI. paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
Paints the bottom tab border.void
MetalComboBoxUI. paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
If necessary paints the currently selected item.void
MetalComboBoxUI. paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
If necessary paints the background of the currently selected item.void
MetalProgressBarUI. paintDeterminate(Graphics g, JComponent c)
Draws a bit of special highlighting on the progress bar.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.protected void
MetalTreeUI. paintHorizontalSeparators(Graphics g, JComponent c)
Paints the horizontal separators.void
MetalComboBoxIcon. paintIcon(Component c, Graphics g, int x, int y)
Paints the horizontal bars for theprotected void
MetalToggleButtonUI. paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
Paints the appropriate icon of the buttonb
in the spaceiconRect
.void
MetalProgressBarUI. paintIndeterminate(Graphics g, JComponent c)
Draws a bit of special highlighting on the progress bar and bouncing box.protected void
MetalTabbedPaneUI. paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
Paints the left tab border.void
MetalIconFactory.TreeControlIcon. paintMe(Component c, Graphics g, int x, int y)
Paints theTreeControlIcon
.void
MetalInternalFrameTitlePane. paintPalette(Graphics g)
Paints palette.protected void
MetalTabbedPaneUI. paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
Paints the right tab border.protected void
MetalTabbedPaneUI. paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
Paints the top tab border.void
MetalButtonUI. update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokespaint
.void
MetalMenuBarUI. update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokespaint
.void
MetalToggleButtonUI. update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokespaint
.void
MetalToolBarUI. update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokespaint
. -
Uses of Graphics in javax.swing.plaf.multi
Methods in javax.swing.plaf.multi with parameters of type Graphics Modifier and Type Method Description void
MultiSplitPaneUI. finishedPaintingChildren(JSplitPane a, Graphics b)
Invokes thefinishedPaintingChildren
method on each UI handled by this object.void
MultiButtonUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiColorChooserUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiComboBoxUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiDesktopIconUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiDesktopPaneUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiFileChooserUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiInternalFrameUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiLabelUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiListUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiMenuBarUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiMenuItemUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiOptionPaneUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiPanelUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiPopupMenuUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiProgressBarUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiRootPaneUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiScrollBarUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiScrollPaneUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiSeparatorUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiSliderUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiSpinnerUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiSplitPaneUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiTabbedPaneUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiTableHeaderUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiTableUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiTextUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiToolBarUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiToolTipUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiTreeUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiViewportUI. paint(Graphics a, JComponent b)
Invokes thepaint
method on each UI handled by this object.void
MultiButtonUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiColorChooserUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiComboBoxUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiDesktopIconUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiDesktopPaneUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiFileChooserUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiInternalFrameUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiLabelUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiListUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiMenuBarUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiMenuItemUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiOptionPaneUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiPanelUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiPopupMenuUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiProgressBarUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiRootPaneUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiScrollBarUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiScrollPaneUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiSeparatorUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiSliderUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiSpinnerUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiSplitPaneUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiTabbedPaneUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiTableHeaderUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiTableUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiTextUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiToolBarUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiToolTipUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiTreeUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object.void
MultiViewportUI. update(Graphics a, JComponent b)
Invokes theupdate
method on each UI handled by this object. -
Uses of Graphics in javax.swing.plaf.synth
Methods in javax.swing.plaf.synth with parameters of type Graphics Modifier and Type Method Description void
SynthGraphicsUtils. drawLine(SynthContext context, Object paintKey, Graphics g, int x1, int y1, int x2, int y2)
Draws a line between the two end points.void
SynthGraphicsUtils. drawLine(SynthContext context, Object paintKey, Graphics g, int x1, int y1, int x2, int y2, Object styleKey)
Draws a line between the two end points.void
SynthButtonUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthButtonUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthColorChooserUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthColorChooserUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthComboBoxUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthComboBoxUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthDesktopIconUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthDesktopIconUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthDesktopPaneUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthDesktopPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.protected void
SynthEditorPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthInternalFrameUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthInternalFrameUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthLabelUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthLabelUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthMenuBarUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthMenuBarUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthMenuItemUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthMenuItemUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthMenuUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthMenuUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthOptionPaneUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthOptionPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthPanelUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthPanelUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthPopupMenuUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthPopupMenuUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthProgressBarUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthProgressBarUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthRootPaneUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthRootPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthScrollBarUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthScrollBarUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthScrollPaneUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthScrollPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthSeparatorUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthSeparatorUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthSliderUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthSliderUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthSpinnerUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthSpinnerUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthSplitPaneUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthSplitPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthTabbedPaneUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthTabbedPaneUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthTableHeaderUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthTableHeaderUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthTableUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthTableUI. paint(SynthContext context, Graphics g)
Paints the specified component.protected void
SynthTextAreaUI. paint(SynthContext context, Graphics g)
Paints the specified component.protected void
SynthTextFieldUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthToolBarUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthToolBarUI. paint(SynthContext context, Graphics g)
Paints the toolbar.void
SynthToolTipUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthToolTipUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthTreeUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthTreeUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthViewportUI. paint(Graphics g, JComponent c)
Paints the specified component according to the Look and Feel.protected void
SynthViewportUI. paint(SynthContext context, Graphics g)
Paints the specified component.void
SynthPainter. paintArrowButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of an arrow button.void
SynthPainter. paintArrowButtonBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of an arrow button.void
SynthPainter. paintArrowButtonForeground(SynthContext context, Graphics g, int x, int y, int w, int h, int direction)
Paints the foreground of an arrow button.protected void
SynthTextAreaUI. paintBackground(Graphics g)
Paints a background for the view.protected void
SynthTextFieldUI. paintBackground(Graphics g)
Paints a background for the view.void
SynthUI. paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border.void
SynthViewportUI. paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border.void
SynthPainter. paintButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a button.void
SynthPainter. paintButtonBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a button.void
SynthPainter. paintCheckBoxBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a check box.void
SynthPainter. paintCheckBoxBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a check box.void
SynthPainter. paintCheckBoxMenuItemBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a check box menu item.void
SynthPainter. paintCheckBoxMenuItemBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a check box menu item.void
SynthPainter. paintColorChooserBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a color chooser.void
SynthPainter. paintColorChooserBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a color chooser.void
SynthPainter. paintComboBoxBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a combo box.void
SynthPainter. paintComboBoxBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a combo box.protected void
SynthToolBarUI. paintContent(SynthContext context, Graphics g, Rectangle bounds)
Paints the toolbar content.void
SynthComboBoxUI. paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
Paints the currently selected item.void
SynthPainter. paintDesktopIconBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a desktop icon.void
SynthPainter. paintDesktopIconBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a desktop icon.void
SynthPainter. paintDesktopPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a desktop pane.void
SynthPainter. paintDesktopPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a desktop pane.void
SynthPainter. paintEditorPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of an editor pane.void
SynthPainter. paintEditorPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of an editor pane.void
SynthPainter. paintFileChooserBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a file chooser.void
SynthPainter. paintFileChooserBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a file chooser.void
SynthPainter. paintFormattedTextFieldBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a formatted text field.void
SynthPainter. paintFormattedTextFieldBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a formatted text field.static void
SynthGraphicsUtils. paintIcon(Icon icon, SynthContext context, Graphics g, int x, int y, int width, int height)
Paints the icon.void
SynthIcon. paintIcon(SynthContext context, Graphics g, int x, int y, int width, int height)
Paints the icon at the specified location for the given synth context.void
SynthPainter. paintInternalFrameBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of an internal frame.void
SynthPainter. paintInternalFrameBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of an internal frame.void
SynthPainter. paintInternalFrameTitlePaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of an internal frame title pane.void
SynthPainter. paintInternalFrameTitlePaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of an internal frame title pane.void
SynthPainter. paintLabelBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a label.void
SynthPainter. paintLabelBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a label.void
SynthPainter. paintListBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a list.void
SynthPainter. paintListBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a list.void
SynthPainter. paintMenuBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a menu.void
SynthPainter. paintMenuBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a menu bar.void
SynthPainter. paintMenuBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a menu bar.void
SynthPainter. paintMenuBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a menu.void
SynthPainter. paintMenuItemBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a menu item.void
SynthPainter. paintMenuItemBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a menu item.void
SynthPainter. paintOptionPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of an option pane.void
SynthPainter. paintOptionPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of an option pane.void
SynthPainter. paintPanelBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a panel.void
SynthPainter. paintPanelBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a panel.void
SynthPainter. paintPasswordFieldBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a password field.void
SynthPainter. paintPasswordFieldBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a password field.void
SynthPainter. paintPopupMenuBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a popup menu.void
SynthPainter. paintPopupMenuBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a popup menu.void
SynthPainter. paintProgressBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a progress bar.void
SynthPainter. paintProgressBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of a progress bar.void
SynthPainter. paintProgressBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a progress bar.void
SynthPainter. paintProgressBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of a progress bar.void
SynthPainter. paintProgressBarForeground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the foreground of a progress bar. is responsible for providing an indication of the progress of the progress bar.void
SynthPainter. paintRadioButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a radio button.void
SynthPainter. paintRadioButtonBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a radio button.void
SynthPainter. paintRadioButtonMenuItemBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a radio button menu item.void
SynthPainter. paintRadioButtonMenuItemBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a radio button menu item.void
SynthPainter. paintRootPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a root pane.void
SynthPainter. paintRootPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a root pane.void
SynthPainter. paintScrollBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a scrollbar.void
SynthPainter. paintScrollBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of a scrollbar.void
SynthPainter. paintScrollBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a scrollbar.void
SynthPainter. paintScrollBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of a scrollbar.void
SynthPainter. paintScrollBarThumbBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the thumb of a scrollbar.void
SynthPainter. paintScrollBarThumbBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the thumb of a scrollbar.void
SynthPainter. paintScrollBarTrackBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the track of a scrollbar.void
SynthPainter. paintScrollBarTrackBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the track of a scrollbar.void
SynthPainter. paintScrollBarTrackBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the track of a scrollbar.void
SynthPainter. paintScrollBarTrackBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the track of a scrollbar.void
SynthPainter. paintScrollPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a scroll pane.void
SynthPainter. paintScrollPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a scroll pane.void
SynthPainter. paintSeparatorBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a separator.void
SynthPainter. paintSeparatorBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of a separator.void
SynthPainter. paintSeparatorBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a separator.void
SynthPainter. paintSeparatorBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of a separator.void
SynthPainter. paintSeparatorForeground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the foreground of a separator.void
SynthPainter. paintSliderBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a slider.void
SynthPainter. paintSliderBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of a slider.void
SynthPainter. paintSliderBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a slider.void
SynthPainter. paintSliderBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of a slider.void
SynthPainter. paintSliderThumbBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the thumb of a slider.void
SynthPainter. paintSliderThumbBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the thumb of a slider.void
SynthPainter. paintSliderTrackBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the track of a slider.void
SynthPainter. paintSliderTrackBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the track of a slider.void
SynthPainter. paintSliderTrackBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the track of a slider.void
SynthPainter. paintSliderTrackBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the track of a slider.void
SynthPainter. paintSpinnerBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a spinner.void
SynthPainter. paintSpinnerBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a spinner.void
SynthPainter. paintSplitPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a split pane.void
SynthPainter. paintSplitPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a split pane.void
SynthPainter. paintSplitPaneDividerBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the divider of a split pane.void
SynthPainter. paintSplitPaneDividerBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the divider of a split pane.void
SynthPainter. paintSplitPaneDividerForeground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the foreground of the divider of a split pane.void
SynthPainter. paintSplitPaneDragDivider(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the divider, when the user is dragging the divider, of a split pane.void
SynthPainter. paintTabbedPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a tabbed pane.void
SynthPainter. paintTabbedPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a tabbed pane.void
SynthPainter. paintTabbedPaneContentBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the area that contains the content of the selected tab of a tabbed pane.void
SynthPainter. paintTabbedPaneContentBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the area that contains the content of the selected tab of a tabbed pane.void
SynthPainter. paintTabbedPaneTabAreaBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the area behind the tabs of a tabbed pane.void
SynthPainter. paintTabbedPaneTabAreaBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the area behind the tabs of a tabbed pane.void
SynthPainter. paintTabbedPaneTabAreaBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the area behind the tabs of a tabbed pane.void
SynthPainter. paintTabbedPaneTabAreaBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the area behind the tabs of a tabbed pane.void
SynthPainter. paintTabbedPaneTabBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex)
Paints the background of a tab of a tabbed pane.void
SynthPainter. paintTabbedPaneTabBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex, int orientation)
Paints the background of a tab of a tabbed pane.void
SynthPainter. paintTabbedPaneTabBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex)
Paints the border of a tab of a tabbed pane.void
SynthPainter. paintTabbedPaneTabBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex, int orientation)
Paints the border of a tab of a tabbed pane.void
SynthPainter. paintTableBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a table.void
SynthPainter. paintTableBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a table.void
SynthPainter. paintTableHeaderBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the header of a table.void
SynthPainter. paintTableHeaderBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the header of a table.void
SynthGraphicsUtils. paintText(SynthContext ss, Graphics g, String text, int x, int y, int mnemonicIndex)
Paints text at the specified location.void
SynthGraphicsUtils. paintText(SynthContext ss, Graphics g, String text, Rectangle bounds, int mnemonicIndex)
Paints text at the specified location.void
SynthGraphicsUtils. paintText(SynthContext ss, Graphics g, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex, int textOffset)
Paints an icon and text.protected void
SynthProgressBarUI. paintText(SynthContext context, Graphics g, String title)
Paints the component's text.void
SynthPainter. paintTextAreaBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a text area.void
SynthPainter. paintTextAreaBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a text area.void
SynthPainter. paintTextFieldBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a text field.void
SynthPainter. paintTextFieldBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a text field.void
SynthPainter. paintTextPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a text pane.void
SynthPainter. paintTextPaneBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a text pane.protected void
SynthScrollBarUI. paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
Paints the scrollbar thumb.protected void
SynthSliderUI. paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
Paints the slider thumb.void
SynthPainter. paintToggleButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a toggle button.void
SynthPainter. paintToggleButtonBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a toggle button.void
SynthPainter. paintToolBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a tool bar.void
SynthPainter. paintToolBarBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of a tool bar.void
SynthPainter. paintToolBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a tool bar.void
SynthPainter. paintToolBarBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of a tool bar.void
SynthPainter. paintToolBarContentBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the tool bar's content area.void
SynthPainter. paintToolBarContentBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the tool bar's content area.void
SynthPainter. paintToolBarContentBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the content area of a tool bar.void
SynthPainter. paintToolBarContentBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the content area of a tool bar.void
SynthPainter. paintToolBarDragWindowBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the window containing the tool bar when it has been detached from its primary frame.void
SynthPainter. paintToolBarDragWindowBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the background of the window containing the tool bar when it has been detached from its primary frame.void
SynthPainter. paintToolBarDragWindowBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the window containing the tool bar when it has been detached from it's primary frame.void
SynthPainter. paintToolBarDragWindowBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation)
Paints the border of the window containing the tool bar when it has been detached from it's primary frame.void
SynthPainter. paintToolTipBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a tool tip.void
SynthPainter. paintToolTipBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a tool tip.protected void
SynthScrollBarUI. paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
Paints the scrollbar track.protected void
SynthSliderUI. paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
Paints the slider track.void
SynthPainter. paintTreeBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of a tree.void
SynthPainter. paintTreeBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a tree.void
SynthPainter. paintTreeCellBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the row containing a cell in a tree.void
SynthPainter. paintTreeCellBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of the row containing a cell in a tree.void
SynthPainter. paintTreeCellFocus(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the focus indicator for a cell in a tree when it has focus.void
SynthPainter. paintViewportBackground(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the background of the viewport.void
SynthPainter. paintViewportBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Paints the border of a viewport.void
SynthButtonUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthColorChooserUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthComboBoxUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthDesktopIconUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthDesktopPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthEditorPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthInternalFrameUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthLabelUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthListUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthMenuBarUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthMenuItemUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthMenuUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthOptionPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthPanelUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthPopupMenuUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthProgressBarUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthRootPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthScrollBarUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthScrollPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthSeparatorUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthSliderUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthSpinnerUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthSplitPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthTabbedPaneUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthTableHeaderUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthTableUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthTextAreaUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthTextFieldUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthToolBarUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthToolTipUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthTreeUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component.void
SynthViewportUI. update(Graphics g, JComponent c)
Notifies this UI delegate to repaint the specified component. -
Uses of Graphics in javax.swing.text
Methods in javax.swing.text that return Graphics Modifier and Type Method Description Graphics
View. getGraphics()
Fetch aGraphics
for rendering.Methods in javax.swing.text with parameters of type Graphics Modifier and Type Method Description protected int
PasswordView. drawEchoCharacter(Graphics g, int x, int y, char c)
Deprecated.protected void
PlainView. drawLine(int lineIndex, Graphics g, int x, int y)
Deprecated.protected void
WrappedPlainView. drawLine(int p0, int p1, Graphics g, int x, int y)
Deprecated.protected int
PasswordView. drawSelectedText(Graphics g, int x, int y, int p0, int p1)
Deprecated.protected int
PlainView. drawSelectedText(Graphics g, int x, int y, int p0, int p1)
Deprecated.protected int
WrappedPlainView. drawSelectedText(Graphics g, int x, int y, int p0, int p1)
Deprecated.static int
Utilities. drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
Deprecated.protected int
PasswordView. drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Deprecated.protected int
PlainView. drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Deprecated.protected int
WrappedPlainView. drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
Deprecated.void
AsyncBoxView. paint(Graphics g, Shape alloc)
Render the view using the given allocation and rendering surface.void
BoxView. paint(Graphics g, Shape allocation)
Renders theBoxView
using the given rendering surface and area on that surface.void
Caret. paint(Graphics g)
Renders the caret.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).void
DefaultCaret. paint(Graphics g)
Renders the caret as a vertical line.void
DefaultHighlighter.DefaultHighlightPainter. paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
Paints a highlight.void
DefaultHighlighter. paint(Graphics g)
Renders the highlights.void
FieldView. paint(Graphics g, Shape a)
Renders using the given rendering surface and area on that surface.abstract void
GlyphView.GlyphPainter. paint(GlyphView v, Graphics g, Shape a, int p0, int p1)
Paint the glyphs representing the given range.void
GlyphView. paint(Graphics g, Shape a)
Renders a portion of a text style run.void
Highlighter.HighlightPainter. paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c)
Renders the highlight.void
Highlighter. paint(Graphics g)
Renders the highlights.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
PlainView. paint(Graphics g, Shape a)
Renders using the given rendering surface and area on that surface.abstract void
View. paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface.void
WrappedPlainView. paint(Graphics g, Shape a)
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
AsyncBoxView.ChildLocator. paintChildren(Graphics g)
Paint the children that intersect the clip area.Shape
DefaultHighlighter.DefaultHighlightPainter. paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
Paints a portion of a highlight.abstract 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)
When leaf Views (such as LabelView) are rendering they should call into this method.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. -
Uses of Graphics in javax.swing.text.html
Methods in javax.swing.text.html with parameters of type Graphics Modifier and Type Method Description void
BlockView. paint(Graphics g, Shape allocation)
Renders using the given rendering surface and area on that surface.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.void
ParagraphView. paint(Graphics g, Shape a)
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.protected void
ListView. paintChild(Graphics g, Rectangle alloc, int index)
Paints one of the children; called by paint(). -
Uses of Graphics in javax.swing.tree
Methods in javax.swing.tree with parameters of type Graphics Modifier and Type Method Description void
DefaultTreeCellEditor.EditorContainer. paint(Graphics g)
OverridesContainer.paint
to paint the node's icon and use the selection color for the background.void
DefaultTreeCellRenderer. paint(Graphics g)
Paints the value.
-