*/
public static String wrapTooltip(boolean enclose, String ttext)
{
- Objects.requireNonNull(ttext, "Tootip text to format must not be null!");
+ Objects.requireNonNull(ttext,
+ "Tootip text to format must not be null!");
ttext = ttext.trim();
boolean maxLengthExceeded = false;
for (int i = 0, iSize = menu.getMenuComponentCount(); i < iSize; i++)
{
if (menu.getMenuComponent(i) instanceof JMenu
- && ((JMenu) menu.getMenuComponent(i)).getText().equals(
- submenu))
+ && ((JMenu) menu.getMenuComponent(i)).getText()
+ .equals(submenu))
{
submenuinstance = (JMenu) menu.getMenuComponent(i);
}
public static Font getLabelFont(boolean bold, boolean italic)
{
- return new java.awt.Font("Verdana", (!bold && !italic) ? Font.PLAIN
- : (bold ? Font.BOLD : 0) + (italic ? Font.ITALIC : 0), 11);
+ return new java.awt.Font("Verdana",
+ (!bold && !italic) ? Font.PLAIN
+ : (bold ? Font.BOLD : 0) + (italic ? Font.ITALIC : 0),
+ 11);
}
/**
* of possible positions.
*/
float fraction = proportion
- * (scrollbar.getMaximum() - scrollbar.getMinimum() - scrollbar
- .getModel().getExtent())
+ * (scrollbar.getMaximum() - scrollbar.getMinimum()
+ - scrollbar.getModel().getExtent())
+ (scrollbar.getModel().getExtent() / 2f);
return Math.min(Math.round(fraction), scrollbar.getMaximum());
}