Menu

#27 Tabs are not repainted correctly when a view's title changes

open
nobody
5
2009-07-31
2009-07-31
No

Two scenarios result in the tabs not being repainted appropriately, resulting in strange artifacts being displayed:

1) If the title of a View is changed, the text in the view's tab changes but the tab is not repainted immediately.
2) If the font used by a View's tab changes when it gains focus, the text in the view's tab changes but the tab is, again, not repainted immediately. This is achieved, for example, by configuring the dockable windows like so:

Font plainFont = UIManager.getFont("PopupMenu.font");
tabProperties.getTitledTabProperties().getNormalProperties().getComponentProperties().setFont(plainFont);
tabProperties.getTitledTabProperties().getHighlightedProperties().getComponentProperties().setFont(plainFont);

Font boldFont = plainFont.deriveFont(Font.BOLD);
tabProperties.getFocusedProperties().getComponentProperties().setFont(boldFont);

Both observations were made when using the LookAndFeelDockingTheme on Windows XP.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB