public void setStripValues(int stripNumber, Pixel[] pixels) { synchronized (stripLock) { if (strips == null) { doDeferredStripCreation(); } this.strips.get(stripNumber).setPixels(pixels); } }
/** @return the stripsAttached */ public int getNumberOfStrips() { synchronized (stripLock) { if (strips == null) { doDeferredStripCreation(); } return strips.size(); } }
public void setAntiLog(boolean antiLog) { useAntiLog = antiLog; synchronized (stripLock) { if (strips == null) { doDeferredStripCreation(); for (Strip strip : this.strips) strip.useAntiLog(useAntiLog); } } }
public Strip getStrip(int stripNumber) { if (stripNumber > stripsAttached) return null; synchronized (stripLock) { if (strips == null) { doDeferredStripCreation(); } return this.strips.get(stripNumber); } }
public List<Strip> getTouchedStrips() { synchronized (stripLock) { if (strips == null) { doDeferredStripCreation(); } List<Strip> touchedStrips = new CopyOnWriteArrayList<Strip>(strips); for (Strip strip : strips) if (!strip.isTouched()) touchedStrips.remove(strip); return touchedStrips; } }
public List<Strip> getStrips() { // Devices that are members of a multicast group, // but which are not the primary member of that group, // do not return strips. if (multicast) { if (!multicastPrimary) { return new ArrayList<Strip>(); } } synchronized (stripLock) { if (strips == null) { doDeferredStripCreation(); } // Ensure callers can't modify the returned list return Collections.unmodifiableList(strips); } }