All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.beans.net.NNTPSessionCustomizer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----COM.ibm.beans.net.NetBeansCustomizer
|
+----COM.ibm.beans.net.NNTPSessionCustomizer
- public class NNTPSessionCustomizer
- extends NetBeansCustomizer
- implements ItemListener, ListboxListener, ActionListener
Sample customizer for the NNTPSession bean.
Copyright (c) Taligent, Inc. 1996 - 1997.
Copyright (c) IBM Corporation 1996 - 1997.
All Rights Reserved.
- See Also:
- NNTPSession, NNTPSessionBeanInfo
-
NNTPSessionCustomizer()
- Default Constructor creates a Panel
-
actionPerformed(ActionEvent)
- Handles any action on this customizer.
-
createCustomPanels()
- Creates the customized panels for the NNTPSession.
-
getMinimumSize()
- Returns the preferred size of the NNTPCustomizer dialog.
-
getObject()
- Returns the NNTPSession object that we are customizing.
-
getPreferredSize()
- Returns the preferred size of the NNTPCustomizer dialog.
-
initCustomizedFields()
- Initializes the text fields based on the client's (the
NNTPSession object) properties.
-
itemStateChanged(ItemEvent)
- When a single newsgroup is selected from the list box of
newsgroups in the CommandPanel, this method is called by
the Commands Panel to notify us of the selection.
-
logon()
- Try to logon to the specified server.
-
performCommand(String)
- Performs the requested command.
-
rowDeselected(ListboxEvent)
-
-
rowSelected(ListboxEvent)
- When an article is double-clicked on, in the multicolumn list
box, (of articles) in the CommandPanel, this method is called by
the Commands Panel to notify us of the event.
-
setObject(Object)
- The Bean Tester will call us (since we are the customizer)
to set the object we are customizing.
NNTPSessionCustomizer
public NNTPSessionCustomizer()
- Default Constructor creates a Panel
createCustomPanels
protected void createCustomPanels()
- Creates the customized panels for the NNTPSession.
The Network Preferences panel contains the news server field
while the Command Preferences panel contains all the
fields required for an NNTP session.
- Overrides:
- createCustomPanels in class NetBeansCustomizer
initCustomizedFields
protected void initCustomizedFields()
- Initializes the text fields based on the client's (the
NNTPSession object) properties.
- Overrides:
- initCustomizedFields in class NetBeansCustomizer
actionPerformed
public void actionPerformed(ActionEvent event)
- Handles any action on this customizer.
If the Apply button was pressed, the selected command
from the list of NNTP commands is executed using the
text field settings for file and directory names
as the parameters .
- Parameters:
- event - is the ActionEvent that was fired
- Overrides:
- actionPerformed in class NetBeansCustomizer
itemStateChanged
public void itemStateChanged(ItemEvent e)
- When a single newsgroup is selected from the list box of
newsgroups in the CommandPanel, this method is called by
the Commands Panel to notify us of the selection.
For that newsgroup, we get all the articles, extract the
relevant information from each of them, and ask the
Commands Panel to add a row corresponding to each one
of the articles.
rowSelected
public void rowSelected(ListboxEvent le)
- When an article is double-clicked on, in the multicolumn list
box, (of articles) in the CommandPanel, this method is called by
the Commands Panel to notify us of the event.
For that article, we get the text, and ask the
Commands Panel to display the text of the article in a TextArea
component.
rowDeselected
public void rowDeselected(ListboxEvent le)
performCommand
protected void performCommand(String cmdName)
- Performs the requested command.
The client object is called to do all the work.
We report the outcome.
- Parameters:
- cmdName - is the name of the command to perform.
- Overrides:
- performCommand in class NetBeansCustomizer
logon
protected void logon()
- Try to logon to the specified server.
All logon parameter validation is done by the FTPClient.
If we fail, reset our flag (for logged on), just so
we can logon again before the next command is attempted.
- Overrides:
- logon in class NetBeansCustomizer
setObject
public void setObject(Object obj)
- The Bean Tester will call us (since we are the customizer)
to set the object we are customizing.
- Parameters:
- obj - is the object to customize
- Overrides:
- setObject in class NetBeansCustomizer
getObject
public Object getObject()
- Returns the NNTPSession object that we are customizing.
- Overrides:
- getObject in class NetBeansCustomizer
getMinimumSize
public Dimension getMinimumSize()
- Returns the preferred size of the NNTPCustomizer dialog.
- Overrides:
- getMinimumSize in class Container
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of the NNTPCustomizer dialog.
- Overrides:
- getPreferredSize in class NetBeansCustomizer
All Packages Class Hierarchy This Package Previous Next Index