本文整理匯總了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;
}