Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.swing.plaf.synth

Class SynthGraphicsUtils


  • public class SynthGraphicsUtils
    extends Object
    Wrapper for primitive graphics calls.
    Since:
    1.5
    • Constructor Detail

      • SynthGraphicsUtils

        public SynthGraphicsUtils()
        Creates a SynthGraphicsUtils.
    • Method Detail

      • drawLine

        public void drawLine(SynthContext context,
                    Object paintKey,
                    Graphics g,
                    int x1,
                    int y1,
                    int x2,
                    int y2)
        Draws a line between the two end points.
        Parameters:
        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
      • drawLine

        public void 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.

        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.

        Parameters:
        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")
        Since:
        1.6
      • layoutText

        public String layoutText(SynthContext ss,
                        FontMetrics fm,
                        String text,
                        Icon icon,
                        int hAlign,
                        int vAlign,
                        int hTextPosition,
                        int vTextPosition,
                        Rectangle viewR,
                        Rectangle iconR,
                        Rectangle textR,
                        int iconTextGap)
        Lays out text and an icon returning, by reference, the location to place the icon and text.
        Parameters:
        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
      • computeStringWidth

        public int computeStringWidth(SynthContext ss,
                             Font font,
                             FontMetrics metrics,
                             String text)
        Returns the size of the passed in string.
        Parameters:
        ss - SynthContext
        font - Font to use
        metrics - FontMetrics, may be ignored
        text - Text to get size of.
      • getMinimumSize

        public Dimension getMinimumSize(SynthContext ss,
                               Font font,
                               String text,
                               Icon icon,
                               int hAlign,
                               int vAlign,
                               int hTextPosition,
                               int vTextPosition,
                               int iconTextGap,
                               int mnemonicIndex)
        Returns the minimum size needed to properly render an icon and text.
        Parameters:
        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.
      • getMaximumSize

        public Dimension getMaximumSize(SynthContext ss,
                               Font font,
                               String text,
                               Icon icon,
                               int hAlign,
                               int vAlign,
                               int hTextPosition,
                               int vTextPosition,
                               int iconTextGap,
                               int mnemonicIndex)
        Returns the maximum size needed to properly render an icon and text.
        Parameters:
        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.
      • getMaximumCharHeight

        public int getMaximumCharHeight(SynthContext context)
        Returns the maximum height of the the Font from the passed in SynthContext.
        Parameters:
        context - SynthContext used to determine font.
        Returns:
        maximum height of the characters for the font from the passed in context.
      • getPreferredSize

        public Dimension getPreferredSize(SynthContext ss,
                                 Font font,
                                 String text,
                                 Icon icon,
                                 int hAlign,
                                 int vAlign,
                                 int hTextPosition,
                                 int vTextPosition,
                                 int iconTextGap,
                                 int mnemonicIndex)
        Returns the preferred size needed to properly render an icon and text.
        Parameters:
        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.
      • paintText

        public void paintText(SynthContext ss,
                     Graphics g,
                     String text,
                     Rectangle bounds,
                     int mnemonicIndex)
        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.
        Parameters:
        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.
      • paintText

        public void paintText(SynthContext ss,
                     Graphics g,
                     String text,
                     int x,
                     int y,
                     int mnemonicIndex)
        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.
        Parameters:
        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.
      • paintText

        public void 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. This will render the text as html, if necessary, and offset the location by the insets of the component.
        Parameters:
        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

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/swing/plaf/synth/SynthGraphicsUtils.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut