use of net.sf.mzmine.framework.listener.ColorChangedListener in project mzmine2 by mzmine.
the class JFontSpecs method addListener.
public void addListener(final Consumer<FontSpecs> f) {
ColorChangedListener ccl = e -> f.accept(getFontSpecs());
ItemListener il = e -> f.accept(getFontSpecs());
dl = new DelayedDocumentListener() {
@Override
public void documentChanged(DocumentEvent e) {
f.accept(getFontSpecs());
}
};
fontBox.addItemListener(il);
styleBox.addItemListener(il);
txtSize.getDocument().addDocumentListener(dl);
color.addColorChangedListener(ccl);
}
Aggregations