Here you can find the source of isSmallSizeVariant(JComponent c)
Parameter | Description |
---|---|
c | a parameter |
public static boolean isSmallSizeVariant(JComponent c)
//package com.java2s; /*/*from www .j av a 2s. co m*/ * @(#)QuaquaUtilities.java * * Copyright (c) 2003-2010 Werner Randelshofer * Hausmatt 10, Immensee, CH-6405, Switzerland. * All rights reserved. * * The copyright of this software is owned by Werner Randelshofer. * You may not use, copy or modify this software, except in * accordance with the license agreement you entered into with * Werner Randelshofer. For details see accompanying license terms. */ import java.awt.*; import javax.swing.*; public class Main { /** * Returns true, if the component should use the small appearance. * @param c * @return true, , if the component should use the small appearance. */ public static boolean isSmallSizeVariant(JComponent c) { Font f = c.getFont(); if (f != null && f.getSize() <= 11) { return true; } String p = (String) c.getClientProperty("JComponent.sizeVariant"); return p != null && p.equals("small"); } }