infofilter
Class InfoFilterFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--infofilter.InfoFilterFrame

public class InfoFilterFrame
extends javax.swing.JFrame
implements CIAgentEventListener

The InfoFilterFrame class implements the GUI and the logic for the InfoFilter application.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  javax.swing.JMenuItem aboutMenuItem
           
(package private)  javax.swing.JMenuItem addAllMenuItem
           
(package private)  javax.swing.JMenuItem addArticleMenuItem
           
(package private)  java.util.Vector articles
           
(package private)  javax.swing.JTable articleTable
           
(package private)  javax.swing.JTextArea articleTextArea
           
(package private)  java.awt.BorderLayout borderLayout1
           
(package private) static int COL_RATINGID
           
(package private) static int COL_SCOREID
           
(package private) static int COL_SUBJECTID
           
protected  java.lang.String[] columnNameList
           
(package private)  NewsArticle currentArt
           
(package private)  javax.swing.JMenuItem cutMenuItem
           
protected  java.lang.Object[][] data
           
(package private)  javax.swing.JMenuItem downloadNewsGroupMenuItem
           
(package private)  javax.swing.JMenuItem downloadURLMenuItem
           
(package private)  javax.swing.JMenuItem exitMenuItem
           
(package private)  javax.swing.ButtonGroup feedbackButtonGroup
           
(package private)  FilterAgent filterAgent
           
(package private)  javax.swing.JLabel filterAgentStatusLabel
           
(package private)  int filterType
           
(package private)  java.awt.GridLayout gridLayout1
           
(package private)  java.awt.GridLayout gridLayout2
           
(package private)  javax.swing.JLabel jLabel1
           
(package private)  javax.swing.JMenu jMenu1
           
(package private)  javax.swing.JMenu jMenu2
           
(package private)  javax.swing.JMenu jMenu3
           
(package private)  javax.swing.JMenu jMenu5
           
(package private)  javax.swing.JPanel jPanel1
           
(package private)  javax.swing.JPanel jPanel2
           
(package private)  javax.swing.JScrollPane jScrollPane1
           
(package private)  javax.swing.JScrollPane jScrollPane3
           
(package private)  javax.swing.JMenuItem keywordsMenuItem
           
(package private)  javax.swing.JMenuItem loadArticleMenuItem
           
(package private)  javax.swing.JMenuBar menuBar1
           
(package private)  javax.swing.JMenu menuFile
           
(package private)  NewsReaderAgent newsReaderAgent
           
(package private) static int NUM_COLS
           
(package private)  java.awt.FileDialog openFileDialog
           
(package private)  javax.swing.JMenuItem resetMenuItem
           
(package private)  javax.swing.JMenuItem saveArticleMenuItem
           
(package private)  java.awt.FileDialog saveFileDialog
           
(package private)  boolean scored
           
(package private)  java.lang.String titleBarText
           
(package private)  URLReaderAgent uRLReaderAgent
           
(package private)  javax.swing.ButtonGroup useButtonGroup
           
(package private)  javax.swing.JCheckBoxMenuItem useClustersCheckBoxMenuItem
           
(package private)  javax.swing.JCheckBoxMenuItem useFeedbackCheckBoxMenuItem
           
(package private)  javax.swing.JCheckBoxMenuItem useKeywordsCheckBoxMenuItem
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
inputContext, OPENED, ownedWindowList, state, warningString, windowListener
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
InfoFilterFrame()
          Creates a InfoFilterFrame object.
 
Method Summary
(package private)  void aboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Displays the About dialog.
(package private)  void addAllMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Adds all articles to the profile.
protected  void addArticle(NewsArticle art)
          Scores an article and adds it to the table.
(package private)  void addArticleMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Adds an article to the profile.
 void clusterNetTrained()
          Enables using clusters for filtering after the network was trained.
(package private)  void cutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Cuts an article from the table.
(package private)  void downloadNewsGroupMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Opens the NewsReaderAgent Customizer dialog and allows the user to download articles.
(package private)  void downloadURLMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Opens the URLReaderAgent customizer and allows the user to get a web page.
(package private)  void exitMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Exits the application.
 void fileExit_actionPerformed(java.awt.event.ActionEvent e)
          Exits the application.
 void filterArticles()
          Filter the articles by scoring and sorting the articles, then refresh the table.
 void helpAbout_actionPerformed(java.awt.event.ActionEvent e)
          Displays the About dialog.
(package private)  java.util.Vector insertionSort(java.util.Vector articles)
          Sorts the articles by decreasing order of score.
