org.htmlparser.beans

Class BeanyBaby

public class BeanyBaby extends JFrame implements PropertyChangeListener, ActionListener, MouseListener

Demo of beans. Created on December 30, 2002, 7:54 PM

Author: Derrick Oswald

Field Summary
protected intmCrumb
Current position on the bread crumb trail.
protected VectormTrail
Bread crumb trail of visited URLs.
Constructor Summary
BeanyBaby()
Creates new form BeanyBaby
Method Summary
voidactionPerformed(ActionEvent event)
Handles UI events.
static voidmain(String[] args)
Unit test.
voidmouseClicked(MouseEvent event)
Invoked when the mouse button has been clicked on a component.
voidmouseEntered(MouseEvent event)
Invoked when the mouse enters a component.
voidmouseExited(MouseEvent event)
Invoked when the mouse exits a component.
voidmousePressed(MouseEvent event)
Invoked when a mouse button has been pressed on a component.
voidmouseReleased(MouseEvent event)
Invoked when a mouse button has been released on a component.
voidpropertyChange(PropertyChangeEvent event)
This method ties the two beans together on the same connection.
voidsetURL(String url)
Set the URL for the bean.

Field Detail

mCrumb

protected int mCrumb
Current position on the bread crumb trail.

mTrail

protected Vector mTrail
Bread crumb trail of visited URLs.

Constructor Detail

BeanyBaby

public BeanyBaby()
Creates new form BeanyBaby

Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Handles UI events. Changing the URL in the text field, altering a checkbox setting or choosing a menu item winds up here, where the appropriate change is made to the state of the bean.

Parameters: event Details about the action.

main

public static void main(String[] args)
Unit test.

Parameters: args [0] The URL to use in the bean (optional).

mouseClicked

public void mouseClicked(MouseEvent event)
Invoked when the mouse button has been clicked on a component. A mouse click is a press and release of a mouse button.

Parameters: event Details on the mouse event.

mouseEntered

public void mouseEntered(MouseEvent event)
Invoked when the mouse enters a component.

Parameters: event Details on the mouse event.

mouseExited

public void mouseExited(MouseEvent event)
Invoked when the mouse exits a component.

Parameters: event Details on the mouse event.

mousePressed

public void mousePressed(MouseEvent event)
Invoked when a mouse button has been pressed on a component.

Parameters: event Details on the mouse event.

mouseReleased

public void mouseReleased(MouseEvent event)
Invoked when a mouse button has been released on a component.

Parameters: event Details on the mouse event.

propertyChange

public void propertyChange(PropertyChangeEvent event)
This method ties the two beans together on the same connection. Whenever a property changes on one bean, make sure the URL properties agree by setting the URL from one to the other.

Parameters: event The event describing the event source and the property that has changed.

setURL

public void setURL(String url)
Set the URL for the bean.

Parameters: url The URL to use in the bean.

HTML Parser is an open source library released under LGPL. SourceForge.net