java - JTextPane AttributeSet -
1 - first, can explain me difference between following methods inside class jtextpane
because compile example , gave me same result :
setcharacterattributes(attributeset attr, boolean replace)
setparagraphattributes(attributeset attr, boolean replace)
setlogicalstyle(style s)
2 - second, difference between following methods (always inside class jtextpane
) :
getinputattributes()
getlogicalstyle()
getstyle(string nm)
it great if give me example show real use of methods, because official documentations not explained.
- setcharacterattributes: things font , text color
- setparagraphattributes: should used set things line spacing... see if set line spacing attributes, shouldn't work setcharacterattributes
setlogicalstyle: use style type given. has same effect setparagraphattributes, style logical style styleddocument (check out api styleddocument - addstyle)... concept "header 1" "header 2" in word
getinputattributes: gets attributes associated cursor in jtextpane
- getlogicalstyle: local style (if any) that's been set cursor is
- getstyle(...): logical style styleddocument
Comments
Post a Comment