1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License.
3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // You may obtain a copy of the License at
11 // you may not use this file except in compliance with the License.
12 // Licensed under the Apache License, Version 2.0 (the "License");
14 goog.provide('i18n.input.chrome.inputview.layouts.RowsOfNumberpad');
15 goog.require('i18n.input.chrome.inputview.layouts.util');
19 * Creates the rows for compact numberpad keyboard.
21 * @return {!Array.<!Object>} The rows.
23 i18n.input.chrome.inputview.layouts.RowsOfNumberpad.create = function() {
26 'heightInWeight': 0.75
30 'widthInWeight': 0.75,
31 'heightInWeight': 0.75
35 var smallkeySequenceOf3 = i18n.input.chrome.inputview.layouts.util.
36 createKeySequence(smallKeySpec, 3);
37 var keySequenceOf3 = i18n.input.chrome.inputview.layouts.util.
38 createKeySequence(baseKeySpec, 3);
39 var backspaceKey = i18n.input.chrome.inputview.layouts.util.createKey({
41 'heightInWeight': 0.75
43 var row1 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
45 'children': [smallkeySequenceOf3, keySequenceOf3, backspaceKey]
49 smallkeySequenceOf3 = i18n.input.chrome.inputview.layouts.util.
50 createKeySequence(smallKeySpec, 3);
51 keySequenceOf3 = i18n.input.chrome.inputview.layouts.util.
52 createKeySequence(baseKeySpec, 3);
53 var enterKey = i18n.input.chrome.inputview.layouts.util.createKey({
55 'heightInWeight': 0.75
57 var row2 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
59 'children': [smallkeySequenceOf3, keySequenceOf3, enterKey]
63 smallkeySequenceOf3 = i18n.input.chrome.inputview.layouts.util.
64 createKeySequence(smallKeySpec, 3);
65 var keySequenceOf2 = i18n.input.chrome.inputview.layouts.util.
66 createKeySequence(baseKeySpec, 2);
67 var rightKeyWithPadding = i18n.input.chrome.inputview.layouts.util.createKey({
69 'heightInWeight': 0.75
71 var row3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
73 'children': [smallkeySequenceOf3, keySequenceOf2, rightKeyWithPadding]
77 var spaceKey = i18n.input.chrome.inputview.layouts.util.createKey({
78 'widthInWeight': 2.25,
79 'heightInWeight': 0.75
81 keySequenceOf3 = i18n.input.chrome.inputview.layouts.util.
82 createKeySequence(baseKeySpec, 3);
83 var hideKey = i18n.input.chrome.inputview.layouts.util.createKey({
85 'heightInWeight': 0.75
87 var row4 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
89 'children': [spaceKey, keySequenceOf3, hideKey]
92 return [row1, row2, row3, row4];