|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
org.gicentre.utils.multisketch.SlideShow
public class SlideShow
Class for showing a sequence of Processing sketches. Can be used to construct 'powerpoint'
type presentations that contain an arbitrary set of sketches. See also the Slide
class for showing simple text screens as part of a slide show. Progress through the slide show
is controlled with the PageUp ad PageDown keys.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.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 | |
---|---|
SlideShow(processing.core.PApplet parent)
Initialises the slideshow. |
Method Summary | |
---|---|
void |
addCountdownTimer(int startTime,
processing.core.PFont timerFont)
Adds a countdown timer displayed using the given font and default size and colour to the slide show. |
void |
addCountdownTimer(int startTime,
processing.core.PFont timerFont,
int timerFontSize,
int timerFontColour)
Adds a countdown timer displayed using the given font characteristics to the slide show. |
void |
addSketch(EmbeddedSketch sketch)
Adds the given sketch to the slide show. |
void |
addSketch(EmbeddedSketch sketch,
int offset)
Adds the given sketch to the slide show with the given offset from the top of the slide. |
void |
addSlide(Slide slide)
Adds the given slide to the slide show. |
void |
addTimer(processing.core.PFont timerFont)
Adds a timer to the slide show displayed with the given font but default colour and size. |
void |
addTimer(processing.core.PFont timerFont,
int timerFontSize,
int timerFontColour)
Adds a timer to the slide show displayed using the given font characteristics. |
void |
displayTime(EmbeddedSketch sketch,
processing.core.PFont timerFont)
Displays the time since addTimer() was last called in the top-right corner of the
given sketch. |
void |
keyEvent(java.awt.event.KeyEvent e)
Deprecated. This version is for Processing 1.x only as it relies on the AWT event handling model. |
void |
keyEvent(processing.event.KeyEvent e)
Controls sequence though slide show with the keys that have been allocated for advancing and retreating through slides. |
void |
setAdvanceKey(int advanceKey)
Sets the key that advances the slideshow by one slide. |
void |
setCurrentSlide(int slideNumber)
Sets the currently displayed slide to the given one. |
void |
setRetreatKey(int retreatKey)
Sets the key that sends the slideshow back by one slide. |
void |
startShow()
Starts the slide show from the first slide. |
void |
startShow(int slideNum)
Starts the slide show from the given slide. |
Methods inherited from class java.awt.Panel |
---|
addNotify, getAccessibleContext |
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, paint, 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, 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, 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, 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SlideShow(processing.core.PApplet parent)
parent
- Parent sketch containing the slideshow.Method Detail |
---|
public void addSketch(EmbeddedSketch sketch)
sketch
- Sketch to add to the slide show.public void addSketch(EmbeddedSketch sketch, int offset)
sketch
- Sketch to add to the slide show.offset
- Offset from top of slide in pixels.public void addSlide(Slide slide)
slide
- Slide to add to the slide show.public void addTimer(processing.core.PFont timerFont)
displayTime()
from the draw()
method of the
embedded sketch.
timerFont
- Font used to display timer.public void addTimer(processing.core.PFont timerFont, int timerFontSize, int timerFontColour)
displayTime()
from the draw()
method of the embedded sketch.
timerFont
- Font used to display timer.timerFontSize
- Size of font in pixels used to display timer.timerFontColour
- Colour of font used to display timer.public void addCountdownTimer(int startTime, processing.core.PFont timerFont)
displayTime()
from the draw()
method of the embedded sketch.
startTime
- Start time in seconds (e.g. to add a 2 minute countdown, this should be 120).timerFont
- Font used to display timer.public void addCountdownTimer(int startTime, processing.core.PFont timerFont, int timerFontSize, int timerFontColour)
displayTime()
from the draw()
method of the embedded sketch.
startTime
- Start time in seconds (e.g. to add a 2 minute countdown, this should be 120).timerFont
- Font used to display timer.timerFontSize
- Size of font in pixels used to display timer.timerFontColour
- Colour of font used to display timer.public void displayTime(EmbeddedSketch sketch, processing.core.PFont timerFont)
addTimer()
was last called in the top-right corner of the
given sketch. Nothing will be displayed if addTimer()
has not been called.
sketch
- Sketch in which to display the time.timerFont
- Font in which to display time.public void setCurrentSlide(int slideNumber)
slideNumber
- Number of slide to display.public void startShow()
public void startShow(int slideNum)
slideNum
- The number of the slide from which to start.public void setAdvanceKey(int advanceKey)
KeyEvent
codes. The default value is KeyEvent.VK_PAGE_DOWN
.
advanceKey
- Key code corresponding to the key that will advance each slide.public void setRetreatKey(int retreatKey)
KeyEvent
codes. The default value is KeyEvent.VK_PAGE_UP
.
retreatKey
- Key code corresponding to the key that will move back to the previous slide.public void keyEvent(java.awt.event.KeyEvent e)
e
- Key press event.public void keyEvent(processing.event.KeyEvent e)
e
- Key press event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |