IT. Expert System.

Java Standard Edition (SE)

SynthStyleFactory


javax.swing.plaf.synth

Class SynthStyleFactory



  • public abstract class SynthStyleFactory
    extends Object
    Factory used for obtaining SynthStyles. Each of the Synth ComponentUIs will call into the current SynthStyleFactory to obtain a SynthStyle for each of the distinct regions they have.

    The following example creates a custom SynthStyleFactory that returns a different style based on the Region:

     class MyStyleFactory extends SynthStyleFactory {
         public SynthStyle getStyle(JComponent c, Region id) {
             if (id == Region.BUTTON) {
                 return buttonStyle;
             }
             else if (id == Region.TREE) {
                 return treeStyle;
             }
             return defaultStyle;
         }
     }
     SynthLookAndFeel laf = new SynthLookAndFeel();
     UIManager.setLookAndFeel(laf);
     SynthLookAndFeel.setStyleFactory(new MyStyleFactory());
     
    Since:
    1.5
    See Also:
    SynthStyleFactory, SynthStyle
    • Constructor Detail

      • SynthStyleFactory

        public SynthStyleFactory()
        Creates a SynthStyleFactory.
    • Method Detail

      • getStyle

        public abstract SynthStyle getStyle(JComponent c,
                                            Region id)
        Returns the style for the specified Component.
        Parameters:
        c - Component asking for
        id - Region identifier
        Returns:
        SynthStyle for region.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 702 / 158777005. Delta: 0.03384 с