|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkr.ac.kaist.swrc.jhannanum.demo.GUIDemo
public class GUIDemo
This is a GUI-based demo program of the HanNanum that helps users to understand the concept
of work flow and use the HanNanum library easily. It shows a window that has components for plug-in pool,
work flow, plug-in information, work flow controls, input text and analysis result. Users can easily
set up various work flows by drag-and-drop the plug-ins from the plug-in pool to the work flow component,
and see the analysis result.
Users can use this GUI demo program by following procedure:
1. Browse the plug-ins in the plug-in pool. The brief information about the selected plug-in will be
displayed so that you can refer the information when set the work flow up.
2. Drag and drop plug-ins from the plug-in pool to the list in the work flow considering the phase
and type of the plug-in.
- If you want to remove the plug-in on the work flow, simply double click it.
- If you change the order of the supplement plug-ins in each phase, simply drag and drop a plug-in
to the position you want.
3. Once you finish to set the work flow up, choose 'Multi-thread Mode' or 'Single-thread Mode'.
4. Click 'Activate the work flow' button.
5. Type or copy-and-past text that you want to analyze into the 'Input Text' area.
6. Click 'Analyze Text' button.
7. You can see the analysis result on 'Result' area.
8. Repeat 5~7 to analyze other text with the activated work flow.
Or click 'Close the work flow' button and go to step 1 to set up new work flow.
Nested Class Summary | |
---|---|
private class |
GUIDemo.PluginInfo
This class has the properties of a HanNanum plug-in. |
private class |
GUIDemo.PluginListMouseListener
Event listener for the plug-in selection on the list for the work flow. |
private class |
GUIDemo.PluginTransferHandler
Handler for the drag-and-drop functionality of plug-in from the plug-in pool to the work flow. |
private class |
GUIDemo.PluginTreeSelectionListener
Event listener for the plug-in selection on the tree view. |
private class |
GUIDemo.SharedActionHandler
The event handler that is used in various purpose. |
Field Summary | |
---|---|
private boolean |
activated
|
private javax.swing.JTextArea |
areaPluginInfo
|
private javax.swing.JButton |
buttonActivate
|
private javax.swing.JButton |
buttonAnalysis
|
private javax.swing.JButton |
buttonReset
|
private javax.swing.JTextArea |
inputTextArea
|
private javax.swing.DefaultListModel |
listModelMajor2
|
private javax.swing.DefaultListModel |
listModelMajor3
|
private javax.swing.DefaultListModel |
listModelSupplement1
|
private javax.swing.DefaultListModel |
listModelSupplement2
|
private javax.swing.DefaultListModel |
listModelSupplement3
|
private javax.swing.JList |
listPluginMajor2
|
private javax.swing.JList |
listPluginMajor3
|
private javax.swing.JList |
listPluginSupplement1
|
private javax.swing.JList |
listPluginSupplement2
|
private javax.swing.JList |
listPluginSupplement3
|
private javax.swing.JFrame |
mainFrame
|
private javax.swing.JMenuBar |
menuBar
|
private javax.swing.JMenu |
menuFile
|
private javax.swing.JMenu |
menuHelp
|
private javax.swing.JMenuItem |
menuItemFileOpen
|
private javax.swing.JMenuItem |
menuItemHelp
|
private boolean |
multiThreadMode
|
private javax.swing.JTextArea |
outputTextArea
|
private java.util.HashMap<java.lang.String,java.lang.String> |
pluginInfoMap
|
private javax.swing.JRadioButton |
radioMultiThread
|
private javax.swing.JRadioButton |
radioSingleThread
|
private GUIDemo.PluginInfo |
selectedPlugin
|
private javax.swing.JSplitPane |
splitPaneBottom
|
private javax.swing.JSplitPane |
splitPaneTop
|
private GUIDemo.PluginInfo |
tempPlugin
|
private javax.swing.JTree |
tree
|
private Workflow |
workflow
|
Constructor Summary | |
---|---|
GUIDemo()
|
Method Summary | |
---|---|
private javax.swing.JComponent |
createPaneCenter()
Returns a panel for the input and output text areas. |
private javax.swing.JComponent |
createPaneNorth()
Setting of the split panel for plug-in pool and the work flow. |
private void |
createPluginNodes(javax.swing.tree.DefaultMutableTreeNode top)
Setting of the each plug-in which is in the tree view. |
private javax.swing.JComponent |
createPluginPool()
Setting of the plug-in tree view. |
private javax.swing.JComponent |
createWorkflow()
Returns the panel for the work flow. |
private java.lang.String |
getPluginAbstarct(java.lang.String filePath)
Returns the abstract text for a plug-in from the specified configuration file. |
private void |
loadPluginInformation()
It loads the meta information for each plug-in from the configuration files. |
static void |
main(java.lang.String[] args)
Run this demo program. |
void |
run()
Sets the GUI up and launch the demo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.swing.JFrame mainFrame
private javax.swing.JMenuBar menuBar
private javax.swing.JMenu menuFile
private javax.swing.JMenu menuHelp
private javax.swing.JMenuItem menuItemFileOpen
private javax.swing.JMenuItem menuItemHelp
private javax.swing.JTree tree
private java.util.HashMap<java.lang.String,java.lang.String> pluginInfoMap
private javax.swing.JList listPluginMajor2
private javax.swing.JList listPluginMajor3
private javax.swing.JList listPluginSupplement1
private javax.swing.JList listPluginSupplement2
private javax.swing.JList listPluginSupplement3
private javax.swing.DefaultListModel listModelMajor2
private javax.swing.DefaultListModel listModelMajor3
private javax.swing.DefaultListModel listModelSupplement1
private javax.swing.DefaultListModel listModelSupplement2
private javax.swing.DefaultListModel listModelSupplement3
private javax.swing.JTextArea areaPluginInfo
private javax.swing.JTextArea inputTextArea
private javax.swing.JTextArea outputTextArea
private javax.swing.JSplitPane splitPaneTop
private javax.swing.JSplitPane splitPaneBottom
private javax.swing.JRadioButton radioMultiThread
private javax.swing.JRadioButton radioSingleThread
private javax.swing.JButton buttonActivate
private javax.swing.JButton buttonAnalysis
private javax.swing.JButton buttonReset
private GUIDemo.PluginInfo selectedPlugin
private GUIDemo.PluginInfo tempPlugin
private boolean multiThreadMode
private boolean activated
private Workflow workflow
Constructor Detail |
---|
public GUIDemo()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- public void run()
private javax.swing.JComponent createPaneNorth()
private javax.swing.JComponent createPluginPool()
private void createPluginNodes(javax.swing.tree.DefaultMutableTreeNode top)
top
- - default top tree nodeprivate void loadPluginInformation()
private java.lang.String getPluginAbstarct(java.lang.String filePath) throws JSONException, java.io.IOException
filePath
- - the configuration file for the plug-in written in JSON format
JSONException
java.io.IOException
private javax.swing.JComponent createWorkflow()
private javax.swing.JComponent createPaneCenter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |