Re: JTextPane: Workaround for invisible text with hanging indents?



On Sat, 27 Aug 2005 23:21:43 +0200, Christian Kaufhold wrote:

>> Assuming my code correctly invokes this API, can anyone come up with a
>> workaround to make the text appear while it is typed?
>
> See below, with NegativeFirstLineIndentParagraphView2. ParagraphView2
> allows settings first and other line indents independently (but does not
> allow negative values)

Christian, your hundreds of lines example of how to implement a new styled
editor kit view to overcome this bug is greatly appreciated! It also helps
me understand how developers manage to work around bugs in Sun's Java when
they're prohibited from fixing Java itself.

It looks like this Bug ID comment from 2001 is fully applicable today:
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4336804>

Submitted On 05-NOV-2001
hubersn

It is just incredible if you look at the amount of bugs and the
apparent lack of regression tests with the Swing text classes. 1.1.x
had working TABs, but had problems with a negative first line indent.
1.2.2 had a working first line indent, but TABs did not work at all
(!). 1.3 had working TABs again, but no first line indent - again. All
versions are not able to fully justify text, although that
functionality is properly documented and should be expected to work.

End of story: implement your own paragraph view. Based on past
experience, I would not rely on any coming Sun implementation.

Thanks again,
Adam
.



Relevant Pages

  • Re: Late Dates incorrect after indenting under Summary Task
    ... about task 11's predecessor, but then I tried it both ways - no predecessor ... > Don't indent it under the summary until you've added all the tasks. ... > 2 Start Milestone #1 ... >> I'm not aware of any "bug" like you're describing. ...
    (microsoft.public.project)
  • Re: Late Dates incorrect after indenting under Summary Task
    ... "Sean" wrote in message ... > Don't indent it under the summary until you've added all the tasks. ... > 2 Start Milestone #1 ... >> I'm not aware of any "bug" like you're describing. ...
    (microsoft.public.project)
  • JTextPane: Workaround for invisible text with hanging indents?
    ... I have a hanging indent requirement for paragraph formatting: ... "The amount of space to indent the first line of the paragraph. ... A search of Sun's bug database for FirstLineIndent indicates that Sun ... public class InvisibleText extends JFrame { ...
    (comp.lang.java.gui)
  • Ruler Settings
    ... I seem to have a bug in a particular presentation. ... Whenever I add a new text box indent arrow on the ruler ...
    (microsoft.public.powerpoint)