Java 类com.badlogic.gdx.scenes.scene2d.utils.FocusListener 实例源码

项目:gdx-texture-packer-gui    文件:KeyboardFocusChangedLmlAttribute.java   
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) {
    final ActorConsumer<?, Params> action = parser.parseAction(rawAttributeData, tmpParams);
    if (action == null) {
        parser.throwError("Could not find action for: " + rawAttributeData + " with actor: " + actor);
    }
    actor.addListener(new FocusListener() {
        @Override public void keyboardFocusChanged(FocusEvent event, Actor target, boolean focused) {
            if (target == actor) {
                tmpParams.actor = actor;
                tmpParams.focused = focused;
                action.consume(tmpParams);
                tmpParams.reset();
            }
        }
    });
}
项目:cachebox3.0    文件:ProjectionCoordinate.java   
private void addEditLine(CharSequence name, final VisTextField textField, CharSequence unity) {
    Table line = new VisTable();
    line.defaults().pad(CB.scaledSizes.MARGINx2);
    line.add(name).left();


    //disable onScreenKeyboard
    textField.setOnscreenKeyboard(new TextField.OnscreenKeyboard() {
        @Override
        public void show(boolean visible) {
            // do nothing
            // we use own NumPad
        }
    });

    textField.addListener(new FocusListener() {
        public void keyboardFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused) {
            if (focused == true) {
                if (actor == textField) {
                    actFocusField = textField;
                }
            }
        }
    });
    line.add(textField).expandX().fillX();
    line.add(unity);
    this.row();
    this.add(line).expandX().fillX();
}
项目:vis-editor    文件:EntityProperties.java   
public FocusListener getSharedFocusListener () {
    return sharedFocusListener;
}
项目:vis-editor    文件:NumberInputField.java   
public NumberInputField (FocusListener sharedFocusListener, ChangeListener sharedChangeListener) {
    this(sharedFocusListener, sharedChangeListener, true);
}