DIR : /home/kozerus/public_html/pn/uize/site-source/js/Uize/Widget/SegmentDisplay/Matrix3x5.js

/home/kozerus/public_html/pn/uize/site-source/js/Uize/Widget/SegmentDisplay

/*______________
|       ______  |   U I Z E    J A V A S C R I P T    F R A M E W O R K
|     /      /  |   ---------------------------------------------------
|    /    O /   |    MODULE : Uize.Widget.SegmentDisplay.Matrix3x5 Class
|   /    / /    |
|  /    / /  /| |    ONLINE : http://www.uize.com
| /____/ /__/_| | COPYRIGHT : (c)2014-2016 UIZE
|          /___ |   LICENSE : Available under MIT License or GNU General Public License
|_______________|             http://www.uize.com/license.html
*/

/* Module Meta Data
	type: Class
	importance: 1
	codeCompleteness: 100
	docCompleteness: 1
*/

/*?
	Introduction
		The =Uize.Widget.SegmentDisplay.Matrix3x5= class implements a 3x5 matrix display widget, much like the classic LCD matrix displays on electronics devices.

		*DEVELOPERS:* `Chris van Rensburg`

		###
			http://robey.lag.net/2010/01/23/tiny-monospace-font.html
			http://mckoss.com/jscript/tinyalice.htm

		Segments Map
			The segments of the 3x5 matrix display are arranged as shown in the diagram below...

			.................................
			                       CODE | bit
			+---+  +---+  +---+      A  |  14
			| A |  | B |  | C |      B  |  13
			+---+  +---+  +---+      C  |  12
			+---+  +---+  +---+      D  |  11
			| D |  | E |  | F |      E  |  10
			+---+  +---+  +---+      F  |  9
			+---+  +---+  +---+      G  |  8
			| G |  | H |  | I |      H  |  7
			+---+  +---+  +---+      I  |  6
			+---+  +---+  +---+      J  |  5
			| J |  | K |  | L |      K  |  4
			+---+  +---+  +---+      L  |  3
			+---+  +---+  +---+      M  |  2
			| M |  | N |  | O |      N  |  1
			+---+  +---+  +---+      O  |  0
			.................................
*/

Uize.module ({
	name:'Uize.Widget.SegmentDisplay.Matrix3x5',
	builder:function (_superclass) {
		'use strict';

		var _class = _superclass.subclass ();

		/*** Set Values for Public Static Properties ***/
			_class.configureDisplay (
				['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O'],
				{
					//              ABCDEFGHIJKLMNO (binary)
					0:   0x7b6f,  // 111101101101111
					1:   0x2492,  // 010010010010010
					2:   0x73e7,  // 111001111100111
					3:   0x72cf,  // 111001011001111
					4:   0x5bc9,  // 101101111001001
					5:   0x79cf,  // 111100111001111
					6:   0x79ef,  // 111100111101111
					7:   0x7249,  // 111001001001001
					8:   0x7bef,  // 111101111101111
					9:   0x7bcf,  // 111101111001111
					A:   0x2bed,  // 010101111101101
					B:   0x6bae,  // 110101110101110
					C:   0x3923,  // 011100100100011
					D:   0x6b6e,  // 110101101101110
					E:   0x79e7,  // 111100111100111
					F:   0x79e4,  // 111100111100100
					G:   0x39eb,  // 011100111101011
					H:   0x5bed,  // 101101111101101
					I:   0x7497,  // 111010010010111
					J:   0x126a,  // 001001001101010
					K:   0x5bad,  // 101101110101101
					L:   0x4927,  // 100100100100111
					M:   0x5fed,  // 101111111101101
					N:   0x5ffd,  // 101111111111101
					O:   0x2b6a,  // 010101101101010
					P:   0x7be4,  // 111101111100100
					Q:   0x2b7b,  // 010101101111011
					R:   0x6bf5,  // 110101111110101
					S:   0x388e,  // 011100010001110
					T:   0x7492,  // 111010010010010
					U:   0x5b6b,  // 101101101101011
					V:   0x5b52,  // 101101101010010
					W:   0x5bfd,  // 101101111111101
					X:   0x5aad,  // 101101010101101
					Y:   0x5a92,  // 101101010010010
					Z:   0x72a7,  // 111001010100111
					a:   0x0cef,  // 000110011101111
					b:   0x4d6e,  // 100110101101110
					c:   0x0723,  // 000011100100011
					d:   0x176b,  // 001011101101011
					e:   0x0773,  // 000011101110011
					f:   0x15d2,  // 001010111010010
					g:   0x3bca,  // 011101111001010
					h:   0x4d6d,  // 100110101101101
					i:   0x2092,  // 010000010010010
					j:   0x106a,  // 001000001101010
					k:   0x4BB5,  // 100101110110101
					l:   0x6497,  // 110010010010111
					m:   0x0ffd,  // 000111111111101
					n:   0x0d6d,  // 000110101101101
					o:   0x056a,  // 000010101101010
					p:   0x6ba4,  // 110101110100100
					q:   0x3ac9,  // 011101011001001
					r:   0x0724,  // 000011100100100
					s:   0x079e,  // 000011110011110
					t:   0x2e91,  // 010111010010001
					u:   0x0b6b,  // 000101101101011
					v:   0x0b6a,  // 000101101101010
					w:   0x0bff,  // 000101111111111
					x:   0x0a95,  // 000101010010101
					y:   0x5aca,  // 101101011001010
					z:   0x0ef7,  // 000111011110111
					' ': 0,       // 000000000000000
					'!': 0x2482,  // 010010010000010
					'"': 0x5a00,  // 101101000000000
					'#': 0x5f7d,  // 101111101111101
					'$': 0x3cf2,  // 011110011110010
					'%': 0x42a1,  // 100001010100001
					'&': 0x2aab,  // 010101010101011
					"'": 0x2400,  // 010010000000000
					'(': 0x1491,  // 001010010010001
					')': 0x4494,  // 100010010010100
					'*': 0x55d5,  // 101010111010101
					'+': 0x05d0,  // 000010111010000
					',': 0x0014,  // 000000000010100
					'-': 0x01c0,  // 000000111000000
					'.': 0x0002,  // 000000000000010
					'/': 0x02a0,  // 000001010100000
					':': 0x0410,  // 000010000010000
					';': 0x0414,  // 000010000010100
					'<': 0x1511,  // 001010100010001
					'=': 0x0e38,  // 000111000111000
					'>': 0x4454,  // 100010001010100
					'?': 0x7282,  // 111001010000010
					'@': 0x2fe3,  // 010111111100011
					'[': 0x7927,  // 111100100100111
					'\\': 0x888,  // 000100010001000
					']': 0x724f,  // 111001001001111
					'^': 0x2a00,  // 010101000000000
					'_': 0x0007,  // 000000000000111
					'`': 0x4400,  // 100010000000000
					'{': 0x3513,  // 011010100010011
					'|': 0x2412,  // 010010000010010
					'}': 0x6456,  // 110010001010110
					'~': 0x3c00   // 011110000000000
				}
			);

		return _class;
	}
});

//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer