infofilter
Class NewsReaderAgentCustomizer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--infofilter.NewsReaderAgentCustomizer

public class NewsReaderAgentCustomizer
extends javax.swing.JDialog
implements java.beans.Customizer, CIAgentEventListener, java.lang.Runnable

The NewsReaderAgentCustomizer class implements the customizer for the news reader agent.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  NewsReaderAgent agent
           
(package private)  javax.swing.JRadioButton AllArticlesRadioButton
           
(package private)  java.awt.BorderLayout borderLayout1
           
(package private)  javax.swing.JButton CancelButton
           
(package private)  javax.swing.JButton DownloadButton
           
(package private)  boolean downloadInProgress
           
(package private)  javax.swing.JProgressBar DownloadProgressBar
           
(package private)  javax.swing.ButtonGroup group
           
(package private)  InfoFilterFrame infoFilterFrame
           
(package private)  javax.swing.JLabel jLabel1
           
(package private)  javax.swing.JLabel jLabel2
           
(package private)  javax.swing.JLabel jLabel3
           
(package private)  javax.swing.JPanel jPanel1
           
(package private)  javax.swing.JPanel jPanel2
           
(package private)  javax.swing.JRadioButton MaxArticlesRadioButton
           
(package private)  javax.swing.JTextField maxArticlesTextField
           
(package private)  javax.swing.JComboBox NewsGroupComboBox
           
(package private)  javax.swing.JComboBox NewsHostComboBox
           
(package private)  int numArticles
           
(package private)  javax.swing.JPanel panel1
           
(package private)  java.lang.Thread runnit
           
(package private)  javax.swing.JLabel statusLabel
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
modal, resizable, title
 
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
NewsReaderAgentCustomizer()
          Creates a NewsReaderAgentCustomizer object.
NewsReaderAgentCustomizer(java.awt.Frame frame, java.lang.String title, boolean modal)
          Creates a NewsReaderAgentCustomizer object with the given frame, title, and modality.
 
Method Summary
(package private)  void CancelButton_actionPerformed(java.awt.event.ActionEvent e)
          Cancels the customizer.
(package private)  void DownloadButton_actionPerformed(java.awt.event.ActionEvent e)
          Gets the data from the UI then posts an event to the agent to download the news group.
 void getDataFromBean()
          Gets data from the bean and sets the GUI controls.
protected  void init()
          Initializes the combo box.
(package private)  void jbInit()
          Initializes the GUI controls.
(package private)  void NewsGroupComboBox_actionPerformed(java.awt.event.ActionEvent e)
          Does nothing.
(package private)  void NewsHostComboBox_actionPerformed(java.awt.event.ActionEvent e)
          Does nothing.
 void postCIAgentEvent(CIAgentEvent event)
          Processes a CIAgentEvent (does not queue it).
 void processCIAgentEvent(CIAgentEvent event)
          Processes a CIAgentEvent (trace or addArticle).
 void run()
          Updates the progress bar during a download.
 void setDataOnBean()
          Take data from GUI and sets properties on the agent bean.
 void setInfoFilterFrame(InfoFilterFrame frame)
          Sets the info filter frame to the given value.
 void setObject(java.lang.Object obj)
          Sets the object to be customized.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processWindowEvent, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
, addNotify, constructComponentName, getTitle, isModal, isResizable, setModal, setResizable, setTitle, show
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, finalize, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, pack, postEvent, postProcessKeyEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, setFocusOwner, 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, removeNotify, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, 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

panel1

javax.swing.JPanel panel1

borderLayout1

java.awt.BorderLayout borderLayout1

jPanel1

javax.swing.JPanel jPanel1

DownloadButton

javax.swing.JButton DownloadButton

CancelButton

javax.swing.JButton CancelButton

jPanel2

javax.swing.JPanel jPanel2

jLabel1

javax.swing.JLabel jLabel1

NewsGroupComboBox

javax.swing.JComboBox NewsGroupComboBox

jLabel2

javax.swing.JLabel jLabel2

NewsHostComboBox

javax.swing.JComboBox NewsHostComboBox

maxArticlesTextField

javax.swing.JTextField maxArticlesTextField

jLabel3

javax.swing.JLabel jLabel3

DownloadProgressBar

javax.swing.JProgressBar DownloadProgressBar

statusLabel

javax.swing.JLabel statusLabel

AllArticlesRadioButton

javax.swing.JRadioButton AllArticlesRadioButton

MaxArticlesRadioButton

javax.swing.JRadioButton MaxArticlesRadioButton

group

javax.swing.ButtonGroup group

infoFilterFrame

InfoFilterFrame infoFilterFrame

agent

NewsReaderAgent agent

numArticles

int numArticles

downloadInProgress

boolean downloadInProgress

runnit

java.lang.Thread runnit
Constructor Detail

NewsReaderAgentCustomizer

public NewsReaderAgentCustomizer(java.awt.Frame frame,
                                 java.lang.String title,
                                 boolean modal)
Creates a NewsReaderAgentCustomizer object with the given frame, title, and modality.
Parameters:
frame - the Frame object for this customizer
title - the String object that contains the title for this customizer
modal - the boolean flag that indicates modality

NewsReaderAgentCustomizer

public NewsReaderAgentCustomizer()
Creates a NewsReaderAgentCustomizer object.
Method Detail

setObject

public void setObject(java.lang.Object obj)
Sets the object to be customized.
Specified by:
setObject in interface java.beans.Customizer
Parameters:
obj - the Object to be customized

init

protected void init()
Initializes the combo box.

jbInit

void jbInit()
      throws java.lang.Exception
Initializes the GUI controls.
Throws:
java.lang.Exception - if any errors occur during initialization

NewsHostComboBox_actionPerformed

void NewsHostComboBox_actionPerformed(java.awt.event.ActionEvent e)
Does nothing.
Parameters:
e - the ActionEvent object

NewsGroupComboBox_actionPerformed

void NewsGroupComboBox_actionPerformed(java.awt.event.ActionEvent e)
Does nothing.
Parameters:
e - the ActionEvent object

DownloadButton_actionPerformed

void DownloadButton_actionPerformed(java.awt.event.ActionEvent e)
Gets the data from the UI then posts an event to the agent to download the news group.
Parameters:
e - the ActionEvent object generated when the download button was pressed

CancelButton_actionPerformed

void CancelButton_actionPerformed(java.awt.event.ActionEvent e)
Cancels the customizer.
Parameters:
e - the ActionEvent object generated when the cancel button was pressed

setInfoFilterFrame

public void setInfoFilterFrame(InfoFilterFrame frame)
Sets the info filter frame to the given value.
Parameters:
frame - the InfoFilterFrame object that contains the new frame

getDataFromBean

public void getDataFromBean()
Gets data from the bean and sets the GUI controls.

setDataOnBean

public void setDataOnBean()
Take data from GUI and sets properties on the agent bean.

run

public void run()
Updates the progress bar during a download.
Specified by:
run in interface java.lang.Runnable

processCIAgentEvent

public void processCIAgentEvent(CIAgentEvent event)
Processes a CIAgentEvent (trace or addArticle).
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