ws.gui
Class UpdateOutputPanel

java.lang.Object
  extended byws.gui.UpdateOutputPanel

public class UpdateOutputPanel
extends java.lang.Object

This class contains the methods for writing and updating the output in "WordSuggester"-pane and "WordNet"-pane, and highlighting the stems, which were found in both of these output areas.

Author:
Sinian Zhang
See Also:
Tools.queryExpansionResult(String, ArrayList, ArrayList, float[], String), WordNet.getWnOutput(String), Highlighter

Field Summary
protected static javax.swing.JTabbedPane outputPanel
          The output-panel composed of "WordSuggester"-pane and "WordNet"-pane.
private static javax.swing.JTextArea wnTextArea
          The output area of "WordNet"-pane.
private static javax.swing.JTextArea wsTextArea
          The output area of "WordSuggester"-pane.
 
Constructor Summary
UpdateOutputPanel()
           
 
Method Summary
static java.util.HashSet HighlightWnOutput(javax.swing.JTextArea textArea, java.lang.String query, java.lang.String text)
          Highlights the stems, which were found in both of "WordSuggester"-pane and "WordNet"-pane.
static void HighlightWsOutput(javax.swing.JTextArea textArea, java.util.HashSet stemSet)
          Highlights the stems, which were found in both of "WordSuggester"-pane and "WordNet"-pane.
static void WnOutput(java.lang.String query, java.lang.String text, boolean hightLight)
          Writes and updates the output in "WordNet"-pane.
static void WsOutput(java.lang.String text)
          Writes and updates the output in "WordSuggester"-pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputPanel

protected static javax.swing.JTabbedPane outputPanel
The output-panel composed of "WordSuggester"-pane and "WordNet"-pane.


wsTextArea

private static javax.swing.JTextArea wsTextArea
The output area of "WordSuggester"-pane.


wnTextArea

private static javax.swing.JTextArea wnTextArea
The output area of "WordNet"-pane.

Constructor Detail

UpdateOutputPanel

public UpdateOutputPanel()
Method Detail

WsOutput

public static void WsOutput(java.lang.String text)
Writes and updates the output in "WordSuggester"-pane.

Parameters:
text - The Text, which shows in this pane.
See Also:
Tools.queryExpansionResult(String, ArrayList, ArrayList, float[], String), Tools.getDateWebFromStemInfoFile(String), Tools.getStemFile(String, int)

WnOutput

public static void WnOutput(java.lang.String query,
                            java.lang.String text,
                            boolean hightLight)
                     throws javax.swing.text.BadLocationException,
                            java.io.IOException
Writes and updates the output in "WordNet"-pane.

Parameters:
text - The Text, which shows in this pane.
Throws:
javax.swing.text.BadLocationException
java.io.IOException
See Also:
WordNet.getWnOutput(String)

HighlightWnOutput

public static java.util.HashSet HighlightWnOutput(javax.swing.JTextArea textArea,
                                                  java.lang.String query,
                                                  java.lang.String text)
                                           throws java.io.IOException,
                                                  javax.swing.text.BadLocationException
Highlights the stems, which were found in both of "WordSuggester"-pane and "WordNet"-pane.

Parameters:
textArea - The output area of "WordNet"-pane.
query - The word as a query, which is delivered by "Word"-inputfield.
text - The Text, which shows in this pane.
Returns:
A set of the stems, which were found in both of these panes.
Throws:
java.io.IOException
javax.swing.text.BadLocationException
See Also:
javax.swing.text.Highlighter

HighlightWsOutput

public static void HighlightWsOutput(javax.swing.JTextArea textArea,
                                     java.util.HashSet stemSet)
                              throws java.io.IOException,
                                     javax.swing.text.BadLocationException
Highlights the stems, which were found in both of "WordSuggester"-pane and "WordNet"-pane.

Parameters:
textArea - The output area of "WordSuggester"-pane.
stemSet - A set of the stems, which were found in both of these panes.
Throws:
java.io.IOException
javax.swing.text.BadLocationException
See Also:
javax.swing.text.Highlighter