Terai Atsuhiro 2022-07-31 (日) 21:36:32

final private Vector listenerList = new Vector();
  public void addFontChangeListener(FontChangeListener l) {
    if(!listenerList.contains(l)) listenerList.add(l);
  }
  public void removeFontChangeListener(FontChangeListener l) {
    listenerList.remove(l);
  }
  public void fireFontChangeEvent(String cmd, Font font) {
    Vector list = (Vector)listenerList.clone();
    Enumeration enum = list.elements();
    FontChangeEvent e = new FontChangeEvent(this, cmd, font);
    while(enum.hasMoreElements()) {
      FontChangeListener l = (FontChangeListener)enum.nextElement();
      l.fontStateChanged(e);
    }
    revalidate();
}