当前位置: 首页>>代码示例>>Java>>正文


Java SMILRegionMediaElement类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:33,代码来源:MediaModelFactory.java

示例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;
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:40,代码来源:SmilUtil.java

示例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;
}
 
开发者ID:redcracker,项目名称:TextSecure,代码行数:39,代码来源:SmilUtil.java

示例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;
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:14,代码来源:SmilHelper.java

示例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);
    }
}
 
开发者ID:slvn,项目名称:android-aosp-mms,代码行数:16,代码来源:MediaModelFactory.java


注:本文中的org.w3c.dom.smil.SMILRegionMediaElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。