net.sf.turkey

Class GUI

Implemented Interfaces:
ActionListener, ChangeListener

(package private) class GUI
extends JFrame
implements ActionListener, ChangeListener

Swinging Turkey, ho-ho. The Swing GUI for Turkey.

Nested Class Summary

protected class
GUI.JTextPanel
Simple panel with text.

Field Summary

protected ButtonGroup
bGroup
protected JPanel
buttonBar
protected JButton
closeButton
protected JPanel
configPanel
protected AbstractAction
copyAction
protected JButton
copyButton
protected JPanel
dictionaryPanel
protected JComboBox
dictionaryType
protected Generator
gen
Dummy text generator.
protected AbstractAction
goAction
protected JButton
goButton
protected static int
height
Main window height.
protected JPanel
mainConfigPanel
protected JPanel
mainPanel
protected JTabbedPane
notebook
protected JRadioButton
otHTML
protected JRadioButton
otPlain
protected JTextArea
outputArea
protected JPanel
outputPanel
protected JPanel
outputTypePanel
protected JSlider
paraAdjust
protected JLabel
paragraphLabel
protected JPanel
paramsPanel
protected AbstractAction
quitAction
protected JScrollPane
scrollArea
protected JSlider
sentenceAdjust
protected JLabel
sentenceLabel
protected static int
width
Main window width.

Constructor Summary

GUI()
Loads preferences, sets up basic window properties, lays out the GUI components and generates introductory dummy text.

Method Summary

void
actionPerformed(ActionEvent e)
protected void
closeWindow()
protected void
generateNewText()
Generates new dummy text in the output text area.
protected ImageIcon
getIcon(String id)
protected void
loadPreferences()
Load preferences.
static void
run()
Runs the GUI.
protected void
savePreferences()
Save preferences.
protected void
setClipboard(String s)
protected void
setupComponents()
Setup the GUI components.
protected void
setupWindow()
Basic window setup.
void
stateChanged(ChangeEvent e)

Field Details

bGroup

protected ButtonGroup bGroup

buttonBar

protected JPanel buttonBar

closeButton

protected JButton closeButton

configPanel

protected JPanel configPanel

copyAction

protected AbstractAction copyAction

copyButton

protected JButton copyButton

dictionaryPanel

protected JPanel dictionaryPanel

dictionaryType

protected JComboBox dictionaryType

gen

protected Generator gen
Dummy text generator.

goAction

protected AbstractAction goAction

goButton

protected JButton goButton

height

protected static final int height
Main window height.
Field Value:
500

mainConfigPanel

protected JPanel mainConfigPanel

mainPanel

protected JPanel mainPanel

notebook

protected JTabbedPane notebook

otHTML

protected JRadioButton otHTML

otPlain

protected JRadioButton otPlain

outputArea

protected JTextArea outputArea

outputPanel

protected JPanel outputPanel

outputTypePanel

protected JPanel outputTypePanel

paraAdjust

protected JSlider paraAdjust

paragraphLabel

protected JLabel paragraphLabel

paramsPanel

protected JPanel paramsPanel

quitAction

protected AbstractAction quitAction

scrollArea

protected JScrollPane scrollArea

sentenceAdjust

protected JSlider sentenceAdjust

sentenceLabel

protected JLabel sentenceLabel

width

protected static final int width
Main window width.
Field Value:
440

Constructor Details

GUI

protected GUI()
Loads preferences, sets up basic window properties, lays out the GUI components and generates introductory dummy text.

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)

closeWindow

protected void closeWindow()

generateNewText

protected void generateNewText()
Generates new dummy text in the output text area.

getIcon

protected ImageIcon getIcon(String id)

loadPreferences

protected void loadPreferences()
Load preferences.

run

public static void run()
Runs the GUI.

savePreferences

protected void savePreferences()
Save preferences.

setClipboard

protected void setClipboard(String s)

setupComponents

protected void setupComponents()
Setup the GUI components.

setupWindow

protected void setupWindow()
Basic window setup.

stateChanged

public void stateChanged(ChangeEvent e)