本文整理汇总了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));
}
}
示例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));
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}