Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.asaph.standardgui
Class StringUpdater  view StringUpdater download StringUpdater.java

java.lang.Object
  extended bycom.virtuosotechnologies.asaph.standardgui.StringUpdater
All Implemented Interfaces:
java.awt.event.ActionListener, javax.swing.event.CaretListener, java.util.EventListener, java.awt.event.FocusListener, javax.swing.event.UndoableEditListener

class StringUpdater
extends java.lang.Object
implements java.awt.event.FocusListener, java.awt.event.ActionListener, javax.swing.event.UndoableEditListener, javax.swing.event.CaretListener

Something that keeps a SimpleString and a text field synched.


Nested Class Summary
private  class StringUpdater.InternalListener
           
 
Field Summary
private static StringUpdater currentUpdater_
           
private  SongEditor editor_
           
private  javax.swing.text.JTextComponent field_
           
private  boolean fieldDirty_
           
private  StringUpdater.InternalListener internalListener_
           
private  com.virtuosotechnologies.asaph.model.StringList listModel_
           
private  com.virtuosotechnologies.asaph.model.SimpleString model_
           
private  com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils_
           
private  javax.swing.event.UndoableEditListener undoListener_
           
 
Constructor Summary
private StringUpdater(javax.swing.text.JTextComponent field, com.virtuosotechnologies.asaph.model.SimpleString model, SongEditor editor, javax.swing.event.UndoableEditListener listener)
           
private StringUpdater(javax.swing.text.JTextComponent field, com.virtuosotechnologies.asaph.model.StringList model, com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils, SongEditor editor, javax.swing.event.UndoableEditListener listener)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          This method is invoked when an action occurs.
 void caretUpdate(javax.swing.event.CaretEvent ev)
          Caret position has been updated
private  void commit()
           
(package private) static void commitCurrent()
           
(package private) static void copyCurrent()
           
(package private) static void cutCurrent()
           
(package private) static void deleteCurrent()
           
 void focusGained(java.awt.event.FocusEvent ev)
          This method is called when a component gains the keyboard focus.
 void focusLost(java.awt.event.FocusEvent ev)
          This method is invoked when a component loses the keyboard focus.
(package private) static void install(javax.swing.text.JTextComponent field, com.virtuosotechnologies.asaph.model.SimpleString model, SongEditor editor, javax.swing.event.UndoableEditListener listener)
           
(package private) static void install(javax.swing.text.JTextComponent field, com.virtuosotechnologies.asaph.model.StringList model, com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils, SongEditor editor, javax.swing.event.UndoableEditListener listener)
           
(package private) static void pasteCurrent()
           
 void undoableEditHappened(javax.swing.event.UndoableEditEvent ev)
          Undoable edit has happened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentUpdater_

private static StringUpdater currentUpdater_

field_

private javax.swing.text.JTextComponent field_

model_

private com.virtuosotechnologies.asaph.model.SimpleString model_

listModel_

private com.virtuosotechnologies.asaph.model.StringList listModel_

songUtils_

private com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils_

editor_

private SongEditor editor_

undoListener_

private javax.swing.event.UndoableEditListener undoListener_

internalListener_

private StringUpdater.InternalListener internalListener_

fieldDirty_

private boolean fieldDirty_
Constructor Detail

StringUpdater

private StringUpdater(javax.swing.text.JTextComponent field,
                      com.virtuosotechnologies.asaph.model.SimpleString model,
                      SongEditor editor,
                      javax.swing.event.UndoableEditListener listener)

StringUpdater

private StringUpdater(javax.swing.text.JTextComponent field,
                      com.virtuosotechnologies.asaph.model.StringList model,
                      com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils,
                      SongEditor editor,
                      javax.swing.event.UndoableEditListener listener)
Method Detail

install

static void install(javax.swing.text.JTextComponent field,
                    com.virtuosotechnologies.asaph.model.SimpleString model,
                    SongEditor editor,
                    javax.swing.event.UndoableEditListener listener)

install

static void install(javax.swing.text.JTextComponent field,
                    com.virtuosotechnologies.asaph.model.StringList model,
                    com.virtuosotechnologies.asaph.modelutils.SongUtils songUtils,
                    SongEditor editor,
                    javax.swing.event.UndoableEditListener listener)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Description copied from interface: java.awt.event.ActionListener
This method is invoked when an action occurs.

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

undoableEditHappened

public void undoableEditHappened(javax.swing.event.UndoableEditEvent ev)
Description copied from interface: javax.swing.event.UndoableEditListener
Undoable edit has happened

Specified by:
undoableEditHappened in interface javax.swing.event.UndoableEditListener

focusGained

public void focusGained(java.awt.event.FocusEvent ev)
Description copied from interface: java.awt.event.FocusListener
This method is called when a component gains the keyboard focus.

Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent ev)
Description copied from interface: java.awt.event.FocusListener
This method is invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface java.awt.event.FocusListener

caretUpdate

public void caretUpdate(javax.swing.event.CaretEvent ev)
Description copied from interface: javax.swing.event.CaretListener
Caret position has been updated

Specified by:
caretUpdate in interface javax.swing.event.CaretListener

commit

private void commit()

commitCurrent

static void commitCurrent()

cutCurrent

static void cutCurrent()

copyCurrent

static void copyCurrent()

pasteCurrent

static void pasteCurrent()

deleteCurrent

static void deleteCurrent()