Exemplo n.º 1
0
 private void updateStyleInSelection(StyleInfo mixin) {
   IndexRange selection = area.getSelection();
   if (selection.getLength() != 0) {
     StyleSpans<StyleInfo> styles = area.getStyleSpans(selection);
     StyleSpans<StyleInfo> newStyles = styles.mapStyles(style -> style.updateWith(mixin));
     area.setStyleSpans(selection.getStart(), newStyles);
   }
 }