@Override public void add(Node parent) { super.add(parent); String mappingName = TextField.this.id + "MOUSE"; if (!inputManager.hasMapping(mappingName)) { inputManager.addMapping(mappingName, new MouseButtonTrigger(0)); } inputManager.addListener(actionListener, TextField.this.id + "MOUSE"); }
@Override public void setVisible(boolean visible) { super.setVisible(visible); if (visible) { inputManager.addListener(actionListener, TextField.this.id + "MOUSE"); bitmapText.setCullHint(Spatial.CullHint.Never); } else { inputManager.removeListener(actionListener); bitmapText.setCullHint(Spatial.CullHint.Always); } }
@Override public void remove() { super.remove(); inputManager.removeListener(actionListener); }