net.sf.jaxodraw.gui.panel.edit
Class JaxoOptionsPanelListener

java.lang.Object
  extended by net.sf.jaxodraw.gui.panel.edit.JaxoOptionsPanelListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, JaxoEditPanelListener

public class JaxoOptionsPanelListener
extends java.lang.Object
implements JaxoEditPanelListener

A listener for edit panels.

Since:
2.0

Constructor Summary
JaxoOptionsPanelListener(java.beans.PropertyChangeListener object)
          Constructor: sets the object that gets changed by actions on the edit panel.
JaxoOptionsPanelListener(java.beans.PropertyChangeListener object, javax.swing.event.ChangeListener l)
          Constructor: sets the object that gets changed by actions on the edit panel.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Transmits the changes from an edit panel to the object.
 void changedUpdate(javax.swing.event.DocumentEvent evt)
          Checks for DocumentEvents that have ocurred on the panel, (used for text fields).
 void insertUpdate(javax.swing.event.DocumentEvent evt)
          Checks for DocumentEvents that have ocurred on the panel, (used for text fields).
 void itemStateChanged(java.awt.event.ItemEvent evt)
          Checks for ItemEvents that have ocurred on the panel, (check boxes, comboboxes and radiobuttons).
 void removeUpdate(javax.swing.event.DocumentEvent evt)
          Checks for DocumentEvents that have ocurred on the panel, (used for text fields).
 void stateChanged(javax.swing.event.ChangeEvent evt)
          Transmits the changes from an edit panel to the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxoOptionsPanelListener

public JaxoOptionsPanelListener(java.beans.PropertyChangeListener object)
Constructor: sets the object that gets changed by actions on the edit panel.

Parameters:
object - The object to receive ChangeEvents from the edit panel.

JaxoOptionsPanelListener

public JaxoOptionsPanelListener(java.beans.PropertyChangeListener object,
                                javax.swing.event.ChangeListener l)
Constructor: sets the object that gets changed by actions on the edit panel.

Parameters:
object - The object to receive ChangeEvents from the edit panel.
l - ChangeListener to notify after each change to 'object'. May be null.
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent evt)
Transmits the changes from an edit panel to the object.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
evt - The ChangeEvent to transmit.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Transmits the changes from an edit panel to the object. Currently only used for the color buttons to bring up the color chooser panel.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - The ActionEvent to transmit.

itemStateChanged

public final void itemStateChanged(java.awt.event.ItemEvent evt)
Checks for ItemEvents that have ocurred on the panel, (check boxes, comboboxes and radiobuttons).

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
evt - The ItemEvent that has ocurred.

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent evt)
Checks for DocumentEvents that have ocurred on the panel, (used for text fields). This method is called after an insert into the document.

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Parameters:
evt - The DocumentEvent that has ocurred.

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent evt)
Checks for DocumentEvents that have ocurred on the panel, (used for text fields). This method is called after a removal from the document.

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Parameters:
evt - The DocumentEvent that has ocurred.

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent evt)
Checks for DocumentEvents that have ocurred on the panel, (used for text fields). This method is called after one or more attributes have changed. This method is not called when characters are inserted with attributes.

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Parameters:
evt - The DocumentEvent that has ocurred.


Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.