Java Swing Look and Feel matchLnf(LookAndFeel lookAndFeel, UIManager.LookAndFeelInfo lookAndFeelInfo)

Here you can find the source of matchLnf(LookAndFeel lookAndFeel, UIManager.LookAndFeelInfo lookAndFeelInfo)

Description

Do the supplied l&f object and l&f info object refer to the same l&f?

License

Open Source License

Parameter

Parameter Description
lookAndFeel L&F object
lookAndFeelInfo L&F info object

Return

True if they do

Declaration

public static boolean matchLnf(LookAndFeel lookAndFeel, UIManager.LookAndFeelInfo lookAndFeelInfo) 

Method Source Code

//package com.java2s;
/*//from   w  w  w .j av a 2  s  . c o m
 * Copyright 2004 - 2013 Wayne Grant
 *           2013 - 2018 Kai Kramer
 *
 * This file is part of KeyStore Explorer.
 *
 * KeyStore Explorer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * KeyStore Explorer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with KeyStore Explorer.  If not, see <http://www.gnu.org/licenses/>.
 */

import javax.swing.LookAndFeel;
import javax.swing.UIManager;

public class Main {
    /**
     * Do the supplied l&f object and l&f info object refer to the same l&f?
     *
     * @param lookAndFeel
     *            L&F object
     * @param lookAndFeelInfo
     *            L&F info object
     * @return True if they do
     */
    public static boolean matchLnf(LookAndFeel lookAndFeel, UIManager.LookAndFeelInfo lookAndFeelInfo) {
        return lookAndFeel.getClass().getName().equals(lookAndFeelInfo.getClassName());
    }
}

Related

  1. isWinLAF()
  2. isXP()
  3. listLookAndFeels()
  4. lookAndFeelDefault(String style)
  5. lookLikeSystem()
  6. metalLookAndFeel()
  7. nativeLook()
  8. printInstalledLookAndFeel()
  9. printInstalledPLAFs()