Package javax.swing

Examples of javax.swing.LookAndFeel


    private void initGui() {
        // Initialise skins factory.
        skinsFactory = SkinsFactory.getInstance(applicationProperties);
       
        // Set Skinned Look and Feel.
        LookAndFeel lookAndFeel = skinsFactory.createSkinnedMetalTheme("SkinnedLookAndFeel");       
        try {
            UIManager.setLookAndFeel(lookAndFeel);
        } catch (UnsupportedLookAndFeelException e) {
            log.error("Unable to set skinned LookAndFeel", e);
        }      
View Full Code Here


    private void initGui() {   
        // Initialise skins factory.
        skinsFactory = SkinsFactory.getInstance(cockpitLiteProperties.getProperties());
       
        // Set Skinned Look and Feel.
        LookAndFeel lookAndFeel = skinsFactory.createSkinnedMetalTheme("SkinnedLookAndFeel");       
        try {
            UIManager.setLookAndFeel(lookAndFeel);
        } catch (UnsupportedLookAndFeelException e) {
            log.error("Unable to set skinned LookAndFeel", e);
        }     
View Full Code Here

    private void initGui() {
        // Initialise skins factory.
        skinsFactory = SkinsFactory.getInstance(applicationProperties);
       
        // Set Skinned Look and Feel.
        LookAndFeel lookAndFeel = skinsFactory.createSkinnedMetalTheme("SkinnedLookAndFeel");       
        try {
            UIManager.setLookAndFeel(lookAndFeel);
        } catch (UnsupportedLookAndFeelException e) {
            log.error("Unable to set skinned LookAndFeel", e);
        }     
View Full Code Here

    public static List getAvailablePlafNames() {
        return new ArrayList(PLAF_MAPPINGS.keySet());
    }

    public static String getInstalledPlafReference() {
        LookAndFeel currentPlaf = UIManager.getLookAndFeel();
        if(currentPlaf==null)
            return null;

        String key = currentPlaf.getClass().getName();
        return getPlafReference(key);
    }
View Full Code Here

     *
     * @see JComponent#updateUI
     */
    public void updateUI() {
        updateLabelUIs();
        LookAndFeel laf = UIManager.getLookAndFeel();

        if (laf instanceof javax.swing.plaf.metal.MetalLookAndFeel)
            setUI(new MetalRangeSliderUI(this, showExtent));
        else if (laf instanceof javax.swing.plaf.multi.MultiLookAndFeel)
            setUI(new MultiRangeSliderUI());
View Full Code Here

    public TimelineScroll( Session doc )
    {
        super( HORIZONTAL );
        this.doc    = doc;

    LookAndFeel laf = UIManager.getLookAndFeel();
    if( (laf != null) && laf.isNativeLookAndFeel() && (laf.getName().indexOf( "Aqua" ) >= 0) ) {
      trackMarginLeft = 6// for Aqua look and feel 
      trackMargin    = 39;
    } else {
      trackMarginLeft = 16// works for Metal, Motif, Liquid, Metouia
      trackMargin    = 32;
View Full Code Here

    /**
     * Adds look and feel constants for Help components into UIDefaults table.
     */
    static void installLookAndFeelDefaults() {
        LookAndFeel lnf = UIManager.getLookAndFeel();
        UIDefaults table = UIManager.getLookAndFeelDefaults();

  debug("installLookAndFeelDefaults - " + lnf);

        if ((lnf != null) && (table != null)) {
      if (lnf.getID().equals("Motif")) {
    installMotifDefaults(table);
      } else if (lnf.getID().equals("Windows")) {
    installWindowsDefaults(table);
      } else if (lnf.getID().equals("GTK")) {
    installGTKDefaults(table);
      } else {
    // Default
    installMetalDefaults(table);
      }
View Full Code Here

*
* @throws Exception
*/
    public static void setLookAndFeel(String className)
        throws Exception {
        LookAndFeel laf = null;

        if (!className.equals(DEFAULT_LAF)) {
            if (className.equals(SYSTEM_LAF)) {
                String systemLaf = UIManager.getSystemLookAndFeelClassName();
                log.debug("System Look And Feel is " + systemLaf);
                laf = (LookAndFeel) Class.forName(systemLaf).newInstance();
            } else if (className.equals(CROSS_PLATFORM_LAF)) {
                String crossPlatformLaf = UIManager.getCrossPlatformLookAndFeelClassName();
                log.debug("Cross Platform Look And Feel is " +
                    crossPlatformLaf);
                laf = (LookAndFeel) Class.forName(crossPlatformLaf).newInstance();
            } else {
                laf = (LookAndFeel) Class.forName(className).newInstance();
            }
        }

        //  Now actually set the look and feel
        if (laf != null) {
            log.info("Setting look and feel " + laf.getName() + " (" +
                laf.getClass().getName() + ")");
            UIManager.setLookAndFeel(laf);
            UIManager.put("EditorPane.font", UIManager.getFont("TextArea.font"));
        }
    }
View Full Code Here

  }
 
  public static GradientPanel createGradientPanel()
  {
    final GradientPanel    gp    = new GradientPanel();
    final LookAndFeel    laf    = UIManager.getLookAndFeel();
    final boolean      isAqua  = laf == null ? false : laf.getID().equals( "Aqua" );
    final GradientPaint    grad  = isAqua ? new GradientPaint( 0f, 0f, new Color( 0xF3, 0xF3, 0xF3 ), 0f, 69f, new Color( 0xC4, 0xC4, 0xC4 )) : null;
   
    gp.setLayout( new BoxLayout( gp, BoxLayout.X_AXIS ));
    gp.setGradient( grad );
    gp.setBorder( BorderFactory.createEmptyBorder( 2, 2, 2, 2 ));
View Full Code Here

        // set default swing bold to false, only for JVM 1.5 or above
        UIManager.put( "swing.boldMetal", Boolean.FALSE );

        // set LaF
        LookAndFeel lnf = UIManager.getLookAndFeel();
        if( lnf != null && lnf.getID().equalsIgnoreCase( "Metal" ) )
        {
            final String lnfClassName;
            if( osName.startsWith( "MAC" ) )
            {
                System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "Envisage" ); //TODO i18n
View Full Code Here

TOP

Related Classes of javax.swing.LookAndFeel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.