com.webobjects.smil
Class WOSMILSwitch
java.lang.Object
|
+--com.webobjects.appserver.WOElement
|
+--com.webobjects.appserver.WOComponent
|
+--com.webobjects.smil.WOSMILElement
|
+--com.webobjects.smil.WOSMILSwitch
- All Implemented Interfaces:
- Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
- public class WOSMILSwitch
- extends WOSMILElement
WOSMILSwitch creates content for the SMIL "switch
" element. A "switch
"
element contains other elements
(typically media objects, synchronization elements, and layout elements) that should only appear
if certain client-side
synchonization element tests pass. This way, all available media element specifications are
delivered to the client and the client determines which media elements should be instantiated.
Example:
Imagine a situation where multiple movies available on a Web server, each encoded for
a different bit rate and you have a model and database in place that contains each movie and the
URL and bitrate encoding of the movie. A simple way to make sure that the client gets the movie of
the proper bit-rate is to create a WORepetition inside a WOSMILSwitch element.
In the repetition, place a WOSMILMediaObject and bind the element's href
to
aMovie.url
and bind the element's systemBitRate
to aMovie.bitRate
.
The client plays the movie whose systemBitRate
is no higher
than the rate the system can can handle.
Binding | SMIL attribute |
---|
elementID | id |
title | title |
otherTagString | use this binding to add custom attributes |
- See Also:
WOSMILSynchronizationElement
, Serialized Form
Method Summary |
void |
setTitle(String title)
Sets the value of the title binding. |
String |
title()
Returns the value of the title binding. |
Methods inherited from class com.webobjects.appserver.WOComponent |
appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath |
WOSMILSwitch
public WOSMILSwitch(WOContext context)
- Creates a WOSMILSwitch
- Parameters:
context
- context this component is created with
setTitle
public void setTitle(String title)
- Sets the value of the
title
binding.
- Parameters:
title
- value for the title
binding
title
public String title()
- Returns the value of the
title
binding.
- Returns:
- the value of the
title
binding
Copyright © 2003 Apple Computer, Inc.