Example #1
0
 /**
  * Constructs new StyleRange based on another StyleRange settings.
  *
  * @param styleRange style range
  */
 public StyleRange(final StyleRange styleRange) {
   this(
       styleRange.getStartIndex(),
       styleRange.getLength(),
       styleRange.getStyle(),
       styleRange.getForeground(),
       styleRange.getBackground(),
       getCustomStyles(styleRange));
 }
Example #2
0
 /**
  * Returns custom styles array.
  *
  * @param styleRange style range
  * @return custom styles array
  */
 protected static CustomStyle[] getCustomStyles(final StyleRange styleRange) {
   return styleRange.getCustomStyle().toArray(new CustomStyle[styleRange.getCustomStyle().size()]);
 }