Use a Keymap, I think. Why do you care about Elements?
-----Original Message-----
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, March 14, 2001 03:36
Subject: Tabbing & Elements
Hi
I am doing a text editor with JTextPane. But I've got two problems :
First I'd like to decrease the tab setting in all the document.
In a textArea, I would use setTabSize(int), but I can't in a textPane.
Second, I have some problems managing the structure of my document.
The problem happens when I'm inserting text with newlines.
For exemple, if I do :
document.insertString(document.getLength(), "This is not\n working\n
fine\n",style1);
The Dump() method returns :
<section>
<paragraph
resolver=NamedStyle:default {name=default,nrefs=1}
>
<content
family=SansSerif
size=16
>
[0,12][This is not
]
<paragraph
resolver=NamedStyle:default {name=default,nrefs=1}
>
<content
family=SansSerif
size=16
>
[12,21][ working
]
<paragraph
resolver=NamedStyle:default {name=default,nrefs=1}
>
<content
family=SansSerif
size=16
>
[21,27][ fine
]
<paragraph
resolver=NamedStyle:default {name=default,nrefs=1}
>
<content>
[27,28][
]
<bidi root>
<bidi level
bidiLevel=0
>
[0,28][This is not
working
fine
]
I would like all lines to be in the same paragraph element.
I tried using ElementSpec but I didn't succeed in resolving my problem.
So, if you have ideas or examples...
thanks for all
Jérôme DOUILLARD _______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing