Liking cljdoc? Tell your friends :D

javax.swing.plaf.synth.SynthGraphicsUtils

Wrapper for primitive graphics calls.

Wrapper for primitive graphics calls.
raw docstring

->synth-graphics-utilsclj

(->synth-graphics-utils)

Constructor.

Creates a SynthGraphicsUtils.

Constructor.

Creates a SynthGraphicsUtils.
raw docstring

compute-string-widthclj

(compute-string-width this ss font metrics text)

Returns the size of the passed in string.

ss - SynthContext - javax.swing.plaf.synth.SynthContext font - Font to use - java.awt.Font metrics - FontMetrics, may be ignored - java.awt.FontMetrics text - Text to get size of. - java.lang.String

returns: int

Returns the size of the passed in string.

ss - SynthContext - `javax.swing.plaf.synth.SynthContext`
font - Font to use - `java.awt.Font`
metrics - FontMetrics, may be ignored - `java.awt.FontMetrics`
text - Text to get size of. - `java.lang.String`

returns: `int`
raw docstring

draw-lineclj

(draw-line this context paint-key g x-1 y-1 x-2 y-2)
(draw-line this context paint-key g x-1 y-1 x-2 y-2 style-key)

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 - javax.swing.plaf.synth.SynthContext paint-key - identifies the portion of the component being asked to paint, may be null - java.lang.Object g - Graphics object to paint to - java.awt.Graphics x-1 - x origin - int y-1 - y origin - int x-2 - x destination - int y-2 - y destination - int style-key - identifies the requested style of the line (e.g. "dashed") - java.lang.Object

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 - `javax.swing.plaf.synth.SynthContext`
paint-key - identifies the portion of the component being asked to paint, may be null - `java.lang.Object`
g - Graphics object to paint to - `java.awt.Graphics`
x-1 - x origin - `int`
y-1 - y origin - `int`
x-2 - x destination - `int`
y-2 - y destination - `int`
style-key - identifies the requested style of the line (e.g. "dashed") - `java.lang.Object`
raw docstring

get-maximum-char-heightclj

(get-maximum-char-height this context)

Returns the maximum height of the the Font from the passed in SynthContext.

context - SynthContext used to determine font. - javax.swing.plaf.synth.SynthContext

returns: maximum height of the characters for the font from the passed in context. - int

Returns the maximum height of the the Font from the passed in
 SynthContext.

context - SynthContext used to determine font. - `javax.swing.plaf.synth.SynthContext`

returns: maximum height of the characters for the font from the passed
         in context. - `int`
raw docstring

get-maximum-sizeclj

(get-maximum-size this
                  ss
                  font
                  text
                  icon
                  h-align
                  v-align
                  h-text-position
                  v-text-position
                  icon-text-gap
                  mnemonic-index)

Returns the maximum size needed to properly render an icon and text.

ss - SynthContext - javax.swing.plaf.synth.SynthContext font - Font to use - java.awt.Font text - Text to layout - java.lang.String icon - Icon to layout - javax.swing.Icon h-align - horizontal alignment - int v-align - vertical alignment - int h-text-position - horizontal text position - int v-text-position - vertical text position - int icon-text-gap - gap between icon and text - int mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - int

returns: java.awt.Dimension

Returns the maximum size needed to properly render an icon and text.

ss - SynthContext - `javax.swing.plaf.synth.SynthContext`
font - Font to use - `java.awt.Font`
text - Text to layout - `java.lang.String`
icon - Icon to layout - `javax.swing.Icon`
h-align - horizontal alignment - `int`
v-align - vertical alignment - `int`
h-text-position - horizontal text position - `int`
v-text-position - vertical text position - `int`
icon-text-gap - gap between icon and text - `int`
mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - `int`

returns: `java.awt.Dimension`
raw docstring

get-minimum-sizeclj

(get-minimum-size this
                  ss
                  font
                  text
                  icon
                  h-align
                  v-align
                  h-text-position
                  v-text-position
                  icon-text-gap
                  mnemonic-index)

Returns the minimum size needed to properly render an icon and text.

ss - SynthContext - javax.swing.plaf.synth.SynthContext font - Font to use - java.awt.Font text - Text to layout - java.lang.String icon - Icon to layout - javax.swing.Icon h-align - horizontal alignment - int v-align - vertical alignment - int h-text-position - horizontal text position - int v-text-position - vertical text position - int icon-text-gap - gap between icon and text - int mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - int

returns: java.awt.Dimension

Returns the minimum size needed to properly render an icon and text.

