// Path: photorama-raspberry-pi-lcd-keypad/src/main/java/se/hirt/pi/adafruitlcd/ILCD.java
// public interface ILCD {
// 
// 	void setText(String s) throws IOException;
// 
// 	void setText(int row, String string) throws IOException;
// 
// 	void setCursorPosition(int row, int column) throws IOException;
// 
// 	void stop() throws IOException;
// 
// 	void clear() throws IOException;
// 
// 	void home() throws IOException;
// 
// 	void setCursorEnabled(boolean enable) throws IOException;
// 
// 	boolean isCursorEnabled();
// 
// 	void setDisplayEnabled(boolean enable) throws IOException;
// 
// 	boolean isDisplayEnabled();
// 
// 	void setBlinkEnabled(boolean enable) throws IOException;
// 
// 	boolean isBlinkEnabled();
// 
// 	void setBacklight(Color color) throws IOException;
// 
// 	Color getBacklight() throws IOException;
// 
// 	void scrollDisplay(Direction direction) throws IOException;
// 
// 	void setTextFlowDirection(Direction direction) throws IOException;
// 
// 	void setAutoScrollEnabled(boolean enable) throws IOException;
// 
// 	boolean isAutoScrollEnabled();
// 
// 	boolean isButtonPressed(Button button) throws IOException;
// 
// 	int buttonsPressedBitmask() throws IOException;
// 
// }


import java.io.IOException;
import se.hirt.pi.adafruitlcd.ILCD;
/*
 *  Copyright (C) 2013 Marcus Hirt
 *                     www.hirt.se
 *
 * This software is free:
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Copyright (C) Marcus Hirt, 2013
 */
package se.hirt.pi.adafruitlcd.demo;



/**
 * Plays around with the cursor a bit.
 * 
 * @author Marcus Hirt
 *
 */
public class CursorDemo implements LCDTest {

	@Override
	public String getName() {
		return "Cursor";
	}

	@Override
	public void run(ILCD lcd) throws IOException {
		lcd.clear();
// Path: photorama-raspberry-pi-lcd-keypad/src/main/java/se/hirt/pi/adafruitlcd/ILCD.java
// public interface ILCD {
// 
// 	void setText(String s) throws IOException;
// 
// 	void setText(int row, String string) throws IOException;
// 
// 	void setCursorPosition(int row, int column) throws IOException;
// 
// 	void stop() throws IOException;
// 
// 	void clear() throws IOException;
// 
// 	void home() throws IOException;
// 
// 	void setCursorEnabled(boolean enable) throws IOException;
// 
// 	boolean isCursorEnabled();
// 
// 	void setDisplayEnabled(boolean enable) throws IOException;
// 
// 	boolean isDisplayEnabled();
// 
// 	void setBlinkEnabled(boolean enable) throws IOException;
// 
// 	boolean isBlinkEnabled();
// 
// 	void setBacklight(Color color) throws IOException;
// 
// 	Color getBacklight() throws IOException;
// 
// 	void scrollDisplay(Direction direction) throws IOException;
// 
// 	void setTextFlowDirection(Direction direction) throws IOException;
// 
// 	void setAutoScrollEnabled(boolean enable) throws IOException;
// 
// 	boolean isAutoScrollEnabled();
// 
// 	boolean isButtonPressed(Button button) throws IOException;
// 
// 	int buttonsPressedBitmask() throws IOException;
// 
// }


// Path: photorama-raspberry-pi-lcd-keypad/src/main/java/se/hirt/pi/adafruitlcd/demo/CursorDemo.java
import java.io.IOException;
import se.hirt.pi.adafruitlcd.ILCD;

/*
 *  Copyright (C) 2013 Marcus Hirt
 *                     www.hirt.se
 *
 * This software is free:
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Copyright (C) Marcus Hirt, 2013
 */
package se.hirt.pi.adafruitlcd.demo;



/**
 * Plays around with the cursor a bit.
 * 
 * @author Marcus Hirt
 *
 */
public class CursorDemo implements LCDTest {

	@Override
	public String getName() {
		return "Cursor";
	}

	@Override
	public void run(ILCD lcd) throws IOException {
		lcd.clear();
		lcd.setText("Cursor:\n");