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

Java Cell类代码示例

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

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



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

示例1: layout

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void layout () {
	Table table = getTable();
	Insets insets = table.getInsets();
	super.layout(insets.left, insets.top, //
		table.getWidth() - insets.left - insets.right, //
		table.getHeight() - insets.top - insets.bottom);

	List<Cell> cells = getCells();
	for (int i = 0, n = cells.size(); i < n; i++) {
		Cell c = cells.get(i);
		if (c.getIgnore()) continue;
		Component component = (Component)c.getWidget();
		component.setLocation((int)c.getWidgetX(), (int)c.getWidgetY());
		component.setSize((int)c.getWidgetWidth(), (int)c.getWidgetHeight());
	}

	if (getDebug() != Debug.none) SwingToolkit.startDebugTimer();
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:19,代码来源:TableLayout.java


示例2: addRequirement

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addRequirement(Requirement requirement) {
	row().fillX().pad(12, 0, 12, 0);
	Label label = Roboto18.makeLabel(requirement.displayString());
	label.setWrap(true);
	add(label).expandX();

	Cell amountCell = add().center();
	if (requirement.getAmount() > 0) {
		Label amountValue = RobotoBold18.makeLabel(String.format("%d/%d", requirement.getCurrentWeight(), requirement.getAmount()));
		amountValue.setAlignment(Align.center);
		amountCell.setWidget(amountValue);
	}

	ProgressBar progressBar = new ProgressBar(requirement.getProgress());
	add(progressBar).width(200).right().center();

	row();
	add(new HorizontalRule(Color.DARK_GRAY, 1)).colspan(3);
}
 
开发者ID:frigidplanet,项目名称:droidtowers,代码行数:21,代码来源:RequirementsTable.java


示例3: draw

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void draw(ShapeRenderer shapeRender) {
	if (mTable != null) {
		Cell c = getSelectedCell(x, y);
		if (c != null) {
			Actor selected = (Actor) (c.getWidget());
			if (selected != null) {
				shapeRender.setColor(Blob.colors(mPlayer.id%Blob.COLORS.length));
				GLCommon gl = Gdx.graphics.getGLCommon();
				shapeRender.begin(ShapeType.Line);
				shapeRender.box(mTable.getX()+selected.getX(), mTable.getY()+selected.getY(), 0, selected.getWidth(),
						selected.getHeight(), 0);
				gl.glLineWidth(3);
				shapeRender.end();
				gl.glLineWidth(1);
			}
		}
	}
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:19,代码来源:CustomizeController.java


示例4: getCell

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
private Cell getCell(int x, int y) {
	if (mTable != null) {
		for (Cell c : mTable.getCells()) {
			if (c.getColumn() == x && c.getRow() == y) {
				Actor cellActor = (Actor) (c.getWidget());
				if (cellActor instanceof Button
						&& (((Button) cellActor).isDisabled() || !((Button) cellActor)
								.isVisible())) {
					return null;
				} else {
					return c;
				}
			}
		}
	}
	return null;
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:18,代码来源:MenuController.java


示例5: getTransCell

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
private Cell getTransCell(int x, int y) {
	if (mTable != null) {
		for (Cell c : mTable.getCells()) {
			if (c.getColumn() == x && c.getRow() == y) {
				Actor cellActor = (Actor) (c.getWidget());
				if (cellActor instanceof Button
						&& (((Button) cellActor).isDisabled()
								|| !((Button) cellActor).isVisible() || !((Button) cellActor)
									.isTransform())) {
					return null;
				} else {
					return c;
				}
			}
		}
	}
	return null;
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:19,代码来源:MenuController.java


示例6: enter

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) {
	if (fromActor instanceof ImageButton && ((ImageButton) fromActor).isDisabled()) {
		return;
	} else if (event.getListenerActor() instanceof ImageButton
			&& ((ImageButton) event.getListenerActor()).isDisabled()) {
		return;
	}
	Cell selected = mTable.getCell(event.getListenerActor());
	if (selected != null && (mX != selected.getColumn() || mY != selected.getRow())) {
		Actor cellActor = (Actor) (selected.getWidget());
		if (cellActor instanceof Button
				&& (((Button) cellActor).isDisabled() || !((Button) cellActor).isVisible())) {
			// nothing don't navigate
		} else {
			Game.get().playTickSound();
			mX = selected.getColumn();
			mY = selected.getRow();
		}
	}
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:21,代码来源:MenuController.java


示例7: onStatsTableCreated

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public static void onStatsTableCreated(PortalUpgradeUi ui, Table t) {
    init(ui);

    Label.LabelStyle style = Mod.skin.get("portal-stats", Label.LabelStyle.class);
    final float den = Mod.displayMetrics.density;

    List<Cell> cells = new ArrayList<Cell>(t.getCells());
    t.clear();
    t.left();
    t.defaults().left();
    t.add((Actor) cells.get(1).getWidget()).padLeft(20 * den);
    t.add((Actor) cells.get(2).getWidget()).padLeft(8 * den);
    t.add((Actor) cells.get(3).getWidget()).padLeft(16 * den);
    t.add((Actor) cells.get(4).getWidget()).padLeft(8 * den);
    t.row();
    t.add((Actor) cells.get(7).getWidget()).padLeft(20 * den);
    t.add((Actor) cells.get(8).getWidget()).padLeft(8 * den);
    t.add(new Label("Dist.:", style)).padLeft(16 * den);
    t.add(distLabel = new Label("", style)).padLeft(8 * den);

    updateDistLabel(Mod.world.getPlayerModel().getPlayerLocation());
}
 
开发者ID:brutall,项目名称:ingress-apk-mod,代码行数:23,代码来源:PortalUpgradeMod.java


示例8: PortalInfoDialog_onStatsTableCreated

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public static void PortalInfoDialog_onStatsTableCreated(PortalInfoDialog dialog, Table t) {
    Mod.portalInfoDialog = dialog;

    Label.LabelStyle style = Mod.skin.get("portal-stats", Label.LabelStyle.class);

    List<Cell> cells = new ArrayList<Cell>(t.getCells());
    t.clear();
    t.add((Actor) cells.get(0).getWidget()).left();
    t.add((Actor) cells.get(1).getWidget()).left().expandX();
    t.row();
    t.add((Actor) cells.get(3).getWidget()).left();
    t.add((Actor) cells.get(4).getWidget()).left().expandX();
    t.row();
    t.add(new Label("Keys:", style)).left();
    t.add(new Label(String.valueOf(InventoryUtils.getNumberOfPortalKeys(dialog.portalComponent)), style)).left().expandX();
    t.row();
    t.add(new Label("Dist.:", style)).left();
    t.add(portalInfoDistLabel = new Label("", style)).left().expandX();
}
 
开发者ID:brutall,项目名称:ingress-apk-mod,代码行数:20,代码来源:Entry.java


示例9: layout

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void layout() {
    layout.layout(getX(), getY(), getWidth(), getHeight());
    List<Cell<Widget, Table>> cells = layout.getCells();
    for (int i = 0, n = cells.size(); i < n; i++) {
        Cell<Widget, Table> c = cells.get(i);
        if (c.getIgnore()) {
            continue;
        }
        Widget cellWidget = c.getWidget();
        cellWidget.setX(c.getWidgetX());
        cellWidget.setY(c.getWidgetY());
        cellWidget.setWidth(c.getWidgetWidth());
        cellWidget.setHeight(c.getWidgetHeight());
    }
}
 
开发者ID:devnewton,项目名称:jnuit,代码行数:16,代码来源:Table.java


示例10: getSelectedCell

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
private Cell getSelectedCell(int x, int y){
	for (Cell c : mTable.getCells()) {
		if (c.getColumn() == x && c.getRow() == y) {
			return c;
		}
	}
	return null;
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:9,代码来源:CustomizeController.java


示例11: setIndex

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void setIndex(int i) {
	int j = 0;
	Cell target = null;
	for (Cell c : mTable.getCells()) {
		if (j == i) {
			target = c;
			break;
		}
		j++;
	}
	if (target != null) {
		mX = target.getColumn();
		mY = target.getRow();
	}
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:16,代码来源:MenuController.java


示例12: setTable

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void setTable(Table t) {
	mTable = t;
	if (t != null) {
		for (Cell c : t.getCells()) {
			Actor a = (Actor) c.getWidget();
			if (a != null) {
				a.addListener(hoverListener);
			}
		}
		selectFirstAvailable();
	}
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:13,代码来源:MenuController.java


示例13: setWidth

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
@Override
public void setWidth(float width) {
    super.setWidth(width);
    if (content != null) {
        for (Cell<?> cell : content.getCells()) {
            cell.width(width);
        }
        content.invalidate();
    }
}
 
开发者ID:Talon876,项目名称:explosions,代码行数:11,代码来源:PagedScrollPane.java


示例14: setPageSpacing

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void setPageSpacing(float pageSpacing) {
    if (content != null) {
        content.defaults().space(pageSpacing);
        for (Cell<?> cell : content.getCells()) {
            cell.space(pageSpacing);
        }
        content.invalidate();
    }
}
 
开发者ID:Talon876,项目名称:explosions,代码行数:10,代码来源:PagedScrollPane.java


示例15: obtainCell

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public Cell obtainCell (TableLayout layout) {
	Cell cell = new Cell();
	cell.setLayout(layout);
	return cell;
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:6,代码来源:SwingToolkit.java


示例16: freeCell

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public void freeCell (Cell cell) {
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:3,代码来源:SwingToolkit.java


示例17: addCell

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
public Cell addCell (String text) {
	return addCell(new JLabel(text));
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:4,代码来源:Table.java


示例18: row

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
/** Indicates that subsequent cells should be added to a new row and returns the cell values that will be used as the defaults
 * for all cells in the new row.
 * @see TableLayout#row() */
public Cell row () {
	return layout.row();
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:7,代码来源:Table.java


示例19: columnDefaults

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
/** Gets the cell values that will be used as the defaults for all cells in the specified column.
 * @see TableLayout#columnDefaults(int) */
public Cell columnDefaults (int column) {
	return layout.columnDefaults(column);
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:6,代码来源:Table.java


示例20: defaults

import com.esotericsoftware.tablelayout.Cell; //导入依赖的package包/类
/** The cell values that will be used as the defaults for all cells.
 * @see TableLayout#defaults() */
public Cell defaults () {
	return layout.defaults();
}
 
开发者ID:emara-geek,项目名称:object-recognition-tensorflow,代码行数:6,代码来源:Table.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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