ss - SynthContext - `javax.swing.plaf.synth.SynthContext`
font - Font to use - `java.awt.Font`
text - Text to layout - `java.lang.String`
icon - Icon to layout - `javax.swing.Icon`
h-align - horizontal alignment - `int`
v-align - vertical alignment - `int`
h-text-position - horizontal text position - `int`
v-text-position - vertical text position - `int`
icon-text-gap - gap between icon and text - `int`
mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - `int`

returns: `java.awt.Dimension`
raw docstring

get-preferred-sizeclj

(get-preferred-size this
                    ss
                    font
                    text
                    icon
                    h-align
                    v-align
                    h-text-position
                    v-text-position
                    icon-text-gap
                    mnemonic-index)

Returns the preferred size needed to properly render an icon and text.

ss - SynthContext - javax.swing.plaf.synth.SynthContext font - Font to use - java.awt.Font text - Text to layout - java.lang.String icon - Icon to layout - javax.swing.Icon h-align - horizontal alignment - int v-align - vertical alignment - int h-text-position - horizontal text position - int v-text-position - vertical text position - int icon-text-gap - gap between icon and text - int mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - int

returns: java.awt.Dimension

Returns the preferred size needed to properly render an icon and text.

ss - SynthContext - `javax.swing.plaf.synth.SynthContext`
font - Font to use - `java.awt.Font`
text - Text to layout - `java.lang.String`
icon - Icon to layout - `javax.swing.Icon`
h-align - horizontal alignment - `int`
v-align - vertical alignment - `int`
h-text-position - horizontal text position - `int`
v-text-position - vertical text position - `int`
icon-text-gap - gap between icon and text - `int`
mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - `int`

returns: `java.awt.Dimension`
raw docstring

layout-textclj

(layout-text this
             ss
             fm
             text
             icon
             h-align
             v-align
             h-text-position
             v-text-position
             view-r
             icon-r
             text-r
             icon-text-gap)

Lays out text and an icon returning, by reference, the location to place the icon and text.

ss - SynthContext - javax.swing.plaf.synth.SynthContext fm - FontMetrics for the Font to use, this may be ignored - java.awt.FontMetrics text - Text to layout - java.lang.String icon - Icon to layout - javax.swing.Icon h-align - horizontal alignment - int v-align - vertical alignment - int h-text-position - horizontal text position - int v-text-position - vertical text position - int view-r - Rectangle to layout text and icon in. - java.awt.Rectangle icon-r - Rectangle to place icon bounds in - java.awt.Rectangle text-r - Rectangle to place text in - java.awt.Rectangle icon-text-gap - gap between icon and text - int

returns: java.lang.String

Lays out text and an icon returning, by reference, the location to
 place the icon and text.

ss - SynthContext - `javax.swing.plaf.synth.SynthContext`
fm - FontMetrics for the Font to use, this may be ignored - `java.awt.FontMetrics`
text - Text to layout - `java.lang.String`
icon - Icon to layout - `javax.swing.Icon`
h-align - horizontal alignment - `int`
v-align - vertical alignment - `int`
h-text-position - horizontal text position - `int`
v-text-position - vertical text position - `int`
view-r - Rectangle to layout text and icon in. - `java.awt.Rectangle`
icon-r - Rectangle to place icon bounds in - `java.awt.Rectangle`
text-r - Rectangle to place text in - `java.awt.Rectangle`
icon-text-gap - gap between icon and text - `int`

returns: `java.lang.String`
raw docstring

paint-textclj

(paint-text this ss g text bounds mnemonic-index)
(paint-text this ss g text x y mnemonic-index)
(paint-text this
            ss
            g
            text
            icon
            h-align
            v-align
            h-text-position
            v-text-position
            icon-text-gap
            mnemonic-index
            text-offset)

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 - javax.swing.plaf.synth.SynthContext g - Graphics to render string and icon into - java.awt.Graphics text - Text to layout - java.lang.String icon - Icon to layout - javax.swing.Icon h-align - horizontal alignment - int v-align - vertical alignment - int h-text-position - horizontal text position - int v-text-position - vertical text position - int icon-text-gap - gap between icon and text - int mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - int text-offset - Amount to offset the text when painting - int

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 - `javax.swing.plaf.synth.SynthContext`
g - Graphics to render string and icon into - `java.awt.Graphics`
text - Text to layout - `java.lang.String`
icon - Icon to layout - `javax.swing.Icon`
h-align - horizontal alignment - `int`
v-align - vertical alignment - `int`
h-text-position - horizontal text position - `int`
v-text-position - vertical text position - `int`
icon-text-gap - gap between icon and text - `int`
mnemonic-index - Index into text to render the mnemonic at, -1 indicates no mnemonic. - `int`
text-offset - Amount to offset the text when painting - `int`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close