• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Value类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.Value的典型用法代码示例。如果您正苦于以下问题:Java Value类的具体用法?Java Value怎么用?Java Value使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Value类属于com.badlogic.gdx.scenes.scene2d.ui包,在下文中一共展示了Value类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createOkCancel

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private void createOkCancel() {
    this.row();
    Table cancelOkTable = new Table();
    cancelOkTable.defaults().pad(CB.scaledSizes.MARGIN);

    CharSequenceButton btnOk = new CharSequenceButton(Translation.get("ok"));
    CharSequenceButton btnCancel = new CharSequenceButton(Translation.get("cancel"));

    btnOk.addListener(okListener);
    btnCancel.addListener(cancelListener);

    cancelOkTable.add(btnOk).expandX().fillX();
    cancelOkTable.add(btnCancel).expandX().fillX();

    this.add(cancelOkTable).width(new Value.Fixed(Gdx.graphics.getWidth() - CB.scaledSizes.MARGINx2));
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:17,代码来源:EditFilterSettings.java


示例2: createOkCancel

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private void createOkCancel() {
    this.row();
    Table cancelOkTable = new Table();

    CharSequenceButton btnOk = new CharSequenceButton(Translation.get("ok"));
    CharSequenceButton btnCancel = new CharSequenceButton(Translation.get("cancel"));

    btnOk.addListener(okListener);
    btnCancel.addListener(cancelListener);

    float btnWidth = (Gdx.graphics.getWidth() - CB.scaledSizes.MARGIN_HALF * 3) / 2;

    cancelOkTable.add(btnOk).width(new Value.Fixed(btnWidth));
    cancelOkTable.add(btnCancel).width(new Value.Fixed(btnWidth));

    this.add(cancelOkTable).bottom().width(new Value.Fixed(Gdx.graphics.getWidth() - CB.scaledSizes.MARGINx2));
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:18,代码来源:ProjectionCoordinate.java


示例3: getApiKeyButtonView

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private ListViewItem getApiKeyButtonView(int listIndex, SettingsListGetApiButton<?> setting) {
    ListViewItem table = new ListViewItem(listIndex) {
        @Override
        public void dispose() {
        }
    };

    float buttonWidth = this.getWidth() - (CB.scaledSizes.MARGINx2 * 2);

    final ApiButton apiButton = new ApiButton();
    table.add(apiButton).width(new Value.Fixed(buttonWidth)).center();


    // add clickListener
    table.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            if (event.getType() == InputEvent.Type.touchUp) {
                apiButton.generateKey();
            }
        }
    });


    return table;
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:26,代码来源:Settings_Activity.java


示例4: InventoryPanel

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
public InventoryPanel( Skin skin, Stage stage )
{
	this.TileSize = 32;
	this.skin = skin;
	this.stage = stage;

	this.tileBackground = AssetManager.loadSprite( "GUI/TileBackground" );
	this.tileBorder = AssetManager.loadSprite( "GUI/TileBorder" );

	this.buttonUp = AssetManager.loadSprite( "GUI/Button" );
	this.buttonDown = AssetManager.loadSprite( "GUI/ButtonDown" );
	this.buttonBorder = AssetManager.loadSprite( "GUI/ButtonBorder" );

	header = new HeaderLine( skin, stage, buttonUp, tileBorder, TileSize );
	body = new InventoryBody( skin, stage, tileBackground, tileBorder, 32 );

	add( header ).width( Value.percentWidth( 1, this ) );
	row();
	add( body ).expand().fill().width( Value.percentWidth( 1, this ) );

	setTouchable( Touchable.childrenOnly );
}
 
开发者ID:infinity8,项目名称:Roguelike,代码行数:23,代码来源:InventoryPanel.java


示例5: processForActor

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padTop(verticalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padTop(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padTop(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padTop(LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadTopLmlAttribute.java


示例6: processForActor

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padLeft(horizontalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padLeft(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padLeft(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padLeft(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadLeftLmlAttribute.java


示例7: processForActor

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padRight(horizontalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padRight(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padRight(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padRight(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadRightLmlAttribute.java


示例8: processForActor

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
        final String rawAttributeData) {
    // Parsed if actor is not in a cell:
    if (actor instanceof Table) {
        final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor,
                rawAttributeData);
        ((Table) actor).padBottom(verticalValue);
    } else if (actor instanceof VerticalGroup) {
        ((VerticalGroup) actor).padBottom(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof HorizontalGroup) {
        ((HorizontalGroup) actor).padBottom(parser.parseFloat(rawAttributeData, actor));
    } else if (actor instanceof Container<?>) {
        ((Container<?>) actor)
                .padBottom(LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData));
    } else {
        // Exception:
        super.processForActor(parser, tag, actor, rawAttributeData);
    }
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadBottomLmlAttribute.java


示例9: determineVerticalValue

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private static Value determineVerticalValue(final LmlParser parser, final LmlTag parent, final Actor actor,
        final String valueToParse) {
    if (Strings.isFloat(valueToParse)) {
        return new Value.Fixed(parser.parseFloat(valueToParse, actor));
    } else if (Strings.endsWith(valueToParse, '%')) {
        return Value.percentHeight(parser.parseFloat(stripEnding(valueToParse), actor),
                getParentActorForValueParsing(parent, actor));
    } else if (Strings.startsWith(valueToParse, '%')) {
        return Value.percentHeight(parser.parseFloat(stripMarker(valueToParse), actor));
    }
    if (!STATIC_TABLE_VALUES.containsKey(valueToParse)) {
        parser.throwError(
                "Unable to determine Value object. Value has to be a float, float beginning or ending with '%' or static value reference. See LmlUtilities#parseVerticalValue(LmlParser, LmlTag, Actor, String). Received: "
                        + valueToParse);
    }
    return STATIC_TABLE_VALUES.get(valueToParse);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:18,代码来源:LmlUtilities.java


示例10: determineHorizontalValue

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private static Value determineHorizontalValue(final LmlParser parser, final LmlTag parent, final Actor actor,
        final String valueToParse) {
    if (Strings.isFloat(valueToParse)) {
        return new Value.Fixed(parser.parseFloat(valueToParse, actor));
    } else if (Strings.endsWith(valueToParse, '%')) {
        return Value.percentWidth(parser.parseFloat(stripEnding(valueToParse), actor),
                getParentActorForValueParsing(parent, actor));
    } else if (Strings.startsWith(valueToParse, '%')) {
        return Value.percentWidth(parser.parseFloat(stripMarker(valueToParse), actor));
    }
    if (!STATIC_TABLE_VALUES.containsKey(valueToParse)) {
        parser.throwError(
                "Unable to determine Value object. Value has to be a float, float beginning or ending with '%' or static value reference. See LmlUtilities#parseHorizontalValue(LmlParser, LmlTag, Actor, String). Received: "
                        + valueToParse);
    }
    return STATIC_TABLE_VALUES.get(valueToParse);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:18,代码来源:LmlUtilities.java


示例11: createToggleBtn

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private void createToggleBtn() {

        btnGroup = new ButtonGroup<>();

        VisTextButton.VisTextButtonStyle buttonStyle = VisUI.getSkin().get("toggle", VisTextButton.VisTextButtonStyle.class);

        buttonStyle.font = style.toggleButtonFont;
        buttonStyle.fontColor = style.toggleButtonFontColor;

        tglBtnPreset = new CharSequenceButton(Translation.get("preset"), buttonStyle);
        tglBtnSet = new CharSequenceButton(Translation.get("setting"), buttonStyle);
        tglBtnCategory = new CharSequenceButton(Translation.get("category"), buttonStyle);
        tglBtnText = new CharSequenceButton(Translation.get("text"), buttonStyle);

        tglBtnPreset.addListener(tglListener);
        tglBtnSet.addListener(tglListener);
        tglBtnCategory.addListener(tglListener);
        tglBtnText.addListener(tglListener);

        btnGroup.add(tglBtnPreset);
        btnGroup.add(tglBtnSet);
        btnGroup.add(tglBtnCategory);
        btnGroup.add(tglBtnText);


        Table tglTbl = new Table();
        tglTbl.defaults().space(CB.scaledSizes.MARGIN / 4);

        tglTbl.add(tglBtnPreset).expandX().fillX();
        tglTbl.add(tglBtnSet).expandX().fillX();

        //ISSUE (#167 implement Filter for Category)
//        tglTbl.add(tglBtnCategory).expandX().fillX();

        //ISSUE (#168 implement Filter for Text(CacheName/GcCode/OwnerName))
//        tglTbl.add(tglBtnText).expandX().fillX();

        this.add(tglTbl).width(new Value.Fixed(Gdx.graphics.getWidth() - CB.scaledSizes.MARGINx2));
    }
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:40,代码来源:EditFilterSettings.java


示例12: layout

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
public void layout() {
    if (!needLayout) {
        super.layout();
        return;
    }

    SnapshotArray<Actor> actors = this.getChildren();
    for (Actor actor : actors)
        this.removeActor(actor);

    this.setFillParent(true);
    this.defaults().pad(CB.scaledSizes.MARGIN);

    this.add(lblTitle).colspan(3).center();
    this.add(gsLogo).colspan(2).center();
    this.row().padTop(new Value.Fixed(CB.scaledSizes.MARGINx2 * 2));


    this.add(workAnimation).colspan(5).center();
    this.row();
    this.add();
    this.add(progressBar).colspan(3).center().expandX().fillX();
    this.row();
    Table nestedTable2 = new Table();
    nestedTable2.defaults().pad(CB.scaledSizes.MARGIN).bottom();
    nestedTable2.add(bCancel).bottom();
    this.add(nestedTable2).colspan(5);

    super.layout();
    needLayout = false;
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:33,代码来源:CheckStateActivity.java


示例13: createValues

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private Cell createValues() {
    this.row();
    Group group = new Group();
    group.addActor(decValues);
    float height = (CB.scaledSizes.BUTTON_HEIGHT * 2) + CB.scaledSizes.MARGIN * 4;
    return this.add(group).height(new Value.Fixed(height));
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:8,代码来源:CoordinateActivity.java


示例14: createToggleBtn

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private void createToggleBtn() {

        btnGroup = new ButtonGroup<VisTextButton>();

        tglBtnDec = new VisTextButton("Dec", "toggle");
        tglBtnMin = new VisTextButton("Min", "toggle");
        tglBtnSec = new VisTextButton("Sec", "toggle");
        tglBtnUtm = new VisTextButton("UTM", "toggle");

        tglBtnDec.addListener(tglListener);
        tglBtnMin.addListener(tglListener);
        tglBtnSec.addListener(tglListener);
        tglBtnUtm.addListener(tglListener);

        btnGroup.add(tglBtnDec);
        btnGroup.add(tglBtnMin);
        btnGroup.add(tglBtnSec);
        btnGroup.add(tglBtnUtm);


        Table tglTbl = new Table();
        tglTbl.defaults().space(CB.scaledSizes.MARGIN / 4);

        float btnWidth = (Gdx.graphics.getWidth() - CB.scaledSizes.MARGIN * 3) / 4;


        tglTbl.add(tglBtnDec).width(new Value.Fixed(btnWidth));
        tglTbl.add(tglBtnMin).width(new Value.Fixed(btnWidth));
        tglTbl.add(tglBtnSec).width(new Value.Fixed(btnWidth));
        tglTbl.add(tglBtnUtm).width(new Value.Fixed(btnWidth));

        this.add(tglTbl).top().width(new Value.Fixed(Gdx.graphics.getWidth() - CB.scaledSizes.MARGINx2));
    }
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:34,代码来源:CoordinateActivity.java


示例15: getProgressContentTable

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
private static Table getProgressContentTable() {

        ProgressTable contentTable = new ProgressTable();
        float contentWidth = (Gdx.graphics.getWidth() * 0.75f);

        contentTable.label = new VisLabel();
        contentTable.add(contentTable.label).width(new Value.Fixed(contentWidth)).pad(20);
        contentTable.row();

        contentTable.progress = new ProgressBar(0, 100, 1, false, "default");
        contentTable.add(contentTable.progress).width(new Value.Fixed(contentWidth)).pad(20);
        contentTable.row();

        return contentTable;
    }
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:16,代码来源:CancelProgressDialog.java


示例16: getToolTipForData

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
public Table getToolTipForData( Object data )
{
	Table table = new Table();
	table.add( new Label( data.toString(), skin, "title" ) ).width( Value.percentWidth( 1, table ) );

	return table;
}
 
开发者ID:infinity8,项目名称:Roguelike,代码行数:9,代码来源:InventoryPanel.java


示例17: process

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final Cell<?> cell,
        final String rawAttributeData) {
    final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
            rawAttributeData);
    final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData);
    cell.prefSize(horizontalValue, verticalValue);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:9,代码来源:CellPrefSizeLmlAttribute.java


示例18: process

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final Cell<?> cell,
        final String rawAttributeData) {
    final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
            rawAttributeData);
    cell.maxWidth(horizontalValue);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:8,代码来源:CellMaxWidthLmlAttribute.java


示例19: process

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final Cell<?> cell,
        final String rawAttributeData) {
    final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
            rawAttributeData);
    cell.padLeft(horizontalValue);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:8,代码来源:CellPadLeftLmlAttribute.java


示例20: process

import com.badlogic.gdx.scenes.scene2d.ui.Value; //导入依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final Cell<?> cell,
        final String rawAttributeData) {
    final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
            rawAttributeData);
    final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData);
    cell.maxSize(horizontalValue, verticalValue);
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:9,代码来源:CellMaxSizeLmlAttribute.java



注:本文中的com.badlogic.gdx.scenes.scene2d.ui.Value类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Factory类代码示例发布时间:2022-05-23
下一篇:
Java TestDispatcher类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap