java.lang.Object | |
↳ | javax.swing.plaf.synth.SynthGraphicsUtils |
Wrapper for primitive graphics calls.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a
SynthGraphicsUtils . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the size of the passed in string.
| |||||||||||
Draws a line between the two end points.
| |||||||||||
Draws a line between the two end points.
| |||||||||||
Returns the maximum height of the the Font from the passed in
SynthContext.
| |||||||||||
Returns the maximum size needed to properly render an icon and text.
| |||||||||||
Returns the minimum size needed to properly render an icon and text.
| |||||||||||
Returns the preferred size needed to properly render an icon and text.
| |||||||||||
Lays out text and an icon returning, by reference, the location to
place the icon and text.
| |||||||||||
Paints text at the specified location.
| |||||||||||
Paints an icon and text.
| |||||||||||
Paints text at the specified location.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a SynthGraphicsUtils
.
Returns the size of the passed in string.
ss | SynthContext |
---|---|
font | Font to use |
metrics | FontMetrics, may be ignored |
text | Text to get size of. |
Draws a line between the two end points.
This implementation supports only one line style key,
"dashed"
. The "dashed"
line style is applied
only to vertical and horizontal lines.
Specifying null
or any key different from
"dashed"
will draw solid lines.
context | identifies hosting region |
---|---|
paintKey | identifies the portion of the component being asked to paint, may be null |
g | Graphics object to paint to |
x1 | x origin |
y1 | y origin |
x2 | x destination |
y2 | y destination |
styleKey | identifies the requested style of the line (e.g. "dashed") |
Draws a line between the two end points.
context | Identifies hosting region. |
---|---|
paintKey | Identifies the portion of the component being asked to paint, may be null. |
g | Graphics object to paint to |
x1 | x origin |
y1 | y origin |
x2 | x destination |
y2 | y destination |
Returns the maximum height of the the Font from the passed in SynthContext.
context | SynthContext used to determine font. |
---|
Returns the maximum size needed to properly render an icon and text.
ss | SynthContext |
---|---|
font | Font to use |
text | Text to layout |
icon | Icon to layout |
hAlign | horizontal alignment |
vAlign | vertical alignment |
hTextPosition | horizontal text position |
vTextPosition | vertical text position |
iconTextGap | gap between icon and text |
mnemonicIndex | Index into text to render the mnemonic at, -1 indicates no mnemonic. |
Returns the minimum size needed to properly render an icon and text.
ss | SynthContext |
---|---|
font | Font to use |
text | Text to layout |
icon | Icon to layout |
hAlign | horizontal alignment |
vAlign | vertical alignment |
hTextPosition | horizontal text position |
vTextPosition | vertical text position |
iconTextGap | gap between icon and text |
mnemonicIndex | Index into text to render the mnemonic at, -1 indicates no mnemonic. |
Returns the preferred size needed to properly render an icon and text.
ss | SynthContext |
---|---|
font | Font to use |
text | Text to layout |
icon | Icon to layout |
hAlign | horizontal alignment |
vAlign | vertical alignment |
hTextPosition | horizontal text position |
vTextPosition | vertical text position |
iconTextGap | gap between icon and text |
mnemonicIndex | Index into text to render the mnemonic at, -1 indicates no mnemonic. |
Lays out text and an icon returning, by reference, the location to place the icon and text.
ss | SynthContext |
---|---|
fm | FontMetrics for the Font to use, this may be ignored |
text | Text to layout |
icon | Icon to layout |
hAlign | horizontal alignment |
vAlign | vertical alignment |
hTextPosition | horizontal text position |
vTextPosition | vertical text position |
viewR | Rectangle to layout text and icon in. |
iconR | Rectangle to place icon bounds in |
textR | Rectangle to place text in |
iconTextGap | gap between icon and text |
Paints text at the specified location. This will not attempt to render the text as html nor will it offset by the insets of the component.
ss | SynthContext |
---|---|
g | Graphics used to render string in. |
text | Text to render |
bounds | Bounds of the text to be drawn. |
mnemonicIndex | Index to draw string at. |
Paints an icon and text. This will render the text as html, if necessary, and offset the location by the insets of the component.
ss | SynthContext |
---|---|
g | Graphics to render string and icon into |
text | Text to layout |
icon | Icon to layout |
hAlign | horizontal alignment |
vAlign | vertical alignment |
hTextPosition | horizontal text position |
vTextPosition | vertical text position |
iconTextGap | gap between icon and text |
mnemonicIndex | Index into text to render the mnemonic at, -1 indicates no mnemonic. |
textOffset | Amount to offset the text when painting |
Paints text at the specified location. This will not attempt to render the text as html nor will it offset by the insets of the component.
ss | SynthContext |
---|---|
g | Graphics used to render string in. |
text | Text to render |
x | X location to draw text at. |
y | Upper left corner to draw text at. |
mnemonicIndex | Index to draw string at. |