Cleanup private method names

This is a follow up of Ib0ded6f98a.

Change-Id: I91ad3504d301113680194ad5b10913fc86006150
main
Tadashi G. Takaoka 2014-03-11 18:53:30 +09:00
parent e6b992d9be
commit 8542c48c30
1 changed files with 12 additions and 15 deletions

View File

@ -123,8 +123,9 @@ public class LayoutBase {
// Helper method to create alphabet layout for phone by adding special function keys except
// shift key.
private static ExpectedKeyboardBuilder toPhoneAlphabet(final ExpectedKeyboardBuilder builder) {
return builder
private static ExpectedKeyboardBuilder convertToPhoneAlphabetKeyboardBuilder(
final ExpectedKey[][] commonLayout) {
return new ExpectedKeyboardBuilder(commonLayout)
.addKeysOnTheRightOfRow(3, DELETE_KEY)
.setLabelsOfRow(4, ",", " ", ".")
.setMoreKeysOf(",", SETTINGS_KEY)
@ -135,8 +136,9 @@ public class LayoutBase {
// Helper method to create alphabet layout for tablet by adding special function keys except
// shift key.
private static ExpectedKeyboardBuilder toTabletAlphabet(final ExpectedKeyboardBuilder builder) {
return builder
private static ExpectedKeyboardBuilder convertToTabletAlphabetKeyboardBuilder(
final ExpectedKey[][] commonLayout) {
return new ExpectedKeyboardBuilder(commonLayout)
// U+00BF: "¿" INVERTED QUESTION MARK
// U+00A1: "¡" INVERTED EXCLAMATION MARK
.addKeysOnTheRightOfRow(3,
@ -150,22 +152,17 @@ public class LayoutBase {
}
// Helper method to create alphabet layout by adding special function keys.
public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(final ExpectedKey[][] common,
final boolean isPhone) {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(common);
if (isPhone) {
toPhoneAlphabet(builder);
} else {
toTabletAlphabet(builder).build();
}
return builder.build();
public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(
final ExpectedKey[][] commonLayout, final boolean isPhone) {
return isPhone ? convertToPhoneAlphabetKeyboardBuilder(commonLayout).build()
: convertToTabletAlphabetKeyboardBuilder(commonLayout).build();
}
// Helper method to create alphabet layout by adding special function keys.
public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] common,
public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] commonLayout,
final boolean isPhone) {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(
getAlphabetLayoutWithoutShiftKeys(common, isPhone));
getAlphabetLayoutWithoutShiftKeys(commonLayout, isPhone));
if (isPhone) {
builder.addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY));
} else {