This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
BrowserDisplayer.getPreferredLabelAlignment claims to "Determine the alignment offset so the text is aligned with other views correctly." but this does not appear to be working very well for me in a dev build on Mustang / Ocean. See screenshot.
Created attachment 26724 [details] Screenshot of part of "Working with Modules" in "NB Platform & Module Development"
Where is this doc in CVS? (source)
apisupport/project/javahelp/org/netbeans/modules/apisupport/project/docs/about/modules_process.html
Reassigning to the new "core/help system" owner obarbashov.
Moving JH issues to Victor.
Original implementation of the method BrowserDisplayer.getPreferredLabelAlignment tries to take into account a size of the icon, but according to javadoc of the class "Only text is supported". So, immediately after initialization (i.e text is empty string and icon is null) the method returns the value 12.0f. Note, expected return value of the method should be between 0.0f and 1.0f. Also, the method has inconsistent name. Proposed fix to resolve this issue is private float getPreferredAlignmentY() { // Fix for the Issue #68316 Font font = getFont(); FontMetrics fm = getToolkit().getFontMetrics(font); float h = fm.getHeight(); float d = fm.getDescent(); return (h - d) / h; }
Created attachment 80672 [details] A picture from the help content view after applying the fix. Red lines show the base lines of the strings.
Fixed as described. http://hg.netbeans.org/main/rev/bb72f9f56c89