当前位置: 首页>>代码示例>>Java>>正文


Java TextLmlActorBuilder类代码示例

本文整理汇总了Java中com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder的典型用法代码示例。如果您正苦于以下问题:Java TextLmlActorBuilder类的具体用法?Java TextLmlActorBuilder怎么用?Java TextLmlActorBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TextLmlActorBuilder类属于com.github.czyzby.lml.parser.impl.tag.builder包,在下文中一共展示了TextLmlActorBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCustomTag

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
private static LmlTag getCustomTag(final LmlParser parser, final LmlTag parentTag, final StringBuilder rawTagData) {
    return new AbstractActorLmlTag(parser, parentTag, rawTagData) {
        @Override
        protected LmlActorBuilder getNewInstanceOfBuilder() {
            // Normally you don't have to override this method, but we want to support String constructor, so we
            // supply one of default, extended builders:
            return new TextLmlActorBuilder();
            // By using this builder, we're automatically support "text", "txt" and "value" attributes, which will
            // use #setText(String) method to modify the builder.
        }

        @Override
        protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
            // Safe to cast builder. Always the same object type as returned by getNewInstanceOfBuilder:
            final TextLmlActorBuilder textBuilder = (TextLmlActorBuilder) builder;
            return new BlinkingLabel(textBuilder.getText(), getSkin(builder), builder.getStyleName());
        }

        @Override
        protected void handlePlainTextLine(final String plainTextLine) {
            final BlinkingLabel label = (BlinkingLabel) getActor();
            // By using LmlParser#parseString, we add i18n, preferences and methods support.
            label.setText(label.getText() + getParser().parseString(plainTextLine, label));
        }

        @Override
        protected void handleValidChild(final LmlTag childTag) {
            getParser().throwErrorIfStrict("Labels cannot have children. Even the blinking ones.");
            // Appending children is pretty easy. If label was a Group, you could just replace the exception with:
            // ((Group) getActor()).addActor(childTag.getActor());
            // Also, you can use AbstractGroupLmlTag which already handles children for you.
        }
    };
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:35,代码来源:Main.java

示例2: getNewInstanceOfBuilder

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected TextLmlActorBuilder getNewInstanceOfBuilder() {
    return new TextLmlActorBuilder();
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:5,代码来源:ExpandEditTextButton.java

示例3: getNewInstanceOfActor

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    return getNewInstanceOfActor((TextLmlActorBuilder)builder);
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:5,代码来源:ExpandEditTextButton.java

示例4: getNewInstanceOfBuilder

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected LmlActorBuilder getNewInstanceOfBuilder() {
    return new TextLmlActorBuilder();
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:CodeTextArea.java

示例5: getNewInstanceOfActor

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(LmlActorBuilder builder) {
    TextLmlActorBuilder textBuilder = (TextLmlActorBuilder) builder;
    return new CodeTextArea(textBuilder.getText(), getSkin(textBuilder), textBuilder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:CodeTextArea.java

示例6: getBuilderType

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
public Class<TextLmlActorBuilder> getBuilderType() {
    return TextLmlActorBuilder.class;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:TextLmlAttribute.java

示例7: process

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
public boolean process(final LmlParser parser, final LmlTag tag, final TextLmlActorBuilder builder,
        final String rawAttributeData) {
    builder.setText(parser.parseString(rawAttributeData));
    return FULLY_PARSED;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:7,代码来源:TextLmlAttribute.java

示例8: getNewInstanceOfActor

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    final TextLmlActorBuilder textBuilder = (TextLmlActorBuilder) builder;
    return getNewInstanceOfTextField(textBuilder);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:TextFieldLmlTag.java

示例9: getNewInstanceOfTextField

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
/** @param textBuilder contains initial text data and style.
 * @return a new instance of TextField. */
protected TextField getNewInstanceOfTextField(final TextLmlActorBuilder textBuilder) {
    return new TextField(textBuilder.getText(), getSkin(textBuilder), textBuilder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:TextFieldLmlTag.java

示例10: getNewInstanceOfActor

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected final Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    return getNewInstanceOfTextButton((TextLmlActorBuilder) builder);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:TextButtonLmlTag.java

示例11: getNewInstanceOfTextButton

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
/** @param builder contains data necessary to construct a text button.
 * @return a new instance of TextButton. */
protected TextButton getNewInstanceOfTextButton(final TextLmlActorBuilder builder) {
    return new TextButton(builder.getText(), getSkin(builder), builder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:TextButtonLmlTag.java

示例12: getNewInstanceOfActor

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    final TextLmlActorBuilder textBuilder = (TextLmlActorBuilder) builder;
    return new ImageTextButton(textBuilder.getText(), getSkin(builder), builder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:ImageTextButtonLmlTag.java

示例13: getNewInstanceOfTextButton

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected CheckBox getNewInstanceOfTextButton(final TextLmlActorBuilder builder) {
    return new CheckBox(builder.getText(), getSkin(builder), builder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:CheckBoxLmlTag.java

示例14: getNewInstanceOfActor

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
@Override
protected final Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    final Window window = getNewInstanceOfWindow((TextLmlActorBuilder) builder);
    LmlUtilities.getLmlUserObject(window).initiateStageAttacher(); // Centers the window by default.
    return window;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:7,代码来源:WindowLmlTag.java

示例15: getNewInstanceOfWindow

import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入依赖的package包/类
/** @param builder contains data necessary to constuct a window.
 * @return a new instance of Window actor. */
protected Window getNewInstanceOfWindow(final TextLmlActorBuilder builder) {
    return new Window(builder.getText(), getSkin(builder), builder.getStyleName());
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:WindowLmlTag.java


注:本文中的com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。