#navi(contents-page-name): No such page: ST

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

final private Vector listenerList = new Vector();
  public void addFontChangeListener(FontChangeListener listener){
    if(!listenerList.contains(listener)) listenerList.add(listener);
  }
  public void removeFontChangeListener(FontChangeListener listener){
    listenerList.remove(listener);
  }
  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 listener = (FontChangeListener)enum.nextElement();
      listener.fontStateChanged(e);
    }
    revalidate();
}