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


Java IDanmakus类代码示例

本文整理汇总了Java中master.flame.danmaku.danmaku.model.IDanmakus的典型用法代码示例。如果您正苦于以下问题:Java IDanmakus类的具体用法?Java IDanmakus怎么用?Java IDanmakus使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IDanmakus类属于master.flame.danmaku.danmaku.model包,在下文中一共展示了IDanmakus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeTimeoutDanmakus

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
private final void removeTimeoutDanmakus(IDanmakus danmakus, long limitTime) {
    IDanmakuIterator it = danmakus.iterator();
    long startTime = SystemClock.uptimeMillis();
    while (it.hasNext()) {
        try {
            if (it.next().isTimeOut()) {
                it.remove();
                if (SystemClock.uptimeMillis() - startTime > limitTime) {
                    return;
                }
            }
            return;
        } catch (Exception e) {
            return;
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:18,代码来源:DanmakuFilters.java

示例2: onTouchEvent

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public boolean onTouchEvent(MotionEvent event) {
    switch (event.getAction()) {
        case 1:
            IDanmakus clickDanmakus = touchHitDanmaku(event.getX(), event.getY());
            BaseDanmaku newestDanmaku = null;
            if (!(clickDanmakus == null || clickDanmakus.isEmpty())) {
                performClick(clickDanmakus);
                newestDanmaku = fetchLatestOne(clickDanmakus);
            }
            if (newestDanmaku != null) {
                performClickWithlatest(newestDanmaku);
                break;
            }
            break;
    }
    return false;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:18,代码来源:DanmakuTouchHelper.java

示例3: touchHitDanmaku

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public IDanmakus touchHitDanmaku(float x, float y) {
    IDanmakus hitDanmakus = new Danmakus();
    this.mDanmakuBounds.setEmpty();
    IDanmakus danmakus = this.danmakuView.getCurrentVisibleDanmakus();
    if (danmakus != null && !danmakus.isEmpty()) {
        IDanmakuIterator iterator = danmakus.iterator();
        while (iterator.hasNext()) {
            BaseDanmaku danmaku = iterator.next();
            if (danmaku != null) {
                this.mDanmakuBounds.set(danmaku.getLeft(), danmaku.getTop() - 30.0f, danmaku.getRight(), danmaku.getBottom() + 30.0f);
                if (this.mDanmakuBounds.contains(x, y)) {
                    danmaku.clickX = x;
                    danmaku.clickY = y;
                    danmaku.setRectF(this.mDanmakuBounds);
                    hitDanmakus.addItem(danmaku);
                    break;
                }
            }
        }
    }
    return hitDanmakus;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:23,代码来源:DanmakuTouchHelper.java

示例4: getVisibleDanmakusOnTime

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
@Override
public IDanmakus getVisibleDanmakusOnTime(long time) {
    long beginMills = time - mContext.mDanmakuFactory.MAX_DANMAKU_DURATION - 100;
    long endMills = time + mContext.mDanmakuFactory.MAX_DANMAKU_DURATION;
    IDanmakus subDanmakus = danmakuList.subnew(beginMills, endMills);
    IDanmakus visibleDanmakus = new Danmakus();
    if (null != subDanmakus && !subDanmakus.isEmpty()) {
        IDanmakuIterator iterator = subDanmakus.iterator();
        while (iterator.hasNext()) {
            BaseDanmaku danmaku = iterator.next();
            if (danmaku.isShown() && !danmaku.isOutside()) {
                visibleDanmakus.addItem(danmaku);
            }
        }
    }

    return visibleDanmakus;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:19,代码来源:DrawTask.java

示例5: removeTimeoutDanmakus

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
private final void removeTimeoutDanmakus(final IDanmakus danmakus, long limitTime) {
    IDanmakuIterator it = danmakus.iterator();
    long startTime = SystemClock.uptimeMillis();
    while (it.hasNext()) {
        try {
            BaseDanmaku item = it.next();
            if (item.isTimeOut()) {
                it.remove();
            } else {
                break;
            }
        } catch (Exception e) {
            break;
        }
        if (SystemClock.uptimeMillis() - startTime > limitTime) {
            break;
        }
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:20,代码来源:DanmakuFilters.java

示例6: touchHitDanmaku

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
private IDanmakus touchHitDanmaku(float x, float y) {
    IDanmakus hitDanmakus = new Danmakus();
    mDanmakuBounds.setEmpty();

    IDanmakus danmakus = danmakuView.getCurrentVisibleDanmakus();
    if (null != danmakus && !danmakus.isEmpty()) {
        IDanmakuIterator iterator = danmakus.iterator();
        while (iterator.hasNext()) {
            BaseDanmaku danmaku = iterator.next();
            if (null != danmaku) {
                mDanmakuBounds.set(danmaku.getLeft(), danmaku.getTop(), danmaku.getRight(), danmaku.getBottom());
                if (mDanmakuBounds.contains(x, y)) {
                    hitDanmakus.addItem(danmaku);
                }
            }
        }
    }

    return hitDanmakus;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:21,代码来源:DanmakuTouchHelper.java

示例7: onTouchEvent

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public boolean onTouchEvent(MotionEvent event) {
    switch (event.getAction()) {
        case MotionEvent.ACTION_UP:
            IDanmakus clickDanmakus = touchHitDanmaku(event.getX(), event.getY());
            BaseDanmaku newestDanmaku = null;
            if (null != clickDanmakus && !clickDanmakus.isEmpty()) {
                performClick(clickDanmakus);
                newestDanmaku = fetchLatestOne(clickDanmakus);
            }

            if (null != newestDanmaku) {
                performClickWithlatest(newestDanmaku);
            }
            break;
        default:
            break;
    }

    return false;
}
 
开发者ID:amikey,项目名称:DanmakuFlameMaster,代码行数:21,代码来源:DanmakuTouchHelper.java

示例8: getVisibleDanmakusOnTime

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
@Override
public IDanmakus getVisibleDanmakusOnTime(long time) {
    long beginMills = time - mContext.mDanmakuFactory.MAX_DANMAKU_DURATION - 100;
    long endMills = time + mContext.mDanmakuFactory.MAX_DANMAKU_DURATION;
    IDanmakus subDanmakus = danmakuList.sub(beginMills, endMills);
    IDanmakus visibleDanmakus = new Danmakus();
    if (null != subDanmakus && !subDanmakus.isEmpty()) {
        IDanmakuIterator iterator = subDanmakus.iterator();
        while (iterator.hasNext()) {
            BaseDanmaku danmaku = iterator.next();
            if (danmaku.isShown() && !danmaku.isOutside()) {
                visibleDanmakus.addItem(danmaku);
            }
        }
    }

    return visibleDanmakus;
}
 
开发者ID:liucloo,项目名称:ijkPlayer-Danmaku,代码行数:19,代码来源:DrawTask.java

示例9: removeTimeoutDanmakus

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
private final void removeTimeoutDanmakus(final IDanmakus danmakus, long limitTime) {
    IDanmakuIterator it = danmakus.iterator();
    long startTime = System.currentTimeMillis();
    while (it.hasNext()) {
        try {
            BaseDanmaku item = it.next();
            if (item.isTimeOut()) {
                it.remove();
            } else {
                break;
            }
        } catch (Exception e) {
            break;
        }
        if (System.currentTimeMillis() - startTime > limitTime) {
            break;
        }
    }
}
 
开发者ID:liucloo,项目名称:ijkPlayer-Danmaku,代码行数:20,代码来源:DanmakuFilters.java

示例10: parse

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
@Override
protected IDanmakus parse() {
    if (mDataSource != null && mDataSource instanceof JsonStrSource) {
        JsonStrSource jsonSource = (JsonStrSource) mDataSource;
        return _doParse(jsonSource.data());
    }
    return new Danmakus();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:DanmakuParser.java

示例11: getVisibleDanmakusOnTime

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public IDanmakus getVisibleDanmakusOnTime(long time) {
    IDanmakus subDanmakus = this.danmakuList.subnew((time - this.mContext.mDanmakuFactory.MAX_DANMAKU_DURATION) - 100, time + this.mContext.mDanmakuFactory.MAX_DANMAKU_DURATION);
    IDanmakus visibleDanmakus = new Danmakus();
    if (!(subDanmakus == null || subDanmakus.isEmpty())) {
        IDanmakuIterator iterator = subDanmakus.iterator();
        while (iterator.hasNext()) {
            BaseDanmaku danmaku = iterator.next();
            if (danmaku.isShown() && !danmaku.isOutside()) {
                visibleDanmakus.addItem(danmaku);
            }
        }
    }
    return visibleDanmakus;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:15,代码来源:DrawTask.java

示例12: getDanmakus

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public IDanmakus getDanmakus() {
    if (this.mDanmakus != null) {
        return this.mDanmakus;
    }
    this.mContext.mDanmakuFactory.resetDurationsData();
    this.mDanmakus = parse();
    releaseDataSource();
    this.mContext.mDanmakuFactory.updateMaxDanmakuDuration();
    return this.mDanmakus;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:BaseDanmakuParser.java

示例13: subnew

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public IDanmakus subnew(long startTime, long endTime) {
    Collection<BaseDanmaku> subset = subset(startTime, endTime);
    if (subset == null || subset.isEmpty()) {
        return null;
    }
    return new Danmakus(new ArrayList(subset));
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:8,代码来源:Danmakus.java

示例14: sub

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public IDanmakus sub(long startTime, long endTime) {
    if (this.items == null || this.items.size() == 0) {
        return null;
    }
    if (this.subItems == null) {
        if (this.mSortType == 4) {
            this.subItems = new Danmakus(4);
            this.subItems.setItems(this.items);
        } else {
            this.subItems = new Danmakus(this.mDuplicateMergingEnabled);
        }
    }
    if (this.mSortType == 4) {
        return this.subItems;
    }
    if (this.startItem == null) {
        this.startItem = createItem(JarConstant.PLUGIN_WINDOW_PLAYER_STATIC_METHOD_NAME_START);
    }
    if (this.endItem == null) {
        this.endItem = createItem("end");
    }
    if (this.subItems != null && startTime - this.startItem.time >= 0 && endTime <= this.endItem.time) {
        return this.subItems;
    }
    this.startItem.time = startTime;
    this.endItem.time = endTime;
    this.subItems.setItems(((SortedSet) this.items).subSet(this.startItem, this.endItem));
    return this.subItems;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:30,代码来源:Danmakus.java

示例15: getCurrentVisibleDanmakus

import master.flame.danmaku.danmaku.model.IDanmakus; //导入依赖的package包/类
public IDanmakus getCurrentVisibleDanmakus() {
    if (drawTask != null) {
        return drawTask.getVisibleDanmakusOnTime(getCurrentTime());
    }

    return null;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:8,代码来源:DrawHandler.java


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