Example #1
0
 /**
  * Returns the size style of a specified component.
  *
  * @return REGULAR, SMALL or MINI.
  */
 private int getSizeStyle(Component c) {
   // Aqua components have a different style depending on the
   // font size used.
   // 13 Point = Regular
   // 11 Point = Small
   //  9 Point = Mini
   if (c == null) {
     return REGULAR;
   }
   Font font = c.getFont();
   if (font == null) {
     return REGULAR;
   }
   int fontSize = font.getSize();
   return (fontSize >= 13) ? REGULAR : ((fontSize > 9) ? SMALL : MINI);
 }