本文整理汇总了Java中org.w3c.dom.smil.ElementTime类的典型用法代码示例。如果您正苦于以下问题:Java ElementTime类的具体用法?Java ElementTime怎么用?Java ElementTime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ElementTime类属于org.w3c.dom.smil包,在下文中一共展示了ElementTime类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getImplicitDuration
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public float getImplicitDuration() {
float dur = -1.0F;
if (ENDSYNC_LAST.equals(getEndSync())) {
NodeList children = getTimeChildren();
for (int i = 0; i < children.getLength(); ++i) {
ElementTime child = (ElementTime) children.item(i);
TimeList endTimeList = child.getEnd();
for (int j = 0; j < endTimeList.getLength(); ++j) {
Time endTime = endTimeList.item(j);
if (endTime.getTimeType() == Time.SMIL_TIME_INDEFINITE) {
// Return "indefinite" here.
return -1.0F;
}
if (endTime.getResolved()) {
float end = (float)endTime.getResolvedOffset();
dur = (end > dur) ? end : dur;
}
}
}
} // Other endsync types are not supported now.
return dur;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:24,代码来源:ElementParallelTimeContainerImpl.java
示例2: seekActiveMedia
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
private synchronized void seekActiveMedia() {
for (int i = mActiveElements.size() - 1; i >= 0; i--) {
ElementTime element = mActiveElements.get(i);
if (element instanceof SmilParElementImpl) {
return;
}
double offset = getOffsetTime(element);
if ((offset >= 0) && (offset <= mCurrentTime)) {
if (LOCAL_LOGV) {
Log.v(TAG, "[SEEK] " + " at " + mCurrentTime
+ " " + element);
}
element.seekElement( (float) (mCurrentTime - offset) );
}
}
}
开发者ID:slvn,项目名称:android-aosp-mms,代码行数:17,代码来源:SmilPlayer.java
示例3: getFillDefault
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public short getFillDefault() {
String fillDefault = mSmilElement.getAttribute(FILLDEFAULT_ATTRIBUTE_NAME);
if (fillDefault.equalsIgnoreCase(FILL_REMOVE_ATTRIBUTE)) {
return FILL_REMOVE;
} else if (fillDefault.equalsIgnoreCase(FILL_FREEZE_ATTRIBUTE)) {
return FILL_FREEZE;
} else if (fillDefault.equalsIgnoreCase(FILL_AUTO_ATTRIBUTE)) {
return FILL_AUTO;
} else if (fillDefault.equalsIgnoreCase(FILL_HOLD_ATTRIBUTE)) {
// FIXME handle it as freeze for now
return FILL_FREEZE;
} else if (fillDefault.equalsIgnoreCase(FILL_TRANSITION_ATTRIBUTE)) {
// FIXME handle it as freeze for now
return FILL_FREEZE;
} else {
/*
* fillDefault = inherit
* Specifies that the value of this attribute (and of the fill behavior) are
* inherited from the fillDefault value of the parent element.
* This is the default value.
*/
ElementTime parent = getParentElementTime();
if (parent == null) {
/*
* fillDefault = auto
* If there is no parent element, the value is "auto".
*/
return FILL_AUTO;
} else {
return ((ElementTimeImpl) parent).getFillDefault();
}
}
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:34,代码来源:ElementTimeImpl.java
示例4: getActiveChildrenAt
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public NodeList getActiveChildrenAt(float instant) {
NodeList allChildren = this.getTimeChildren();
ArrayList<Node> nodes = new ArrayList<Node>();
for (int i = 0; i < allChildren.getLength(); i++) {
instant -= ((ElementTime) allChildren.item(i)).getDur();
if (instant < 0) {
nodes.add(allChildren.item(i));
return new NodeListImpl(nodes);
}
}
return new NodeListImpl(nodes);
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:13,代码来源:ElementSequentialTimeContainerImpl.java
示例5: getDur
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public float getDur() {
float dur = super.getDur();
if (dur == 0) {
NodeList children = getTimeChildren();
for (int i = 0; i < children.getLength(); ++i) {
ElementTime child = (ElementTime) children.item(i);
if (child.getDur() < 0) {
// Return "indefinite" since containing a child whose duration is indefinite.
return -1.0F;
}
dur += child.getDur();
}
}
return dur;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:16,代码来源:ElementSequentialTimeContainerImpl.java
示例6: init
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public synchronized void init(ElementTime root) {
mRoot = root;
mAllEntries = getTimeline(mRoot, 0, Long.MAX_VALUE);
mMediaTimeUpdatedEvent = ((DocumentEvent) mRoot).createEvent("Event");
mMediaTimeUpdatedEvent.initEvent(MEDIA_TIME_UPDATED_EVENT, false, false);
mActiveElements = new ArrayList<>();
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:8,代码来源:SmilPlayer.java
示例7: getOffsetTime
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
private synchronized double getOffsetTime(ElementTime element) {
for (int i = mCurrentSlide; i < mCurrentElement; i++) {
TimelineEntry entry = mAllEntries.get(i);
if (element.equals(entry.getElement())) {
return entry.getOffsetTime() * 1000; // in ms
}
}
return -1;
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:10,代码来源:SmilPlayer.java
示例8: seekActiveMedia
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
private synchronized void seekActiveMedia() {
for (int i = mActiveElements.size() - 1; i >= 0; i--) {
ElementTime element = mActiveElements.get(i);
if (element instanceof SmilParElementImpl) {
return;
}
double offset = getOffsetTime(element);
if ((offset >= 0) && (offset <= mCurrentTime)) {
if (LOCAL_LOGV) Log.v(TAG, "[SEEK] " + " at " + mCurrentTime
+ " " + element);
element.seekElement( (float) (mCurrentTime - offset) );
}
}
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:15,代码来源:SmilPlayer.java
示例9: endActiveElements
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
private synchronized void endActiveElements() {
for (int i = mActiveElements.size() - 1; i >= 0; i--) {
ElementTime element = mActiveElements.get(i);
if (LOCAL_LOGV) Log.v(TAG, "[STOP] " + " at " + mCurrentTime + " " + element);
element.endElement();
}
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:8,代码来源:SmilPlayer.java
示例10: pauseActiveElements
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
private synchronized void pauseActiveElements() {
for (int i = mActiveElements.size() - 1; i >= 0; i--) {
ElementTime element = mActiveElements.get(i);
if (LOCAL_LOGV) Log.v(TAG, "[PAUSE] " + " at " + mCurrentTime + " " + element);
element.pauseElement();
}
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:8,代码来源:SmilPlayer.java
示例11: resumeActiveElements
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
private synchronized void resumeActiveElements() {
int size = mActiveElements.size();
for (int i = 0; i < size; i++) {
ElementTime element = mActiveElements.get(i);
if (LOCAL_LOGV) Log.v(TAG, "[RESUME] " + " at " + mCurrentTime + " " + element);
element.resumeElement();
}
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:9,代码来源:SmilPlayer.java
示例12: getFillDefault
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public short getFillDefault() {
String fillDefault = mSmilElement.getAttribute(FILLDEFAULT_ATTRIBUTE_NAME);
if (fillDefault.equalsIgnoreCase(FILL_REMOVE_ATTRIBUTE)) {
return FILL_REMOVE;
} else if (fillDefault.equalsIgnoreCase(FILL_FREEZE_ATTRIBUTE)) {
return FILL_FREEZE;
} else if (fillDefault.equalsIgnoreCase(FILL_AUTO_ATTRIBUTE)) {
return FILL_AUTO;
} else if (fillDefault.equalsIgnoreCase(FILL_HOLD_ATTRIBUTE)) {
// FIXME handle it as freeze for now
return FILL_FREEZE;
} else if (fillDefault.equalsIgnoreCase(FILL_TRANSITION_ATTRIBUTE)) {
// FIXME handle it as freeze for now
return FILL_FREEZE;
} else {
/*
* fillDefault = inherit
* Specifies that the value of this attribute (and of the fill behavior) are
* inherited from the fillDefault value of the parent element.
* This is the default value.
*/
ElementTime parent = getParentElementTime();
if (parent == null) {
/*
* fillDefault = auto
* If there is no parent element, the value is "auto".
*/
return FILL_AUTO;
} else {
return parent.getFillDefault();
}
}
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:34,代码来源:ElementTimeImpl.java
示例13: handleEvent
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public void handleEvent(Event evt) {
if (evt.getType().equals(SmilParElementImpl.SMIL_SLIDE_START_EVENT)) {
if (LOCAL_LOGV) {
Log.v(TAG, "Start to play slide: " + this);
}
mVisible = true;
} else if (mFill != ElementTime.FILL_FREEZE) {
if (LOCAL_LOGV) {
Log.v(TAG, "Stop playing slide: " + this);
}
mVisible = false;
}
notifyModelChanged(false);
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:16,代码来源:SlideModel.java
示例14: handleEvent
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public void handleEvent(Event evt) {
if (evt.getType().equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
mVisible = true;
} else if (mFill != ElementTime.FILL_FREEZE) {
mVisible = false;
}
notifyModelChanged(false);
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:10,代码来源:TextModel.java
示例15: handleEvent
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
@Override
public void handleEvent(Event evt) {
if (evt.getType().equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
mVisible = true;
} else if (mFill != ElementTime.FILL_FREEZE) {
mVisible = false;
}
notifyModelChanged(false);
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:11,代码来源:ImageModel.java
示例16: handleEvent
import org.w3c.dom.smil.ElementTime; //导入依赖的package包/类
public void handleEvent(Event evt) {
String evtType = evt.getType();
if (LOCAL_LOGV || Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
Log.v(TAG, "[VideoModel] handleEvent " + evt.getType() + " on " + this);
}
MediaAction action = MediaAction.NO_ACTIVE_ACTION;
if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
action = MediaAction.START;
// if the Music player app is playing audio, we should pause that so it won't
// interfere with us playing video here.
pauseMusicPlayer();
mVisible = true;
} else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_END_EVENT)) {
action = MediaAction.STOP;
if (mFill != ElementTime.FILL_FREEZE) {
mVisible = false;
}
} else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_PAUSE_EVENT)) {
action = MediaAction.PAUSE;
mVisible = true;
} else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_SEEK_EVENT)) {
action = MediaAction.SEEK;
mSeekTo = ((EventImpl) evt).getSeekTo();
mVisible = true;
}
appendAction(action);
notifyModelChanged(false);
}
开发者ID:moezbhatti,项目名称:qksms,代码行数:33,代码来源:VideoModel.java
注:本文中的org.w3c.dom.smil.ElementTime类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论