本文整理汇总了Java中org.w3c.dom.smil.SMILRegionMediaElement类的典型用法代码示例。如果您正苦于以下问题:Java SMILRegionMediaElement类的具体用法?Java SMILRegionMediaElement怎么用?Java SMILRegionMediaElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SMILRegionMediaElement类属于org.w3c.dom.smil包,在下文中一共展示了SMILRegionMediaElement类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMediaModel
import org.w3c.dom.smil.SMILRegionMediaElement; //导入依赖的package包/类
/**
* Returns the media model for the given SMILMediaElement in the PduBody.
*
* @param context Context
* @param sme The SMILMediaElement to find
* @param srcs String array of sources
* @param layouts LayoutModel
* @param pb PduBuddy
* @return MediaModel
* @throws IOException
* @throws IllegalArgumentException
* @throws MmsException
*/
public static MediaModel getMediaModel(Context context, SMILMediaElement sme,
ArrayList<String> srcs, LayoutModel layouts,
PduBody pb)
throws IOException, IllegalArgumentException, MmsException {
String tag = sme.getTagName();
String src = sme.getSrc();
PduPart part = findPart(context, pb, src, srcs);
if (sme instanceof SMILRegionMediaElement) {
return getRegionMediaModel(
context, tag, src, (SMILRegionMediaElement) sme, layouts, part);
} else {
return getGenericMediaModel(
context, tag, src, sme, part, null);
}
}
示例2: createSmilDocument
import org.w3c.dom.smil.SMILRegionMediaElement; //导入依赖的package包/类
private static SMILDocument createSmilDocument(PduBody body) {
Log.w(TAG, "Creating SMIL document from PduBody.");
SMILDocument document = new SmilDocumentImpl();
SMILElement smilElement = (SMILElement) document.createElement("smil");
document.appendChild(smilElement);
SMILElement headElement = (SMILElement) document.createElement("head");
smilElement.appendChild(headElement);
SMILLayoutElement layoutElement = (SMILLayoutElement) document.createElement("layout");
headElement.appendChild(layoutElement);
SMILRootLayoutElement rootLayoutElement = (SMILRootLayoutElement) document.createElement("root-layout");
rootLayoutElement.setWidth(ROOT_WIDTH);
rootLayoutElement.setHeight(ROOT_HEIGHT);
layoutElement.appendChild(rootLayoutElement);
SMILElement bodyElement = (SMILElement) document.createElement("body");
smilElement.appendChild(bodyElement);
SMILParElement par = (SMILParElement) document.createElement("par");
bodyElement.appendChild(par);
for (int i=0; i<body.getPartsNum(); i++) {
PduPart part = body.getPart(i);
SMILRegionElement regionElement = getRegion(document, part);
SMILMediaElement mediaElement = getMediaElement(document, part);
if (regionElement != null) {
((SMILRegionMediaElement)mediaElement).setRegion(regionElement);
layoutElement.appendChild(regionElement);
}
par.appendChild(mediaElement);
}
return document;
}
示例3: createSmilDocument
import org.w3c.dom.smil.SMILRegionMediaElement; //导入依赖的package包/类
public static SMILDocument createSmilDocument(SlideDeck deck) {
Log.w(TAG, "Creating SMIL document from SlideDeck.");
SMILDocument document = new SmilDocumentImpl();
SMILElement smilElement = (SMILElement) document.createElement("smil");
document.appendChild(smilElement);
SMILElement headElement = (SMILElement) document.createElement("head");
smilElement.appendChild(headElement);
SMILLayoutElement layoutElement = (SMILLayoutElement) document.createElement("layout");
headElement.appendChild(layoutElement);
SMILRootLayoutElement rootLayoutElement = (SMILRootLayoutElement) document.createElement("root-layout");
rootLayoutElement.setWidth(ROOT_WIDTH);
rootLayoutElement.setHeight(ROOT_HEIGHT);
layoutElement.appendChild(rootLayoutElement);
SMILElement bodyElement = (SMILElement) document.createElement("body");
smilElement.appendChild(bodyElement);
SMILParElement par = (SMILParElement) document.createElement("par");
bodyElement.appendChild(par);
for (Slide slide : deck.getSlides()) {
SMILRegionElement regionElement = slide.getSmilRegion(document);
SMILMediaElement mediaElement = slide.getMediaElement(document);
if (regionElement != null) {
((SMILRegionMediaElement)mediaElement).setRegion(regionElement);
layoutElement.appendChild(regionElement);
}
par.appendChild(mediaElement);
}
return document;
}
示例4: setRegion
import org.w3c.dom.smil.SMILRegionMediaElement; //导入依赖的package包/类
private static boolean setRegion(SMILRegionMediaElement srme,
ArrayList<SMILRegionElement> smilRegions,
SMILLayoutElement smilLayout,
String regionId,
boolean regionPresentInLayout) {
SMILRegionElement smilRegion = findRegionElementById(smilRegions, regionId);
if (!regionPresentInLayout && smilRegion != null) {
srme.setRegion(smilRegion);
smilLayout.appendChild(smilRegion);
return true;
}
return false;
}
示例5: getMediaModel
import org.w3c.dom.smil.SMILRegionMediaElement; //导入依赖的package包/类
public static MediaModel getMediaModel(Context context,
SMILMediaElement sme, LayoutModel layouts, PduBody pb)
throws IOException, IllegalArgumentException, MmsException {
String tag = sme.getTagName();
String src = sme.getSrc();
PduPart part = findPart(pb, src);
if (sme instanceof SMILRegionMediaElement) {
return getRegionMediaModel(
context, tag, src, (SMILRegionMediaElement) sme, layouts, part);
} else {
return getGenericMediaModel(
context, tag, src, sme, part, null);
}
}