org.bndtools.utils.jface.StrikeoutStyler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.bndtools.templating.gitrepo Show documentation
Show all versions of org.bndtools.templating.gitrepo Show documentation
org.bndtools.templating.gitrepo
The newest version!
package org.bndtools.utils.jface;
import org.eclipse.jface.viewers.StyledString.Styler;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.TextStyle;
public class StrikeoutStyler extends Styler {
private final Styler base;
private final Color strikeoutColor;
public StrikeoutStyler() {
this(null, null);
}
public StrikeoutStyler(Styler base) {
this(base, null);
}
public StrikeoutStyler(Styler base, Color strikeoutColor) {
this.base = base;
this.strikeoutColor = strikeoutColor;
}
@Override
public void applyStyles(TextStyle textStyle) {
if (base != null)
base.applyStyles(textStyle);
textStyle.strikeout = true;
if (strikeoutColor != null)
textStyle.strikeoutColor = strikeoutColor;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy