org.rubato.rubettes.wallpaper
Class MorphismCellEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by org.rubato.rubettes.wallpaper.MorphismCellEditor
All Implemented Interfaces:
java.awt.event.MouseListener, java.io.Serializable, java.util.EventListener, javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class MorphismCellEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.MouseListener

A cell editor used for table cells containg morphisms. The morphism string is visible and the editing dialog opens, when the cell is doubleclicked.

Author:
Florian Thalmann
See Also:
Serialized Form

Constructor Summary
MorphismCellEditor()
           
 
Method Summary
 java.lang.Object getCellEditorValue()
          The value returned is the morphism selected in the dialog.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          The cell contains a button.
 void mouseClicked(java.awt.event.MouseEvent e)
          Ensures that, when the cell is double clicked, the morphism editing dialog is opened.
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Constructor Detail

MorphismCellEditor

public MorphismCellEditor()
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Ensures that, when the cell is double clicked, the morphism editing dialog is opened.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

getCellEditorValue

public java.lang.Object getCellEditorValue()
The value returned is the morphism selected in the dialog.

Specified by:
getCellEditorValue in interface javax.swing.CellEditor

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
The cell contains a button. The morphism editing dialog is created in this method.

Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener