• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IDanmakuIterator类的典型用法和代码示例

java 1次浏览

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

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

示例1: removeUnusedLiveDanmakusIn

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
protected synchronized void removeUnusedLiveDanmakusIn(int msec) {
    if (this.danmakuList != null && !this.danmakuList.isEmpty()) {
        long startTime = SystemClock.uptimeMillis();
        IDanmakuIterator it = this.danmakuList.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            boolean isTimeout = danmaku.isTimeOut();
            if (isTimeout && danmaku.isLive) {
                it.remove();
                onDanmakuRemoved(danmaku);
            }
            if (isTimeout) {
                if (SystemClock.uptimeMillis() - startTime > ((long) msec)) {
                    break;
                }
            }
            break;
        }
    }
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:21,
代码来源:DrawTask.java

示例2: loadDanmakus

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
protected void loadDanmakus(BaseDanmakuParser parser) {
    this.danmakuList = parser.setConfig(this.mContext).setDisplayer(this.mDisp).setTimer(this.mTimer).getDanmakus();
    if (!(this.danmakuList == null || this.danmakuList.isEmpty() || this.danmakuList.first().flags != null)) {
        IDanmakuIterator it = this.danmakuList.iterator();
        while (it.hasNext()) {
            BaseDanmaku item = it.next();
            if (item != null) {
                item.flags = this.mContext.mGlobalFlagValues;
            }
        }
    }
    this.mContext.mGlobalFlagValues.resetAll();
    if (this.danmakuList != null) {
        this.mLastDanmaku = this.danmakuList.last();
    }
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:17,
代码来源:DrawTask.java

示例3: removeTimeoutDanmakus

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例4: clearTimeOutCaches

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private void clearTimeOutCaches(long time) {
    IDanmakuIterator it = this.mCaches.iterator();
    while (it.hasNext() && !this.mEndFlag) {
        BaseDanmaku val = it.next();
        if (val.isTimeOut()) {
            synchronized (CacheManagingDrawTask.this.mDrawingNotify) {
                try {
                    CacheManagingDrawTask.this.mDrawingNotify.wait(30);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                    return;
                }
            }
            entryRemoved(false, val, null);
            it.remove();
        } else {
            return;
        }
    }
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:21,
代码来源:CacheManagingDrawTask.java

示例5: touchHitDanmaku

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例6: removeUnusedLiveDanmakusIn

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
protected synchronized void removeUnusedLiveDanmakusIn(int msec) {
    if (danmakuList == null || danmakuList.isEmpty() || mLiveDanmakus.isEmpty())
        return;
    long startTime = SystemClock.uptimeMillis();
    IDanmakuIterator it = mLiveDanmakus.iterator();
    while (it.hasNext()) {
        BaseDanmaku danmaku = it.next();
        boolean isTimeout = danmaku.isTimeOut();
        if (isTimeout) {
            it.remove();
            danmakuList.removeItem(danmaku);
            onDanmakuRemoved(danmaku);
        } else {
            break;
        }
        if (!isTimeout || SystemClock.uptimeMillis() - startTime > msec) {
            break;
        }
    }
}
 

开发者ID:lisnstatic,
项目名称:live_master,
代码行数:21,
代码来源:DrawTask.java

示例7: getVisibleDanmakusOnTime

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例8: loadDanmakus

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
protected void loadDanmakus(BaseDanmakuParser parser) {
    danmakuList = parser.setConfig(mContext).setDisplayer(mDisp).setTimer(mTimer).getDanmakus();
    if (danmakuList != null && !danmakuList.isEmpty()) {
        if (danmakuList.first().flags == null) {
            IDanmakuIterator it = danmakuList.iterator();
            while (it.hasNext()) {
                BaseDanmaku item = it.next();
                if (item != null) {
                    item.flags = mContext.mGlobalFlagValues;
                }
            }
        }
    }
    mContext.mGlobalFlagValues.resetAll();

    if(danmakuList != null) {
        mLastDanmaku = danmakuList.last();
    }
}
 

开发者ID:lisnstatic,
项目名称:live_master,
代码行数:20,
代码来源:DrawTask.java

示例9: removeTimeoutDanmakus

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例10: evictAllNotInScreen

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private void evictAllNotInScreen(boolean removeAllReferences) {
    if (mCaches != null) {
        IDanmakuIterator it = mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences = cache != null && cache.hasReferences();
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
                continue;
            }
            if (danmaku.hasDrawingCache() == false || danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
        // mCaches.clear();
    }
    mRealSize = 0;
}
 

开发者ID:lisnstatic,
项目名称:live_master,
代码行数:26,
代码来源:CacheManagingDrawTask.java

示例11: clearTimeOutCaches

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private void clearTimeOutCaches(long time) {
    IDanmakuIterator it = mCaches.iterator();
    while (it.hasNext() && !mEndFlag) {
        BaseDanmaku val = it.next();
        if (val.isTimeOut()) {
            synchronized (mDrawingNotify) {
                try {
                    mDrawingNotify.wait(30);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                    break;
                }
            }
            entryRemoved(false, val, null);
            it.remove();
        } else {
            break;
        }
    }
}
 

开发者ID:lisnstatic,
项目名称:live_master,
代码行数:21,
代码来源:CacheManagingDrawTask.java

示例12: touchHitDanmaku

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例13: evictAllNotInScreen

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private void evictAllNotInScreen(boolean removeAllReferences) {
    if (mCaches != null) {
        IDanmakuIterator it = mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences = cache != null && cache.hasReferences();
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
                continue;
            }
            if (danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
        // mCaches.clear();
    }
    mRealSize = 0;
}
 

开发者ID:amikey,
项目名称:DanmakuFlameMaster,
代码行数:26,
代码来源:CacheManagingDrawTask.java

示例14: removeUnusedLiveDanmakusIn

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
protected synchronized void removeUnusedLiveDanmakusIn(int msec) {
    if (danmakuList == null || danmakuList.isEmpty())
        return;
    long startTime = System.currentTimeMillis();
    IDanmakuIterator it = danmakuList.iterator();
    while (it.hasNext()) {
        BaseDanmaku danmaku = it.next();
        boolean isTimeout = danmaku.isTimeOut();
        if (isTimeout && danmaku.isLive) {
            it.remove();
            onDanmakuRemoved(danmaku);
        }
        if (!isTimeout || System.currentTimeMillis() - startTime > msec) {
            break;
        }
    }
}
 

开发者ID:liucloo,
项目名称:ijkPlayer-Danmaku,
代码行数:18,
代码来源:DrawTask.java

示例15: getVisibleDanmakusOnTime

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例16: removeTimeoutDanmakus

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例17: evictAllNotInScreen

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private synchronized void evictAllNotInScreen(boolean removeAllReferences) {
    if (mCaches != null) {
        IDanmakuIterator it = mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences = cache != null && cache.hasReferences();
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
                continue;
            }
            if (danmaku.hasDrawingCache() == false || danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
        // mCaches.clear();
    }
    mRealSize = 0;
}
 

开发者ID:jiangerji,
项目名称:danmaku-project,
代码行数:26,
代码来源:CacheManagingDrawTask.java

示例18: clearTimeOutCaches

点赞 3

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private synchronized void clearTimeOutCaches(long time) {
    IDanmakuIterator it = mCaches.iterator();
    while (it.hasNext()) {
        BaseDanmaku val = it.next();
        if (val.isTimeOut(time)) {
            try {
                synchronized (mDrawingNotify) {
                    mDrawingNotify.wait(20);
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            entryRemoved(false, val, null);
            it.remove();
        }else{
            break;
        }
    }
}
 

开发者ID:jiangerji,
项目名称:danmaku-project,
代码行数:20,
代码来源:CacheManagingDrawTask.java

示例19: removeAllLiveDanmakus

点赞 2

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
public synchronized void removeAllLiveDanmakus() {
    if (!(this.danmakus == null || this.danmakus.isEmpty())) {
        synchronized (this.danmakus) {
            IDanmakuIterator it = this.danmakus.iterator();
            while (it.hasNext()) {
                BaseDanmaku danmaku = it.next();
                if (danmaku.isLive) {
                    it.remove();
                    onDanmakuRemoved(danmaku);
                }
            }
        }
    }
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:15,
代码来源:DrawTask.java

示例20: getVisibleDanmakusOnTime

点赞 2

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的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

示例21: evictAll

点赞 2

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private void evictAll() {
    if (this.mCaches != null) {
        IDanmakuIterator it = this.mCaches.iterator();
        while (it.hasNext()) {
            entryRemoved(true, it.next(), null);
        }
        this.mCaches.clear();
    }
    this.mRealSize = 0;
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:11,
代码来源:CacheManagingDrawTask.java

示例22: evictAllNotInScreen

点赞 2

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
private void evictAllNotInScreen(boolean removeAllReferences) {
    if (this.mCaches != null) {
        IDanmakuIterator it = this.mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences;
            if (cache == null || !cache.hasReferences()) {
                hasReferences = false;
            } else {
                hasReferences = true;
            }
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    this.mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
            } else if (!danmaku.hasDrawingCache() || danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
    }
    this.mRealSize = 0;
}
 

开发者ID:JackChan1999,
项目名称:letv,
代码行数:28,
代码来源:CacheManagingDrawTask.java

示例23: removeAllLiveDanmakus

点赞 2

import master.flame.danmaku.danmaku.model.IDanmakuIterator; //导入依赖的package包/类
@Override
public synchronized void removeAllLiveDanmakus() {
    if (danmakus == null || danmakus.isEmpty())
        return;
    synchronized (danmakus) {
        IDanmakuIterator it = danmakus.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            if (danmaku.isLive) {
                it.remove();
                onDanmakuRemoved(danmaku);
            }
        }
    }
}
 

开发者ID:lisnstatic,
项目名称:live_master,
代码行数:16,
代码来源:DrawTask.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)