Java JButton Settings getDefaultFatButtonMargin()

Here you can find the source of getDefaultFatButtonMargin()

Description

get Default Fat Button Margin

License

Open Source License

Declaration

public static final Insets getDefaultFatButtonMargin() 

Method Source Code

//package com.java2s;
/*//from   w  ww .j  a  v  a 2s  . c om
 *    Copyright (C) 2008-2010 Igor Kriznar
 *    
 *    This file is part of GTD-Free.
 *    
 *    GTD-Free 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.
 *    
 *    GTD-Free 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 GTD-Free.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.awt.Insets;

import javax.swing.UIManager;

public class Main {
    private static Boolean gtklaf;

    public static final Insets getDefaultFatButtonMargin() {
        if (isGTKLaF()) {
            return new Insets(0, 2, 0, 2);
        }
        return new Insets(2, 4, 2, 4);
    }

    public static final boolean isGTKLaF() {
        if (gtklaf == null) {
            try {
                gtklaf = Class.forName("com.sun.java.swing.plaf.gtk.GTKLookAndFeel") //$NON-NLS-1$
                        .isAssignableFrom(UIManager.getLookAndFeel().getClass());
            } catch (Exception e) {
                gtklaf = Boolean.FALSE;
            }
        }
        return gtklaf;
    }
}

Related

  1. getButtonColor()
  2. getButtonPane()
  3. getButtonSelectColor()
  4. getButtonSelectedInt(ButtonGroup buttonGroup)
  5. getButtonSelectedString(ButtonGroup buttonGroup)
  6. getHudControlShadowSize(AbstractButton button)
  7. getIcon(AbstractButton b)
  8. getListenedButtonsFor(Container c)
  9. getMonospaceButton(final String text, final int size)