|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectws.gui.GuiGeneration
This class contains the methods for creating basic parts of the main
window(e.g. the input-panel and output-panel), and methods for trigerring
different dialogs.
The main window(except dialogs, menus or popupmenu) is composed of
input-panel and output-panel, the former has again two sub-panels,
word-panel("Top" and "Web"-box, "Word"-inputfield, "START" and "STOP"-button)
and data-panel("DATABASE"-list, "Show" and "Delete"-button). the latter has
"WordSuggester"-pane and "WordNet"-pane, equipped with "Reset"-button and a
progress bar.
This class has three nested classes, which extends the classes
KeyAdapter
and
MouseAdapter
,
it implements also the method for its implemented interface
ActionListener
.
DeleteDialog
,
OkDialog
,
ShowStartDialog
,
StopDialog
,
StopwordsDialog
,
YesNoDialog
,
WsWnMenuBar
,
WsWnPopupMenu
Nested Class Summary | |
private class |
GuiGeneration.DataMouseAdapter
This class extends the class MouseAdapter . |
private class |
GuiGeneration.MyKeyAdapter
This class extends the class KeyAdapter . |
private class |
GuiGeneration.OutputMouseAdapter
This class extends the class MouseAdapter . |
Field Summary | |
private javax.swing.JList |
dataList
The "DATABASE"-list. |
private javax.swing.JButton |
deleteButton
The "Delete"-button. |
private javax.swing.JFrame |
frame
The main window. |
protected javax.swing.JTextField |
inputField
The "Word"-field, where to input one English word. |
private javax.swing.JTabbedPane |
outputPanel
The output-panel composed of "WordSuggester"-pane and "WordNet"-pane. |
static javax.swing.JProgressBar |
progressBar
The progress bar of "WordSuggester"-pane. |
private javax.swing.JButton |
showButton
The "Show"-button. |
private javax.swing.JButton |
startButton
The "START"-button. |
private QeStart |
startThread
The QeStart-object, QeStart extends the class Thread . |
private javax.swing.JButton |
stopButton
The "STOP"-button. |
private javax.swing.JComboBox |
topBox
The "Top"-box. |
private javax.swing.JComboBox |
webBox
The "Web"-box. |
private javax.swing.JButton |
wnResetButton
The "Reset"-button of "WordNet"-pane. |
protected static javax.swing.JTextArea |
wnTextArea
The output area of "WordNet"-pane. |
private javax.swing.JButton |
wsResetButton
The "Reset"-button of "WordSuggester"-pane. |
protected static javax.swing.JTextArea |
wsTextArea
The output area of "WordSuggester"-pane. |
Constructor Summary | |
GuiGeneration(javax.swing.JFrame frame)
Initializes a GuiGeneration object. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements the inherited method actionPerformed from its
implemented interface
ActionListener . |
protected javax.swing.JPanel |
getDataPanel()
Constructs the data-panel, which is composed of "DATABASE"-list, "Show"-button and "Delete"-button. |
protected javax.swing.JPanel |
getInputPanel(javax.swing.JPanel wordPanel,
javax.swing.JPanel dataPanel)
Constructs the input-panel, which is composed of word-panel and data-panel. |
protected javax.swing.JTabbedPane |
getOutputPanel()
Constructs the output-panel, which is composed of two output-areas "WordSuggest" and "WordNet", also "Reset"-button and progress bar as well. |
protected javax.swing.JPanel |
getWordPanel()
Constructs the word-panel, which is composed of "Top"-box, "Web"-box, "Word"-inputfield, "START"-button and "STOP"-button. |
private static java.awt.GridBagConstraints |
makeGBC(int x,
int y,
int width,
int height)
Configurates the layout constraints for the elements in word-panel. |
protected static void |
resetWNTextArea(javax.swing.JTextArea textArea)
Resets the output-area of "WordNet"-pane. |
protected static void |
resetWSTextArea(javax.swing.JTextArea textArea)
Resets the output-area of "WordSuggester"-pane. |
protected static void |
updateDataList(javax.swing.JList dataList)
Updates the "DATABASE"-list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private javax.swing.JFrame frame
private javax.swing.JButton startButton
private javax.swing.JButton stopButton
private javax.swing.JButton showButton
private javax.swing.JButton deleteButton
private javax.swing.JButton wsResetButton
private javax.swing.JButton wnResetButton
private javax.swing.JComboBox topBox
private javax.swing.JComboBox webBox
protected javax.swing.JTextField inputField
private javax.swing.JList dataList
private javax.swing.JTabbedPane outputPanel
protected static javax.swing.JTextArea wsTextArea
protected static javax.swing.JTextArea wnTextArea
public static javax.swing.JProgressBar progressBar
private QeStart startThread
Thread
.
QeStart
Constructor Detail |
public GuiGeneration(javax.swing.JFrame frame)
frame
- The main woidow of the GUI.Method Detail |
protected javax.swing.JPanel getInputPanel(javax.swing.JPanel wordPanel, javax.swing.JPanel dataPanel)
wordPanel
- The word-panel, the first part of input-panel.dataPanel
- The data-panal, the second part of input-panel.
protected javax.swing.JPanel getWordPanel()
protected javax.swing.JPanel getDataPanel() throws java.io.IOException
java.io.IOException
protected javax.swing.JTabbedPane getOutputPanel()
private static java.awt.GridBagConstraints makeGBC(int x, int y, int width, int height)
x
- Specifies the cell containing the leading edge of the
component's display area.y
- Specifies the cell at the top of the component's display area.width
- Specifies the number of cells in a row for the component's
display area.height
- Specifies the number of cells in a column for the component's
display area.
getOutputPanel()
,
protected static void updateDataList(javax.swing.JList dataList) throws java.io.IOException
dataList
- The "DATABASE"-list.
java.io.IOException
Tools.deleteStemInDBList(String, String)
,
Tools.getDataList(String)
protected static void resetWSTextArea(javax.swing.JTextArea textArea)
textArea
- The output-area.protected static void resetWNTextArea(javax.swing.JTextArea textArea)
textArea
- The output-area.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
from its
implemented interface
ActionListener
.
actionPerformed
in interface java.awt.event.ActionListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |