Exemplo n.º 1
0
 public int getIconWidth() {
   int width;
   if (XPStyle.getXP() != null) {
     // Fix for XP bug where sometimes these sizes aren't updated properly
     // Assume for now that height is correct and derive width using the
     // ratio from the uxtheme part
     width = UIManager.getInt("InternalFrame.titleButtonHeight") - 2;
     Dimension d = XPStyle.getPartSize(Part.WP_CLOSEBUTTON, State.NORMAL);
     if (d != null && d.width != 0 && d.height != 0) {
       width = (int) ((float) width * d.width / d.height);
     }
   } else {
     width = UIManager.getInt("InternalFrame.titleButtonWidth") - 2;
   }
   if (XPStyle.getXP() != null) {
     width -= 2;
   }
   return width;
 }
Exemplo n.º 2
0
 public int getIconHeight() {
   int height = UIManager.getInt("InternalFrame.titleButtonHeight") - 4;
   return height;
 }