コード例 #1
0
 public StyledString getStyledText(Object element) {
   if (element instanceof Content && ((Content) element).isDone()) {
     Styler style = stylerFactory.createXtextStyleAdapterStyler(configuration.taskDoneTextStyle());
     return new StyledString(getText(element), style);
   } else {
     return new StyledString(getText(element));
   }
 }
コード例 #2
0
 public Object text(Task task) {
   String text = delegate.getText(task);
   if (task.isDone()) {
     Styler style = stylerFactory.createXtextStyleAdapterStyler(configuration.taskDoneTextStyle());
     return new StyledString(text, style);
   } else {
     return text;
   }
 }