本文整理汇总了Java中com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder.getText方法的典型用法代码示例。如果您正苦于以下问题:Java TextLmlActorBuilder.getText方法的具体用法?Java TextLmlActorBuilder.getText怎么用?Java TextLmlActorBuilder.getText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder
的用法示例。
在下文中一共展示了TextLmlActorBuilder.getText方法的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.
}
};
}
示例2: getNewInstanceOfActor
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
protected Actor getNewInstanceOfActor(final TextLmlActorBuilder builder) {
return new ExpandEditTextButton(builder.getText(), getSkin(builder), builder.getStyleName());
}
示例3: getNewInstanceOfTextField
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected VisTextField getNewInstanceOfTextField(final TextLmlActorBuilder textBuilder) {
return new VisValidatableTextField(textBuilder.getText(), textBuilder.getStyleName());
}
示例4: 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());
}
示例5: 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());
}
示例6: 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());
}
示例7: getNewInstanceOfActor
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
// Safe to cast, see super#getNewInstanceOfBuilder():
final TextLmlActorBuilder textBuilder = (TextLmlActorBuilder) builder;
return new LinkLabel(textBuilder.getText(), Strings.EMPTY_STRING, builder.getStyleName());
}
示例8: 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());
}
示例9: getNewInstanceOfTextField
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected TextField getNewInstanceOfTextField(final TextLmlActorBuilder textBuilder) {
final TextArea textArea = new TextArea(textBuilder.getText(), getSkin(textBuilder), textBuilder.getStyleName());
LmlUtilities.getLmlUserObject(textArea).setData(Boolean.TRUE); // Setting as multiline by default.
return textArea;
}
示例10: getNewInstanceOfTextButton
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected TextButton getNewInstanceOfTextButton(final TextLmlActorBuilder builder) {
return new VisTextButton(builder.getText(), builder.getStyleName());
}
示例11: 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 Label(textBuilder.getText(), getSkin(builder), textBuilder.getStyleName());
}
示例12: getNewInstanceOfTextField
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected VisTextField getNewInstanceOfTextField(final TextLmlActorBuilder textBuilder) {
final VisTextArea textArea = new VisTextArea(textBuilder.getText(), textBuilder.getStyleName());
LmlUtilities.getLmlUserObject(textArea).setData(Boolean.TRUE); // Setting as multiline by default.
return textArea;
}
示例13: getNewInstanceOfTextButton
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected TextButton getNewInstanceOfTextButton(final TextLmlActorBuilder builder) {
return new VisCheckBox(builder.getText(), builder.getStyleName());
}
示例14: 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 {@link VisTextField}. */
protected VisTextField getNewInstanceOfTextField(final TextLmlActorBuilder textBuilder) {
return new VisTextField(textBuilder.getText(), textBuilder.getStyleName());
}
示例15: getNewInstanceOfTextButton
import com.github.czyzby.lml.parser.impl.tag.builder.TextLmlActorBuilder; //导入方法依赖的package包/类
@Override
protected TextButton getNewInstanceOfTextButton(final TextLmlActorBuilder builder) {
return new VisRadioButton(builder.getText(),
getSkin(builder).get(builder.getStyleName(), VisCheckBoxStyle.class));
}