modules/controls/src/main/java/com/sun/javafx/scene/control/skin/FXVKSkin.java
Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization
*** 42,56 ****
--- 42,58 ----
import javafx.geometry.Point2D;
import javafx.geometry.Rectangle2D;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.Parent;
+ import javafx.scene.control.SkinBase;
import javafx.scene.control.TextInputControl;
import javafx.scene.control.TextField;
import javafx.scene.control.TextArea;
import javafx.scene.control.ComboBoxBase;
import javafx.scene.Scene;
+ import javafx.scene.control.skin.TextAreaSkin;
import javafx.scene.input.InputEvent;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import javafx.scene.input.MouseButton;
*** 65,83 ****
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.HashMap;
- import com.sun.javafx.scene.control.behavior.BehaviorBase;
import static javafx.scene.input.MouseEvent.MOUSE_PRESSED;
import static javafx.scene.input.TouchEvent.TOUCH_PRESSED;
import static javafx.scene.layout.Region.USE_PREF_SIZE;
import java.security.AccessController;
import java.security.PrivilegedAction;
! public class FXVKSkin extends BehaviorSkinBase<FXVK, BehaviorBase<FXVK>> {
private static final int GAP = 6;
private List<List<Key>> currentBoard;
private static HashMap<String, List<List<Key>>> boardMap = new HashMap<String, List<List<Key>>>();
--- 67,84 ----
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.HashMap;
import static javafx.scene.input.MouseEvent.MOUSE_PRESSED;
import static javafx.scene.input.TouchEvent.TOUCH_PRESSED;
import static javafx.scene.layout.Region.USE_PREF_SIZE;
import java.security.AccessController;
import java.security.PrivilegedAction;
! public class FXVKSkin extends SkinBase<FXVK> {
private static final int GAP = 6;
private List<List<Key>> currentBoard;
private static HashMap<String, List<List<Key>>> boardMap = new HashMap<String, List<List<Key>>>();
*** 351,365 ****
node.removeEventHandler(MOUSE_PRESSED, unHideEventHandler);
}
}
private String getNodeVKType(Node node) {
! Object typeValue = node.getProperties().get(FXVK.VK_TYPE_PROP_KEY);
String typeStr = null;
if (typeValue instanceof String) {
typeStr = ((String)typeValue).toLowerCase(Locale.ROOT);
}
return (typeStr != null ? typeStr : "text");
}
private void updateKeyboardType(Node node) {
String oldType = vkType;
--- 352,369 ----
node.removeEventHandler(MOUSE_PRESSED, unHideEventHandler);
}
}
private String getNodeVKType(Node node) {
! Integer vkType = (Integer)node.getProperties().get(FXVK.VK_TYPE_PROP_KEY);
String typeStr = null;
+ if (vkType != null) {
+ Object typeValue = FXVK.VK_TYPE_NAMES[vkType];
if (typeValue instanceof String) {
typeStr = ((String)typeValue).toLowerCase(Locale.ROOT);
}
+ }
return (typeStr != null ? typeStr : "text");
}
private void updateKeyboardType(Node node) {
String oldType = vkType;
*** 471,481 ****
vkPopup.show(node.getScene().getWindow());
}
}
public FXVKSkin(final FXVK fxvk) {
! super(fxvk, new BehaviorBase<>(fxvk, Collections.emptyList()));
this.fxvk = fxvk;
if (fxvk == FXVK.vk) {
primaryVK = fxvk;
}
--- 475,485 ----
vkPopup.show(node.getScene().getWindow());
}
}
public FXVKSkin(final FXVK fxvk) {
! super(fxvk);
this.fxvk = fxvk;
if (fxvk == FXVK.vk) {
primaryVK = fxvk;
}