JHotDraw 7.3.1

org.jhotdraw.draw.action
Class FontChooserHandler

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jhotdraw.draw.action.AbstractSelectedAction
          extended by org.jhotdraw.draw.action.FontChooserHandler
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Disposable

public class FontChooserHandler
extends AbstractSelectedAction
implements java.beans.PropertyChangeListener

FontChooserHandler.

Author:
Werner Randelshofer  @version $Id: FontChooserHandler.java 564 2009-10-10 10:21:01Z rawcoder $
See Also:
Serialized Form

Field Summary
protected  JFontChooser fontChooser
           
protected  int isUpdating
           
protected  AttributeKey<java.awt.Font> key
           
protected  javax.swing.JPopupMenu popupMenu
           
 
Fields inherited from class org.jhotdraw.draw.action.AbstractSelectedAction
labels
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
FontChooserHandler(DrawingEditor editor, AttributeKey<java.awt.Font> key, JFontChooser fontChooser, javax.swing.JPopupMenu popupMenu)
          Creates a new instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
protected  void applySelectedFontToFigures()
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
protected  void updateEnabledState()
          Updates the enabled state of this action to reflect the enabled state of the active DrawingView.
 
Methods inherited from class org.jhotdraw.draw.action.AbstractSelectedAction
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledState
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected AttributeKey<java.awt.Font> key

fontChooser

protected JFontChooser fontChooser

popupMenu

protected javax.swing.JPopupMenu popupMenu

isUpdating

protected int isUpdating
Constructor Detail

FontChooserHandler

public FontChooserHandler(DrawingEditor editor,
                          AttributeKey<java.awt.Font> key,
                          JFontChooser fontChooser,
                          javax.swing.JPopupMenu popupMenu)
Creates a new instance.

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

applySelectedFontToFigures

protected void applySelectedFontToFigures()

updateEnabledState

protected void updateEnabledState()
Description copied from class: AbstractSelectedAction
Updates the enabled state of this action to reflect the enabled state of the active DrawingView. If no drawing view is active, this action is disabled.

Overrides:
updateEnabledState in class AbstractSelectedAction

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.