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.metal

Class DefaultMetalTheme

  • Direct Known Subclasses:
    OceanTheme

    public class DefaultMetalTheme
    extends MetalTheme
    A concrete implementation of MetalTheme providing the original look of the Java Look and Feel, code-named "Steel". Refer to MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme) for details on changing the default theme.

    All colors returned by DefaultMetalTheme are completely opaque.

    Font Style

    DefaultMetalTheme uses bold fonts for many controls. To make all controls (with the exception of the internal frame title bars and client decorated frame title bars) use plain fonts you can do either of the following:
    • Set the system property swing.boldMetal to false. For example, java -Dswing.boldMetal=false MyApp.
    • Set the defaults property swing.boldMetal to Boolean.FALSE. For example: UIManager.put("swing.boldMetal", Boolean.FALSE);
    The defaults property swing.boldMetal, if set, takes precendence over the system property of the same name. After setting this defaults property you need to re-install MetalLookAndFeel, as well as update the UI of any previously created widgets. Otherwise the results are undefined. The following illustrates how to do this:
       // turn off bold fonts
       UIManager.put("swing.boldMetal", Boolean.FALSE);
    
       // re-install the Metal Look and Feel
       UIManager.setLookAndFeel(new MetalLookAndFeel());
    
       // Update the ComponentUIs for all Components. This
       // needs to be invoked for all windows.
       SwingUtilities.updateComponentTreeUI(rootComponent);
     

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    MetalLookAndFeel, MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)
    • Constructor Detail

      • DefaultMetalTheme

        public DefaultMetalTheme()
        Creates and returns an instance of DefaultMetalTheme.
    • Method Detail

      • getName

        public String getName()
        Returns the name of this theme. This returns "Steel".
        Specified by:
        getName in class MetalTheme
        Returns:
        the name of this theme.
      • getPrimary1

        protected ColorUIResource getPrimary1()
        Returns the primary 1 color. This returns a color with rgb values of 102, 102, and 153, respectively.
        Specified by:
        getPrimary1 in class MetalTheme
        Returns:
        the primary 1 color
      • getPrimary2

        protected ColorUIResource getPrimary2()
        Returns the primary 2 color. This returns a color with rgb values of 153, 153, 204, respectively.
        Specified by:
        getPrimary2 in class MetalTheme
        Returns:
        the primary 2 color
      • getPrimary3

        protected ColorUIResource getPrimary3()
        Returns the primary 3 color. This returns a color with rgb values 204, 204, 255, respectively.
        Specified by:
        getPrimary3 in class MetalTheme
        Returns:
        the primary 3 color
      • getSecondary1

        protected ColorUIResource getSecondary1()
        Returns the secondary 1 color. This returns a color with rgb values 102, 102, and 102, respectively.
        Specified by:
        getSecondary1 in class MetalTheme
        Returns:
        the secondary 1 color
      • getSecondary2

        protected ColorUIResource getSecondary2()
        Returns the secondary 2 color. This returns a color with rgb values 153, 153, and 153, respectively.
        Specified by:
        getSecondary2 in class MetalTheme
        Returns:
        the secondary 2 color
      • getSecondary3

        protected ColorUIResource getSecondary3()
        Returns the secondary 3 color. This returns a color with rgb values 204, 204, and 204, respectively.
        Specified by:
        getSecondary3 in class MetalTheme
        Returns:
        the secondary 3 color
      • getControlTextFont

        public FontUIResource getControlTextFont()
        Returns the control text font. This returns Dialog, 12pt. If plain fonts have been enabled as described in font style, the font style is plain. Otherwise the font style is bold.
        Specified by:
        getControlTextFont in class MetalTheme
        Returns:
        the control text font
      • getSystemTextFont

        public FontUIResource getSystemTextFont()
        Returns the system text font. This returns Dialog, 12pt, plain.
        Specified by:
        getSystemTextFont in class MetalTheme
        Returns:
        the sytem text font
      • getUserTextFont

        public FontUIResource getUserTextFont()
        Returns the user text font. This returns Dialog, 12pt, plain.
        Specified by:
        getUserTextFont in class MetalTheme
        Returns:
        the user text font
      • getMenuTextFont

        public FontUIResource getMenuTextFont()
        Returns the menu text font. This returns Dialog, 12pt. If plain fonts have been enabled as described in font style, the font style is plain. Otherwise the font style is bold.
        Specified by:
        getMenuTextFont in class MetalTheme
        Returns:
        the menu text font
      • getWindowTitleFont

        public FontUIResource getWindowTitleFont()
        Returns the window title font. This returns Dialog, 12pt, bold.
        Specified by:
        getWindowTitleFont in class MetalTheme
        Returns:
        the window title font
      • getSubTextFont

        public FontUIResource getSubTextFont()
        Returns the sub-text font. This returns Dialog, 10pt, plain.
        Specified by:
        getSubTextFont in class MetalTheme
        Returns:
        the sub-text font

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/metal/defaultmetaltheme.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