本文整理汇总了Java中com.github.czyzby.lml.util.LmlUserObject类的典型用法代码示例。如果您正苦于以下问题:Java LmlUserObject类的具体用法?Java LmlUserObject怎么用?Java LmlUserObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LmlUserObject类属于com.github.czyzby.lml.util包,在下文中一共展示了LmlUserObject类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showDialog
import com.github.czyzby.lml.util.LmlUserObject; //导入依赖的package包/类
private void showDialog(final Stage stage) {
final LmlUserObject userObject = LmlUtilities.getOptionalLmlUserObject(dialog);
if (userObject != null && userObject.getStageAttacher() != null) {
userObject.getStageAttacher().attachToStage(dialog, stage);
} else if (dialog instanceof Dialog) {
((Dialog) dialog).show(stage);
} else {
// Simplified copy of Dialog#show:
stage.addActor(dialog);
dialog.setPosition(Math.round((stage.getWidth() - dialog.getWidth()) / 2f),
Math.round((stage.getHeight() - dialog.getHeight()) / 2f));
dialog.addAction(Actions.sequence(Actions.alpha(0), Actions.fadeIn(0.4f, Interpolation.fade)));
}
}
示例2: invokeOnCreateActions
import com.github.czyzby.lml.util.LmlUserObject; //导入依赖的package包/类
/**
* @param actor will have its specialized user object extracted (if present) and will invoke all its referenced on
* create actions.
*/
protected void invokeOnCreateActions(final Actor actor) {
final LmlUserObject userObject = LmlUtilities.getOptionalLmlUserObject(actor);
if (userObject != null) {
userObject.invokeOnCreateActions(actor);
}
}
示例3: invokeOnCloseActions
import com.github.czyzby.lml.util.LmlUserObject; //导入依赖的package包/类
/**
* @param actor will have its specialized user object extracted (if present) and will invoke all its referenced on
* tag close actions.
*/
protected void invokeOnCloseActions(final Actor actor) {
final LmlUserObject userObject = LmlUtilities.getOptionalLmlUserObject(actor);
if (userObject != null) {
userObject.invokeOnCloseActions(actor);
}
}
示例4: process
import com.github.czyzby.lml.util.LmlUserObject; //导入依赖的package包/类
@Override
public final void process(final LmlParser parser, final LmlTag tag, final Table actor,
final String rawAttributeData) {
// Checking if the table is a main table of a TabbedPane:
final LmlUserObject userObject = LmlUtilities.getOptionalLmlUserObject(actor);
if (userObject != null && userObject.getData() instanceof TabbedPane) {
process(parser, tag, (TabbedPane) userObject.getData(), rawAttributeData);
} else {
parser.throwErrorIfStrict("Only tabbed panes can parser this attribute. Found a reference to this parser: "
+ this + " in an invalid table tag: " + tag.getTagName());
}
}
示例5: getTabbedPane
import com.github.czyzby.lml.util.LmlUserObject; //导入依赖的package包/类
/** @param table main table of the {@link TabbedPane}. If LML meta-data was not cleared, it will contain a reference
* of its {@link TabbedPane} parent.
* @return {@link TabbedPane} which uses passed table as its main table. {@code null} if table is not used by a
* tabbed pane, LML meta-data was cleared or reference was lost due to prohibited settings (like using of
* {@link OneColumnLmlAttribute}). */
public static TabbedPane getTabbedPane(final Table table) {
final LmlUserObject userObject = LmlUtilities.getOptionalLmlUserObject(table);
if (userObject != null && userObject.getData() instanceof TabbedPane) {
return (TabbedPane) userObject.getData();
}
return null;
}