gui.action package


Package Contract

This package contains the UserAction class that is a class used to store information about a user's activity in the GUI. UserAction contains methods and variables for the minimum information needed about an activity. There are also several classes in this package that extend UserAction to represent a specific activity. These classes are then used to send messages to the Generalizer regarding user activities.

Package-Level CRC

Collaborators:

Responsibilities:

Class-Level CRC

The gui-action package contains the following classes:
* UserAction
* UserActionListener
* UserActionMulticaster
* UserActionAdapter
* AttributeChangeAction
* AttributeViewAction
* PageAddAction
* PageKeepAction
* PageKillAction
* PageMoveAction
* PageRateAction
* PageSelectAction
* WebSearchAction
* PageViewAction

Class UserAction

* Responsibilities:
A UserAction is an object representing something the user has done. This class is set up to be extended, this is just the skeleton of the basic information needed about a user action. Instances of this class (or classes extending this class) are used to notify the Generalizer of user activity in the user interface.
* Variables and Methods:
protected Date time;
public UserAction(Date time)

Class UserActionListener

* Responsibilities:
This interface should be implemented by classes that want to receive UserActions when something happens.
* Variables and Methods:
public void pageMoved(PageMoveAction moveAction);
public void pageKilled(PageKillAction killAction);
public void pageSelected(PageSelectAction selectAction);
public void pageViewed(PageViewAction viewAction);
public void pageRated(PageRateAction rateAction);
public void pageKept(PageKeepAction keepAction);
public void webSearched(WebSearchAction searchAction);
public void pageAdded(PageAddAction addPageAction);
public void pageAttributesViewed(AttributesViewAction attributeViewAction);
public void pageAttributeChanged(AttributeChangeAction attributeChangeAction);

Class UserActionMulticaster

* Responsibilities:
The UserActionMulticaster is used to send a single UserAction to multiple UserActionListeners. It should not be instantiated directly. Instead, the static add() and remove() methods should be used to get a UserActionListener.
Treat a UserActionMulticaster as you would a UserActionListener, and events sent to it will be passed on to both UserActionListeners that it's keeping track of.
* Constructor
protected UserActionMulticaster(UserActionListener a, UserActionListener b)
The constructor -- note that it's protected.
* Variables and Methods:
public static UserActionListener add(UserActionListener a, UserActionListener b)
Returns an Object that will send events to both a and b.
public static UserActionListener remove(UserActionListener a, UserActionListener b)
Remove b from the set of UserActionListeners in a.
public void pageMoved(PageMoveAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageKilled(PageKillAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageSelected(PageSelectAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageViewed(PageViewAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageRated(PageRateAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageKept(PageKeepAction action)
From the UserActionListener interface. Tell a and b about the action.
public void webSearched(WebSearchAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageAdded(PageAddAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageAttributesViewed(AttributesViewAction action)
From the UserActionListener interface. Tell a and b about the action.
public void pageAttributeChanged(AttributeChangeAction action)
From the UserActionListener interface. Tell a and b about the action.

Class UserActionAdapter implements UserActionListener

* Responsibilities:
This class provides empty versions of all the methods specified by the UserActionListener interface.
* Variables and Methods:
public void pageMoved(PageMoveAction moveAction)
public void pageKilled(PageKillAction killAction)
public void pageSelected(PageSelectAction selectAction)
public void pageViewed(PageViewAction viewAction)
public void pageRated(PageRateAction rateAction)
public void pageKept(PageKeepAction keepAction)
public void webSearched(WebSearchAction searchAction)
public void pageAdded(PageAddAction addPageAction)
public void pageAttributesViewed(AttributesViewAction attributeViewAction)
public void pageAttributeChanged(AttributeChangeAction attributeChangeAction)

Class AttributeChangeAction extends UserAction

* Responsibilities:
Represents the user changing some attribute of a page.
* Variables and Methods:
public AttributeChangeAction(PageID id, String attribute, Object value)
public PageID getId()
public String getAttribute()
public Object getValue()

Class AttributesViewAction extends UserAction

* Responsibilities:
Represents the user asking for the attributes of a page.
* Variables and Methods:
public AttributesViewAction(PageID id)
public PageID getId()

Class PageAddAction extends UserAction

* Responsibilities:
Represents the user adding a page.
* Variables and Methods:
public PageAddAction(String url)
public String getURLString()

Class PageKeepAction extends UserAction

* Responsibilities:
Represents the user deciding to keep a page.
* Variables and Methods:
public PageKeepAction(PageID id)
public PageID getId()

Class PageKillAction extends UserAction

* Responsibilities:
Represents the user killing a page.
* Variables and Methods:
public PageKillAction(PageID id)
public PageID getId()

Class PageMoveAction extends UserAction

* Responsibilities:
Represents the user moving a page.
* Variables and Methods:
public PageMoveAction(PageID id, Vector pagesNearOrig, Vector pagesNearDest)
public PageID getId()
public Vector getPagesNearOrig()
public Vector getPagesNearDest()

Class PageRateAction extends UserAction

* Responsibilities:
Represents the user rating a page.
* Variables and Methods:
public PageRateAction(PageID id, int rating, int minRating, int maxRating)
public PageID getId()
public int getRating()
public int getMinimumRating()
public int getMaximumRating()

Class PageSelectAction extends UserAction

* Responsibilities:
Represents the user selecting a page.
* Variables and Methods:
public PageSelectAction(PageID id)
public PageID getId()

Class PageViewAction extends UserAction

* Responsibilities:
Represents the user viewing a stored webpage.
* Variables and Methods:
public PageViewAction(PageID id)
public PageID getId()

Class WebSearchAction extends UserAction

* Responsibilities:
Represents the user searching with a search engine. It holds the search string and a Vector of the resulting URLs.
* Variables and Methods:
public WebSearchAction(String searchString, Vector resultURLs)
public String getSearchString()
public Vector getResults()

Message Interactions

Message Interactions with other packages
* with gui
The various subclasses of UserAction will be created by classes in the gui package (InterfaceWindow and CloseUp), and sent to any UserActionListeners registered with the InterfaceWindow.
* with generalizer
The Generalizer class, once it is written, will be in the generalizer package. It will be a UserActionListener and get the UserActions from the InterfaceWindow.
last | | to sitemap | | up one level | | next