Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: short question concerning setLogicalStyle

  1. #1
    Member
    Join Date
    Jun 2013
    Posts
    61
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default short question concerning setLogicalStyle

    setLogicalStyle(int offset, Style style)

    what is mend by offset here:
    1) the offset number of a paragraph like first, second etc paragraph?
    2) or the offset within a specific paragraph?
    3) the offset within the complete document?

    If so 2) how one knows what is the current paragraph?

    Or in other words: is the offset number always a character offset.
    or can it be anything like paragraph, etc?

    the same here:
    setParagraphAttributes(int offset,
    int length,
    AttributeSet s,
    boolean replace)


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: short question concerning setLogicalStyle

    Can you give your question(s) some context? What are you talking about applying these statements to? How are you using them?

  3. #3
    Member
    Join Date
    Jun 2013
    Posts
    61
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: short question concerning setLogicalStyle

    greg there is no context the info is from the api, and I believe now that the offset is the offset within all characters of a Document?

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: short question concerning setLogicalStyle

    Then, the API is the context. Sorry, I have no experience with StyledDocument.

Similar Threads

  1. What does this short part of a code do?
    By Kranti1992 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 28th, 2012, 11:31 AM
  2. [SOLVED] Adding two byte/ short variables
    By ranjithfs1 in forum Java Theory & Questions
    Replies: 1
    Last Post: May 26th, 2012, 04:31 AM
  3. Short java project
    By derky in forum Paid Java Projects
    Replies: 3
    Last Post: October 28th, 2009, 09:48 PM