Uses of Class
java.awt.Graphics2D
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides classes and interface relating to fonts.
Provides classes for creating and modifying images.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides user interface objects built according to the Basic look and feel.
Provides user interface objects built according to the cross-platform Nimbus
look and feel.
Provides classes and interfaces that deal with editable and noneditable text
components.
-
Uses of Graphics2D in java.awt
Modifier and TypeMethodDescriptionabstract Graphics2D
GraphicsEnvironment.createGraphics(BufferedImage img)
Returns aGraphics2D
object for rendering into the specifiedBufferedImage
.SplashScreen.createGraphics()
Creates a graphics context (as aGraphics2D
object) for the splash screen overlay image, which allows you to draw over the splash screen. -
Uses of Graphics2D in java.awt.font
Modifier and TypeMethodDescriptionabstract void
GraphicAttribute.draw(Graphics2D graphics, float x, float y)
Renders thisGraphicAttribute
at the specified location.void
ImageGraphicAttribute.draw(Graphics2D graphics, float x, float y)
Renders thisGraphicAttribute
at the specified location.void
ShapeGraphicAttribute.draw(Graphics2D graphics, float x, float y)
Renders thisGraphicAttribute
at the specified location.void
TextLayout.draw(Graphics2D g2, float x, float y)
Renders thisTextLayout
at the specified location in the specifiedGraphics2D
context. -
Uses of Graphics2D in java.awt.image
Modifier and TypeMethodDescriptionBufferedImage.createGraphics()
Creates aGraphics2D
, which can be used to draw into thisBufferedImage
.abstract Graphics2D
VolatileImage.createGraphics()
Creates aGraphics2D
, which can be used to draw into thisVolatileImage
. -
Uses of Graphics2D in javax.swing
Modifier and TypeMethodDescriptionvoid
Painter.paint(Graphics2D g, T object, int width, int height)
Renders to the givenGraphics2D
object. -
Uses of Graphics2D in javax.swing.plaf.basic
Modifier and TypeMethodDescriptionstatic void
BasicGraphicsUtils.drawString(JComponent c, Graphics2D g, String string, float x, float y)
Draws the given string at the specified location using text properties and anti-aliasing hints from the provided component.static void
BasicGraphicsUtils.drawStringUnderlineCharAt(JComponent c, Graphics2D g, String string, int underlinedIndex, float x, float y)
Draws the given string at the specified location underlining the specified character. -
Uses of Graphics2D in javax.swing.plaf.nimbus
Modifier and TypeMethodDescriptionprotected void
AbstractRegionPainter.configureGraphics(Graphics2D g)
Configures the given Graphics2D.protected abstract void
AbstractRegionPainter.doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys)
Actually performs the painting operation.void
AbstractRegionPainter.paint(Graphics2D g, JComponent c, int w, int h)
Renders to the givenGraphics2D
object. -
Uses of Graphics2D in javax.swing.text
Modifier and TypeMethodDescriptionprotected float
PasswordView.drawEchoCharacter(Graphics2D g, float x, float y, char c)
Renders the echo character, or whatever graphic should be used to display the password characters.protected void
PlainView.drawLine(int lineIndex, Graphics2D g, float x, float y)
Renders a line of text, suppressing whitespace at the end and expanding any tabs.protected void
WrappedPlainView.drawLine(int p0, int p1, Graphics2D g, float x, float y)
Renders a line of text, suppressing whitespace at the end and expanding any tabs.protected float
PlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1)
Renders the given range in the model as selected text.protected float
WrappedPlainView.drawSelectedText(Graphics2D g, float x, float y, int p0, int p1)
Renders the given range in the model as selected text.static float
Utilities.drawTabbedText(Segment s, float x, float y, Graphics2D g, TabExpander e, int startOffset)
Draws the given text, expanding any tabs that are contained using the given tab expansion technique.protected float
PlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1)
Renders the given range in the model as normal unselected text.protected float
WrappedPlainView.drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1)
Renders the given range in the model as normal unselected text.