edu.wisc.trace.upnptarget
Class SatelliteBoxApplet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by edu.wisc.trace.upnptarget.SatelliteBoxApplet
All Implemented Interfaces:
IDeviceListener, ImageObserver, MenuContainer, Serializable, Accessible

public class SatelliteBoxApplet
extends Applet
implements IDeviceListener

This class is an applet and creates SatelliteBox device. It is a demo applet that shows which method needs to be overridden for getting notification from device. The method names are : changePowerMode, changeChannel, jumpToPreviousChannel, setVolume, and mute.

Created on: 11/15/2007
Known bugs: None
Thread safe: Yes

Version:
$Revision: 1.12 $
Author:
Parikshit Thakur & Team, Trace R&D Center
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
SatelliteBoxApplet()
           
 
Method Summary
 SatelliteDevice getDevice()
          Returns Local SatelliteDevice Object
 void init()
          Creates SatelliteDevice Object from device description Throws exception is file does not exist Registers this applet(object) as listener to Satellite Device
 void load_image(String filename)
           
 void paint(Graphics g)
          Repaint the display.
 boolean setValue(String actionName, Map<String,String> paramMap)
          make relative changes on display according to the actionName and paramMap.
 void start()
          Creates Panels and Labels to display in applet and set the default values.
 void stop()
          Stops the Satellite Device
 void windowClosing(WindowEvent e)
          Switches off the Satellite Device and exits
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SatelliteBoxApplet

public SatelliteBoxApplet()
Method Detail

getDevice

public SatelliteDevice getDevice()
Returns Local SatelliteDevice Object

Returns:
SatelliteDevice

init

public void init()
Creates SatelliteDevice Object from device description Throws exception is file does not exist Registers this applet(object) as listener to Satellite Device

Overrides:
init in class Applet

start

public void start()
Creates Panels and Labels to display in applet and set the default values.

Overrides:
start in class Applet

stop

public void stop()
Stops the Satellite Device

Overrides:
stop in class Applet

paint

public void paint(Graphics g)
Repaint the display.

Overrides:
paint in class Container

windowClosing

public void windowClosing(WindowEvent e)
Switches off the Satellite Device and exits


setValue

public boolean setValue(String actionName,
                        Map<String,String> paramMap)
make relative changes on display according to the actionName and paramMap.

Specified by:
setValue in interface IDeviceListener
Parameters:
actionName - a String value of action name
paramMap - a Map that represent parameters and its value.
Returns:
true if successful else false

load_image

public void load_image(String filename)


Copyright © 2006 Trace R&D Center, University of Wisconsin-Madison. All Rights Reserved.