Package javax.swing.text

Examples of javax.swing.text.Style.copyAttributes()


    }
    Style attr = doc.getStyle(styleType.getName());
    if (attr == null) {
      return;
    }
    attr = (Style) attr.copyAttributes();
    attr.addAttribute(ATTRIBUTE_PAGE, link);
    attr.addAttribute(ATTRIBUTE_TEXT, text);
    attr.addAttribute(ATTRIBUTE_UUID, UUID.randomUUID());
    doc.setCharacterAttributes(start, end - start, attr, true);
    if (start < startPosition) {
View Full Code Here


    // Format template
    int start = template.getBeginIndex();
    int end = template.getEndIndex();
    Style attr = doc.getStyle(ConfigurationValueStyle.TEMPLATE_NORMAL.getName());
    attr = (Style) attr.copyAttributes();
    attr.addAttribute(ATTRIBUTE_PAGE, link);
    attr.addAttribute(ATTRIBUTE_PAGE_ELEMENT, template);
    attr.addAttribute(ATTRIBUTE_TEMPLATE_MATCHER, matcher);
    attr.addAttribute(ATTRIBUTE_UUID, UUID.randomUUID());
    doc.setCharacterAttributes(start, end - start, attr, true);
View Full Code Here

    // Format template
    int start = template.getBeginIndex();
    int end = template.getEndIndex();
    Style attr = doc.getStyle(ConfigurationValueStyle.HELP_REQUESTED.getName());
    attr = (Style) attr.copyAttributes();
    attr.addAttribute(ATTRIBUTE_PAGE, link);
    attr.addAttribute(ATTRIBUTE_UUID, UUID.randomUUID());
    if (template.getParameterCount() > 0) {
      attr.addAttribute(
          ATTRIBUTE_TEXT,
View Full Code Here

    // Format template
    int start = template.getBeginIndex();
    int end = template.getEndIndex();
    Style attr = doc.getStyle(ConfigurationValueStyle.TEMPLATE_DAB.getName());
    attr = (Style) attr.copyAttributes();
    attr.addAttribute(ATTRIBUTE_PAGE, link);
    attr.addAttribute(ATTRIBUTE_PAGE_ELEMENT, template);
    attr.addAttribute(ATTRIBUTE_TEMPLATE_MATCHER, matcher);
    attr.addAttribute(ATTRIBUTE_UUID, UUID.randomUUID());
    doc.setCharacterAttributes(start, end - start, attr, true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.