zinger.bsheet
Class PopUpCellEditor

java.lang.Object
  extended by zinger.bsheet.PopUpCellEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.lang.Runnable, java.util.EventListener

public class PopUpCellEditor
extends java.lang.Object
implements java.awt.event.ActionListener, java.lang.Runnable

Cell editor that uses a dialog window. Allows multiline content.

Author:
Alexey Zinger (inline_four@yahoo.com)

Field Summary
protected  javax.swing.JTable table
          Instance of the table the editor is used for.
 
Constructor Summary
PopUpCellEditor(javax.swing.JTable table)
          Constructs an instance using specified table instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          Handles menu item and button events.
protected  void createDialog()
          Not thread safe.
protected  void load(java.io.File file)
          Loads contents of a text file into the text component.
 void run()
          The main method used for launching the dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected javax.swing.JTable table
Instance of the table the editor is used for.

Constructor Detail

PopUpCellEditor

public PopUpCellEditor(javax.swing.JTable table)
Constructs an instance using specified table instance.

Method Detail

run

public void run()
The main method used for launching the dialog. The method implements Runnable interface and is used for calling EventQueue.invokeLater(Runnable) method. This implementation is synchronized, so only one thread can launch the cell editor at a time.

Specified by:
run in interface java.lang.Runnable

load

protected void load(java.io.File file)
Loads contents of a text file into the text component.

Since:
1.0.1

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Handles menu item and button events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

createDialog

protected void createDialog()
Not thread safe.