com.swabunga.spell.swing

Class JSpellForm

public class JSpellForm extends JPanel implements ActionListener, ListSelectionListener

Implementation of a spell check form.

This needs to layed out correctly but for the most part it works.

Author: Jason Height (jheight@chariot.net.au)

Field Summary
static StringADDWORD_1
Add word confirm
static StringADDWORD_2
static StringADDWORD_3
static StringADD_CMD
The Add button click action command
protected JTextFieldcheckText
static StringCANCEL_CMD
The Cancel button click action command
static StringIGNOREALL_CMD
The Ignore All button click action command
static StringIGNORE_CMD
The Ignore button click action command
protected EventListenerListlistenerList
The listener list (holds actionlisteners)
protected ResourceBundlemessages
static StringREPLACEALL_CMD
The Replace All button click action command
static StringREPLACE_CMD
The Replace button click action command
protected SpellCheckEventspellEvent
protected JListsuggestList
Constructor Summary
JSpellForm()
Panel constructor
Method Summary
voidactionPerformed(ActionEvent e)
Fired when a button is selected
voidaddActionListener(ActionListener l)
Register an action listener
protected voidfireActionEvent(ActionEvent e)
protected voidinitialiseGUI()
Called by the constructor to initialise the GUI
static voidmain(String[] args)
protected JPanelmakeCentrePanel()
protected JPanelmakeEastPanel()
Creates the buttons on the left hand side of the panel
voidremoveActionListener(ActionListener l)
Deregister an action listener
voidsetSpellEvent(SpellCheckEvent event)
Sets the current spell check event that is being shown to the user
voidvalueChanged(ListSelectionEvent e)
Fired when a value in the list is selected

Field Detail

ADDWORD_1

public static final String ADDWORD_1
Add word confirm

ADDWORD_2

public static final String ADDWORD_2

ADDWORD_3

public static final String ADDWORD_3

ADD_CMD

public static final String ADD_CMD
The Add button click action command

checkText

protected JTextField checkText

CANCEL_CMD

public static final String CANCEL_CMD
The Cancel button click action command

IGNOREALL_CMD

public static final String IGNOREALL_CMD
The Ignore All button click action command

IGNORE_CMD

public static final String IGNORE_CMD
The Ignore button click action command

listenerList

protected EventListenerList listenerList
The listener list (holds actionlisteners)

messages

protected ResourceBundle messages

REPLACEALL_CMD

public static final String REPLACEALL_CMD
The Replace All button click action command

REPLACE_CMD

public static final String REPLACE_CMD
The Replace button click action command

spellEvent

protected SpellCheckEvent spellEvent

suggestList

protected JList suggestList

Constructor Detail

JSpellForm

public JSpellForm()
Panel constructor

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Fired when a button is selected

addActionListener

public void addActionListener(ActionListener l)
Register an action listener

fireActionEvent

protected void fireActionEvent(ActionEvent e)

initialiseGUI

protected void initialiseGUI()
Called by the constructor to initialise the GUI

main

public static void main(String[] args)

makeCentrePanel

protected JPanel makeCentrePanel()

makeEastPanel

protected JPanel makeEastPanel()
Creates the buttons on the left hand side of the panel

removeActionListener

public void removeActionListener(ActionListener l)
Deregister an action listener

setSpellEvent

public void setSpellEvent(SpellCheckEvent event)
Sets the current spell check event that is being shown to the user

valueChanged

public void valueChanged(ListSelectionEvent e)
Fired when a value in the list is selected