com.mamarce.mhp.mf.examples.slideshow
Class SlideContrainer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by org.havi.ui.HContainer
              extended by com.mamarce.mhp.mf.components.MContainer
                  extended by com.mamarce.mhp.mf.examples.slideshow.SlideContrainer
All Implemented Interfaces:
MListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.tv.util.TVTimerWentOffListener, org.dvb.ui.TestOpacity, org.havi.ui.HComponentOrdering, org.havi.ui.HMatteLayer

public class SlideContrainer
extends MContainer
implements MListener, javax.tv.util.TVTimerWentOffListener

Overrides MContainer, manages some informations stored in configuration file. It displays images, taken from a folder specified in configuration file with one of these rules:

Images can be seen or in a slideshow or can be displayed by the pressure of LEFT, RIGHT, TOP, OK remote controll keys.

Version:
1.0
Author:
Marco Frattallone
See Also:
Serialized Form

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
SlideContrainer(int quantum, java.lang.String[] list)
          Returns an instance for this object, a Slidecontaienr is graphic component as it is a MContainer and is also a MListener.
 
Method Summary
 void manageEvent(java.awt.event.KeyEvent event)
          Manages events.
 void timerWentOff(javax.tv.util.TVTimerWentOffEvent e)
          This method is called every time the quantum parameter is elapsed.
 
Methods inherited from class com.mamarce.mhp.mf.components.MContainer
activate, paint, passivate, setBackgroundColor
 
Methods inherited from class org.havi.ui.HContainer
addAfter, addBefore, getMatte, group, isDoubleBuffered, isGrouped, isOpaque, pop, popInFrontOf, popToFront, push, pushBehind, pushToBack, setMatte, ungroup
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, 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, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, 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, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SlideContrainer

public SlideContrainer(int quantum,
                       java.lang.String[] list)
Returns an instance for this object, a Slidecontaienr is graphic component as it is a MContainer and is also a MListener. When is created, SlideContainer set his current state.
Possible states are:
Default value is STATUS_PAUSE.
quantum parameter set a Timer that it's started by the pressure of OK key.
list parameter represents path and image names for the images to display.
(reset presentation)
UP
LEFT OK RIGHT
(previous image) (play/pause slideshow) (next image)

Parameters:
quantum - unit of time for the Timer, expressed in milliseconds.
list - string image names to display.
Method Detail

manageEvent

public void manageEvent(java.awt.event.KeyEvent event)
Manages events.

Specified by:
manageEvent in interface MListener
Parameters:
event - keyEvent.

timerWentOff

public void timerWentOff(javax.tv.util.TVTimerWentOffEvent e)
This method is called every time the quantum parameter is elapsed.

Specified by:
timerWentOff in interface javax.tv.util.TVTimerWentOffListener