本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.utils.FocusListener类的典型用法代码示例。如果您正苦于以下问题:Java FocusListener类的具体用法?Java FocusListener怎么用?Java FocusListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FocusListener类属于com.badlogic.gdx.scenes.scene2d.utils包,在下文中一共展示了FocusListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: process
import com.badlogic.gdx.scenes.scene2d.utils.FocusListener; //导入依赖的package包/类
@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();
}
}
});
}
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:18,代码来源:KeyboardFocusChangedLmlAttribute.java
示例2: addEditLine
import com.badlogic.gdx.scenes.scene2d.utils.FocusListener; //导入依赖的package包/类
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();
}
开发者ID:Longri,项目名称:cachebox3.0,代码行数:30,代码来源:ProjectionCoordinate.java
示例3: getSharedFocusListener
import com.badlogic.gdx.scenes.scene2d.utils.FocusListener; //导入依赖的package包/类
public FocusListener getSharedFocusListener () {
return sharedFocusListener;
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:4,代码来源:EntityProperties.java
示例4: NumberInputField
import com.badlogic.gdx.scenes.scene2d.utils.FocusListener; //导入依赖的package包/类
public NumberInputField (FocusListener sharedFocusListener, ChangeListener sharedChangeListener) {
this(sharedFocusListener, sharedChangeListener, true);
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:4,代码来源:NumberInputField.java
注:本文中的com.badlogic.gdx.scenes.scene2d.utils.FocusListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论