aboutsummaryrefslogtreecommitdiffstats
path: root/Java/com/phidgets/TextLEDPhidget.java
blob: a2f39c8de95ef4358e3845774c8e3932795b5441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * Copyright 2006 Phidgets Inc.  All rights reserved.
 */

package com.phidgets;
import java.util.Iterator;
import java.util.LinkedList;
import com.phidgets.event.*;
/**
 * This class represents a Phidget Text LED. All methods
 * to control the Text LED are implemented in this class.
 * <p>
 * The Text LED is a Phidget that displays text and numerals on LED
 * numeric display in rows. The number of rows and size of each row depends on
 * your configuration.
 * 
 * @author Phidgets Inc.
 */
public final class TextLEDPhidget extends Phidget
{
	public TextLEDPhidget () throws PhidgetException
	{
		super (create ());
	}
	private static native long create () throws PhidgetException;
	/**
	 * Returns the number of rows. This returns the maximum number of rows supported by the device, not neccessarily
	 * the number of rows actually available with your coniguration.
	 * @return rows
	 * @throws PhidgetException If this Phidget is not opened and attached. 
	 * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached.
	 */
	public native int getRowCount () throws PhidgetException;
	/**
	 * Returns the number of columns (Characters per row). This returns the maximum number of columns supported by the device, not neccessarily
	 * the number of columns actually available with your coniguration.
	 * @return columns
	 * @throws PhidgetException If this Phidget is not opened and attached. 
	 * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached.
	 */
	public native int getColumnCount () throws PhidgetException;
	/**
	 * Returns the bringhtness. This is the brightneww of all rows. The Default brightness is 100.
	 * @return brightness
	 * @throws PhidgetException If this Phidget is not opened and attached. 
	 * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached.
	 */
	public native int getBrightness () throws PhidgetException;
	/**
	 * Sets the brightness of all rows. The valid range is 0-100.
	 * @param brightness brightness
	 * @throws PhidgetException If this Phidget is not opened and attached, or the brightness value is out of range. 
	 * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached.
	 */
	public native void setBrightness (int brightness) throws PhidgetException;
	/**
	 * Sets the display string of a certain row. If the string is longer then the row, it will be truncated.
	 * @param index Row
	 * @param text String
	 * @throws PhidgetException If this Phidget is not opened and attached, or if the row is out of range. 
	 * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached.
	 */
	public native void setDisplayString (int index, String text) throws PhidgetException;
	private final void enableDeviceSpecificEvents (boolean b)
	{
	}
}