agentland.device.intelliCD
Class ButtonAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.device.intelliCD.ButtonAgent
- All Implemented Interfaces:
- Agent, Button, Good, MetagluePrimitives, Remote, Serializable, Spy
- Direct Known Subclasses:
- LittleButtonAgent
- public class ButtonAgent
- extends GoodAgent
- implements Button
A graphical interface to the IntelliCD agent
. This allows
control over playing, stopping, and other functions, and uses the
Jukebox agent
to
sort and edit the songs.
- See Also:
- Serialized Form
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getAlert, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou |
Methods inherited from interface agentland.util.Spy |
tell |
ICON_LOCATION
protected static String ICON_LOCATION
frame
protected JFrame frame
player
protected IntelliCD player
curSongText
protected JTextArea curSongText
curSong
protected Song curSong
curSongPanel
protected JPanel curSongPanel
timer
protected JLabel timer
nextBest
protected JTextArea nextBest
nextBestScroll
protected JScrollPane nextBestScroll
nextBestToggle
protected JButton nextBestToggle
nextBestPanel
protected JPanel nextBestPanel
nextBestShown
protected boolean nextBestShown
songTreeToggle
protected JButton songTreeToggle
neutralIcon
protected ImageIcon neutralIcon
likeIcon
protected ImageIcon likeIcon
loveIcon
protected ImageIcon loveIcon
hateIcon
protected ImageIcon hateIcon
statusLabel
protected JLabel statusLabel
my_status
protected int my_status
global_status
protected int global_status
jukebox
protected Jukebox jukebox
curDesignation
protected String curDesignation
tunerControl
protected boolean tunerControl
selectedSong
protected Song selectedSong
STOPPED
protected static final int STOPPED
PLAYING
protected static final int PLAYING
PAUSED
protected static final int PAUSED
play_state
protected int play_state
pauseButton
protected JButton pauseButton
stopButton
protected JButton stopButton
hateButton
protected JButton hateButton
pauseIcon
protected ImageIcon pauseIcon
playIcon
protected ImageIcon playIcon
stopIcon
protected ImageIcon stopIcon
treeIcon
protected ImageIcon treeIcon
skullIcon
protected ImageIcon skullIcon
ButtonAgent
public ButtonAgent()
throws RemoteException
loadIcons
protected void loadIcons()
- Loads all the icons. The icons are loaded from a portable
prefix, and the exact location can be tuned via the ICON_LOCATION
parameter.
buildFrame
protected void buildFrame()
- The main method for creating the button interface. This will
assemble all the components into a JPanel and make it visible.
updateStatus
protected void updateStatus()
- Updates the information on the current song.
setSongInfo
protected void setSongInfo(String title,
String author)
- Displays information about the current song. In this agent, this
does nothing, but subclasses might choose to override it.
sendYucky
protected void sendYucky()
getYucky
protected void getYucky()
getPlayer
protected IntelliCD getPlayer()
- Return the player
startJukebox
protected void startJukebox()
throws RemoteException
- Creates the jukebox interface. This is actually a separate
agent, documented elsewhere.
- See Also:
Jukebox
nextBestShow
protected void nextBestShow(boolean sh)
inform
public void inform(Secret secret)
throws RemoteException
- Handle notifications from IntelliCD.
- Specified by:
inform
in interface Button
songEvent
protected void songEvent(Secret secret,
SongChangeEvent e)
- Handle an incoming song change.
reactionEvent
protected void reactionEvent(ReactionEvent e)
- Handle an incoming event describing user reactions.
timerEvent
protected void timerEvent(TimerEvent e)
- Handle an incoming event updating the time left to play a song.
showNextBest
protected void showNextBest(int n)
toString
public String toString()
- Overrides:
toString
in class RemoteObject