public void setPattern(final DisplayMode displayMode, final List<Cell> pattern) {
        mPattern.clear();
        mPattern.addAll(pattern);
        clearPatternDrawLookup();
        for (Cell cell : pattern) {
            cellManager.draw(cell, true);
        }

        setDisplayMode(displayMode);
    }
Set the pattern explicitly (rather than waiting for the user to input a
pattern).

@param displayMode How to display the pattern.
@param pattern     The pattern.
android-patternview/src/main/java/com/eftimoff/patternview/PatternView.java