(package private)  void keywordsMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Opens a filter agent customizer.
(package private)  void loadArticleMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Loads and scores an article.
 void postCIAgentEvent(CIAgentEvent event)
          Processes a CIAgentEvent (does not queue it).
 void processCIAgentEvent(CIAgentEvent event)
          Processes a CIAgentEvent.
protected  void processWindowEvent(java.awt.event.WindowEvent e)
          Closes or repaints the window.
 void ratingNetTrained()
          Enables using feedback for filtering after the network was trained.
(package private)  void resetMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Resets the application.
(package private)  void saveArticleMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Saves an article.
 void setUpTheTable()
          Defines model for the articles JTable component.
(package private)  void trace(java.lang.String msg)
          Displays a message in the bottom pane of the application.
(package private)  void useClustersCheckBoxMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Clusters the articles.
(package private)  void useFeedbackCheckBoxMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Filters the articles based on feedback.
(package private)  void useKeywordsCheckBoxMenuItem_actionPerformed(java.awt.event.ActionEvent e)
          Filters the articles based on keywords.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, postProcessKeyEvent, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, setFocusOwner, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, countComponents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, paint, paintComponents, postsOldMouseEvents, preferredSize, print, printComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

menuBar1

javax.swing.JMenuBar menuBar1

menuFile

javax.swing.JMenu menuFile

resetMenuItem

javax.swing.JMenuItem resetMenuItem

borderLayout1

java.awt.BorderLayout borderLayout1

jPanel1

javax.swing.JPanel jPanel1

jLabel1

javax.swing.JLabel jLabel1

jPanel2

javax.swing.JPanel jPanel2

jScrollPane3

javax.swing.JScrollPane jScrollPane3

articleTextArea

javax.swing.JTextArea articleTextArea

gridLayout1

java.awt.GridLayout gridLayout1

gridLayout2

java.awt.GridLayout gridLayout2

downloadNewsGroupMenuItem

javax.swing.JMenuItem downloadNewsGroupMenuItem

saveArticleMenuItem

javax.swing.JMenuItem saveArticleMenuItem

loadArticleMenuItem

javax.swing.JMenuItem loadArticleMenuItem

exitMenuItem

javax.swing.JMenuItem exitMenuItem

jMenu1

javax.swing.JMenu jMenu1

jMenu2

javax.swing.JMenu jMenu2

jMenu3

javax.swing.JMenu jMenu3

jMenu5

javax.swing.JMenu jMenu5

keywordsMenuItem

javax.swing.JMenuItem keywordsMenuItem

addArticleMenuItem

javax.swing.JMenuItem addArticleMenuItem

addAllMenuItem

javax.swing.JMenuItem addAllMenuItem

useButtonGroup

javax.swing.ButtonGroup useButtonGroup

feedbackButtonGroup

javax.swing.ButtonGroup feedbackButtonGroup

aboutMenuItem

javax.swing.JMenuItem aboutMenuItem

cutMenuItem

javax.swing.JMenuItem cutMenuItem

openFileDialog

java.awt.FileDialog openFileDialog

saveFileDialog

java.awt.FileDialog saveFileDialog

columnNameList

protected java.lang.String[] columnNameList

data

protected java.lang.Object[][] data

NUM_COLS

static final int NUM_COLS

COL_SUBJECTID

static final int COL_SUBJECTID

COL_SCOREID

static final int COL_SCOREID

COL_RATINGID

static final int COL_RATINGID

articles

java.util.Vector articles

filterAgent

FilterAgent filterAgent

newsReaderAgent

NewsReaderAgent newsReaderAgent

uRLReaderAgent

URLReaderAgent uRLReaderAgent

currentArt

NewsArticle currentArt

scored

boolean scored

filterType

int filterType

jScrollPane1

javax.swing.JScrollPane jScrollPane1

articleTable

javax.swing.JTable articleTable

downloadURLMenuItem

javax.swing.JMenuItem downloadURLMenuItem

useKeywordsCheckBoxMenuItem

javax.swing.JCheckBoxMenuItem useKeywordsCheckBoxMenuItem

useClustersCheckBoxMenuItem

javax.swing.JCheckBoxMenuItem useClustersCheckBoxMenuItem

useFeedbackCheckBoxMenuItem

javax.swing.JCheckBoxMenuItem useFeedbackCheckBoxMenuItem

titleBarText

java.lang.String titleBarText

filterAgentStatusLabel

javax.swing.JLabel filterAgentStatusLabel
Constructor Detail

