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.

  1. setcharacterattributes: things font , text color
  2. setparagraphattributes: should used set things line spacing... see if set line spacing attributes, shouldn't work setcharacterattributes
  3. 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

  4. getinputattributes: gets attributes associated cursor in jtextpane

  5. getlogicalstyle: local style (if any) that's been set cursor is
  6. getstyle(...): logical style styleddocument

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -