本文整理了Java中net.miginfocom.layout.LC.getAlignX()
方法的一些代码示例,展示了LC.getAlignX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LC.getAlignX()
方法的具体详情如下:
包路径:net.miginfocom.layout.LC
类名称:LC
方法名:getAlignX
[英]If the laid out components' bounds in total is less than the final size of the container these align values will be used to align the components in the parent. null
is default and that means top/left alignment. The relative distances between the components will not be affected by this property.
[中]如果布局组件的总边界小于容器的最终大小,则这些对齐值将用于对齐父容器中的组件。null
是默认值,这意味着上/左对齐。组件之间的相对距离不受此属性的影响。
代码示例来源:origin: MovingBlocks/Terasology
public void layoutContainer(Canvas canvas, int[] bounds) {
for (ComponentWrapper wrapper : children) {
if (wrapper instanceof MigLayout) {
MigLayout layout = (MigLayout) wrapper;
layout.layoutContainer(canvas, bounds);
} else if (wrapper instanceof MigComponent) {
MigComponent migComponent = (MigComponent) wrapper;
migComponent.calculatePreferredSize(canvas, canvas.size());
}
}
checkCache();
if (grid.layout(bounds, lc.getAlignX(), lc.getAlignY(), debug, true)) {
grid = null;
checkCache();
grid.layout(bounds, lc.getAlignX(), lc.getAlignY(), debug, false);
}
}
代码示例来源:origin: com.miglayout/miglayout-swing
@Override
public float getLayoutAlignmentX(Container parent)
{
return lc != null && lc.getAlignX() != null ? lc.getAlignX().getPixels(1, checkParent(parent), null) : 0;
}
代码示例来源:origin: com.miglayout/miglayout-swt
public float getLayoutAlignmentX(Composite parent)
{
return lc != null && lc.getAlignX() != null ? lc.getAlignX().getPixels(1, checkParent(parent), null) : 0;
}
代码示例来源:origin: com.miglayout/miglayout-swt
@Override
protected void layout(Composite parent, boolean flushCache)
{
if (flushCache)
grid = null;
checkCache(parent);
Rectangle r = parent.getClientArea();
int[] b = new int[] {r.x, r.y, r.width, r.height};
final boolean layoutAgain = grid.layout(b, lc.getAlignX(), lc.getAlignY(), getDebug());
if (layoutAgain) {
grid = null;
checkCache(parent);
grid.layout(b, lc.getAlignX(), lc.getAlignY(), getDebug());
}
}
代码示例来源:origin: com.miglayout/miglayout-ideutil
appendBoundSize(lc.getHeight(), sb, false, asAPI);
UnitValue alignX = lc.getAlignX();
UnitValue alignY = lc.getAlignY();
if (alignX != null || alignY != null) {
代码示例来源:origin: com.miglayout/miglayout-core
if (lc.getAlignX() == null) {
UnitValue alignX = parseAlignKeywords(part, true);
if (alignX != null) {
代码示例来源:origin: com.miglayout/miglayout-swing
};
if (grid.layout(b, lc.getAlignX(), lc.getAlignY(), getDebug())) {
grid = null;
checkCache(parent);
grid.layout(b, lc.getAlignX(), lc.getAlignY(), getDebug());
代码示例来源:origin: com.miglayout/miglayout-javafx
lGrid.layout(lBounds, getLayoutConstraints().getAlignX(), getLayoutConstraints().getAlignY(), debug);
内容来源于网络,如有侵权,请联系作者删除!