InfoFilterFrame

public InfoFilterFrame()
Creates a InfoFilterFrame object.
Method Detail

setUpTheTable

public void setUpTheTable()
Defines model for the articles JTable component.

fileExit_actionPerformed

public void fileExit_actionPerformed(java.awt.event.ActionEvent e)
Exits the application.
Parameters:
e - the ActionEvent object generated when exit was selected

helpAbout_actionPerformed

public void helpAbout_actionPerformed(java.awt.event.ActionEvent e)
Displays the About dialog.
Parameters:
e - the ActionEvent object when About was selected

processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent e)
Closes or repaints the window.
Parameters:
e - the WindowEvent object generated to close or activate the window
Overrides:
processWindowEvent in class javax.swing.JFrame

cutMenuItem_actionPerformed

void cutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Cuts an article from the table.
Parameters:
e - the ActionEvent object generated when Cut was selected

useKeywordsCheckBoxMenuItem_actionPerformed

void useKeywordsCheckBoxMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Filters the articles based on keywords.
Parameters:
e - the ActionEvent object generated when the Use keywords box was checked

useClustersCheckBoxMenuItem_actionPerformed

void useClustersCheckBoxMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Clusters the articles.
Parameters:
e - the ActionEvent object generated when the Use clusters box was checked

useFeedbackCheckBoxMenuItem_actionPerformed

void useFeedbackCheckBoxMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Filters the articles based on feedback.
Parameters:
e - the ActionEvent object generated when Use feedback box was checked

clusterNetTrained

public void clusterNetTrained()
Enables using clusters for filtering after the network was trained.

ratingNetTrained

public void ratingNetTrained()
Enables using feedback for filtering after the network was trained.

filterArticles

public void filterArticles()
Filter the articles by scoring and sorting the articles, then refresh the table.

insertionSort

java.util.Vector insertionSort(java.util.Vector articles)
Sorts the articles by decreasing order of score.
Parameters:
articles - the Vector object that contains the articles to be sorted
Returns:
the Vector object that contains the sorted articles

keywordsMenuItem_actionPerformed

void keywordsMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Opens a filter agent customizer.
Parameters:
e - the ActionEvent object generated when keywords was selected

addArticleMenuItem_actionPerformed

void addArticleMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Adds an article to the profile.
Parameters:
e - the ActionEvent object generated when Add article was selected

addAllMenuItem_actionPerformed

void addAllMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Adds all articles to the profile.
Parameters:
e - the ActionEvent object generated when Add all was selected

exitMenuItem_actionPerformed

void exitMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Exits the application.
Parameters:
e - the ActionEvent object generated when exit was selected

loadArticleMenuItem_actionPerformed

void loadArticleMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Loads and scores an article.
Parameters:
e - the ActionEvent object generated when load article was selected

saveArticleMenuItem_actionPerformed

void saveArticleMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Saves an article.
Parameters:
e - the ActionEvent object generated when save was selected

resetMenuItem_actionPerformed

void resetMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Resets the application.
Parameters:
e - the ActionEvent object generated when reset was selected

aboutMenuItem_actionPerformed

void aboutMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Displays the About dialog.
Parameters:
e - the ActionEvent object generated when About was selected

downloadNewsGroupMenuItem_actionPerformed

void downloadNewsGroupMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Opens the NewsReaderAgent Customizer dialog and allows the user to download articles.
Parameters:
e - the ActionEvent object generated when download Newsgroup was selected

addArticle

protected void addArticle(NewsArticle art)
Scores an article and adds it to the table.
Parameters:
art - the NewsArticle object to be added

trace

void trace(java.lang.String msg)
Displays a message in the bottom pane of the application.
Parameters:
msg - the String object that contains the message to be displayed

processCIAgentEvent

public void processCIAgentEvent(CIAgentEvent event)
Processes a CIAgentEvent.
Specified by:
processCIAgentEvent in interface CIAgentEventListener
Parameters:
event - the CIAgentEvent object to be processed

postCIAgentEvent

public void postCIAgentEvent(CIAgentEvent event)
Processes a CIAgentEvent (does not queue it).
Specified by:
postCIAgentEvent in interface CIAgentEventListener
Parameters:
event - the CIAgentEvent object to be processed

downloadURLMenuItem_actionPerformed

void downloadURLMenuItem_actionPerformed(java.awt.event.ActionEvent e)
Opens the URLReaderAgent customizer and allows the user to get a web page.
Parameters:
e - the ActionEvent object generated when download URL was selected