You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Stephane Hillion <St...@sophia.inria.fr> on 2001/01/16 17:46:22 UTC

Re: cvs commit: xml-batik/sources/org/apache/batik/apps/svgviewer StatusBar.java

Bill Haneman wrote:

> >The status bar has sometimes incorrect size. When selecting arabic text, some
> >glyphs are painted outside the component's bounding box.
>
> I saw this also, but I have not seen any glyphs painted outside of the
> bounding box per se, only outside of the inset region.  I think this is OK.

It will be OK if you use JComponent.paintComponent: the text will be clipped (in
fact the border will be painted over the text)

> Alas, this is not very easily fixed.  I can try to copy the
> font size from one of the JLabels (zoom, for instance), but
> I don't think that I can copy the Font.  I expect that using the
> same Font as the JLabel will break the "fix".  But I can try it
> and see.

Try:
    Font f = (Font)javax.swing.UIManager.get("Label.font");
Now you have the font, but by subclassing JComponent like you have done, you have
lost the accessibility and the dynamic look and feel updates.
--
    Stephane.