org.xnap.gui.component
Class FontSelectionPanel.FontSizeSynchronizer

java.lang.Object
  extended by org.xnap.gui.component.FontSelectionPanel.FontSizeSynchronizer
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.DocumentListener, javax.swing.event.ListSelectionListener
Enclosing class:
FontSelectionPanel

protected class FontSelectionPanel.FontSizeSynchronizer
extends java.lang.Object
implements javax.swing.event.DocumentListener, javax.swing.event.ListSelectionListener

This class synchronizes font size value between the list containing available font sizes & the text field in which font size is ultimately specified.


Field Summary
protected  javax.swing.JList list_
           
protected  javax.swing.JTextField textField_
           
protected  boolean updating_
           
 
Constructor Summary
FontSelectionPanel.FontSizeSynchronizer(javax.swing.JList list, javax.swing.JTextField textField)
           
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent e)
           
protected  void handle(javax.swing.event.DocumentEvent e)
          Handles all DocumentEvents
 void insertUpdate(javax.swing.event.DocumentEvent e)
           
 void removeUpdate(javax.swing.event.DocumentEvent e)
           
 void valueChanged(javax.swing.event.ListSelectionEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list_

protected javax.swing.JList list_

textField_

protected javax.swing.JTextField textField_

updating_

protected boolean updating_
Constructor Detail

FontSelectionPanel.FontSizeSynchronizer

public FontSelectionPanel.FontSizeSynchronizer(javax.swing.JList list,
                                               javax.swing.JTextField textField)
Parameters:
list - list containing predefined font sizes
textField - text field in which font size is specified
Method Detail

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
See Also:
ListSelectionListener

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
See Also:
DocumentListener

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
See Also:
DocumentListener

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
See Also:
DocumentListener

handle

protected void handle(javax.swing.event.DocumentEvent e)
Handles all DocumentEvents



Copyright © 2001-2005 XNap Team. All Rights Reserved.