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


Java LmlTag.getParent方法代码示例

本文整理汇总了Java中com.github.czyzby.lml.parser.tag.LmlTag.getParent方法的典型用法代码示例。如果您正苦于以下问题:Java LmlTag.getParent方法的具体用法?Java LmlTag.getParent怎么用?Java LmlTag.getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.czyzby.lml.parser.tag.LmlTag的用法示例。


在下文中一共展示了LmlTag.getParent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: process

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) {
    if (tag.getParent() == null) { // Attaching to stage with selected position:
        LmlUtilities.getLmlUserObject(actor).parseYPosition(parser, actor, rawAttributeData);
    } else {
        actor.setY(parser.parseFloat(rawAttributeData, actor));
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:9,代码来源:YLmlAttribute.java

示例2: process

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) {
    if (tag.getParent() == null) { // Attaching to stage with selected position:
        LmlUtilities.getLmlUserObject(actor).parseXPosition(parser, actor, rawAttributeData);
    } else {
        actor.setX(parser.parseFloat(rawAttributeData, actor));
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:9,代码来源:XLmlAttribute.java

示例3: getDialogParent

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
private static Dialog getDialogParent(final LmlTag tag) {
    LmlTag parent = tag.getParent();
    while (parent != null) {
        if (parent.getActor() instanceof Dialog) {
            return (Dialog) parent.getActor();
        }
        parent = parent.getParent();
    }
    return null;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:11,代码来源:OnResultLmlAttribute.java

示例4: determineStage

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
/** Utility method. Allows to extract a {@link Stage} instance of either the passed actor or any of its parents.
 *
 * @param actor can be null. Its stage can be null.
 * @return a {@link Stage} instance if any of the actors in hierarchy is added to one. */
protected Stage determineStage(final Actor actor) {
    Stage stage = actor == null ? null : actor.getStage();
    if (stage == null) {
        LmlTag ancestorTag = getParent();
        while (ancestorTag != null && stage == null) {
            final Actor ancestor = ancestorTag.getActor();
            if (ancestor != null) {
                stage = ancestor.getStage();
            }
            ancestorTag = ancestorTag.getParent();
        }
    }
    return stage;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:19,代码来源:AbstractLmlTag.java

示例5: hasTreeParent

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
private static boolean hasTreeParent(LmlTag parent) {
    while (parent != null) {
        if (parent.getActor() instanceof Tree) {
            return true;
        }
        parent = parent.getParent();
    }
    return false;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:10,代码来源:LmlUserObject.java

示例6: getFormParent

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
/** @param tag original tag of the widget.
 * @return {@link VisFormTable} parent widget or null if not in a form. */
protected VisFormTable getFormParent(final LmlTag tag) {
    LmlTag parent = tag.getParent();
    while (parent != null) {
        if (parent.getActor() instanceof VisFormTable) {
            return (VisFormTable) parent.getActor();
        }
        parent = parent.getParent();
    }
    return null;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:13,代码来源:AbstractFormChildLmlAttribute.java

示例7: process

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) {
    if (tag.getParent() == null || !(tag.getParent().getActor() instanceof ListViewTable<?>)) {
        throwInvalidParentException(parser);
    } else {
        final ListView<?> listView = ((ListViewTable<?>) tag.getParent().getActor()).getListView();
        process(parser, tag, actor, listView, rawAttributeData);
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:10,代码来源:ListViewChildLmlAttribute.java

示例8: getVisDialogParent

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
private static VisDialog getVisDialogParent(final LmlTag tag) {
    LmlTag parent = tag.getParent();
    while (parent != null) {
        if (parent.getActor() instanceof VisDialog) {
            return (VisDialog) parent.getActor();
        }
        parent = parent.getParent();
    }
    return null;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:11,代码来源:OnResultLmlAttribute.java

示例9: isInForm

import com.github.czyzby.lml.parser.tag.LmlTag; //导入方法依赖的package包/类
/** @return true if the validator is attached to a widget in a form. */
protected boolean isInForm() {
    LmlTag parent = getParent();
    while (parent != null) {
        if (parent instanceof FormValidatorLmlTag) {
            return true;
        }
        parent = parent.getParent();
    }
    return false;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:12,代码来源:AbstractValidatorLmlTag.java


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