net.miginfocom.layout.LC.getAlignY()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(76)

本文整理了Java中net.miginfocom.layout.LC.getAlignY()方法的一些代码示例,展示了LC.getAlignY()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LC.getAlignY()方法的具体详情如下:
包路径:net.miginfocom.layout.LC
类名称:LC
方法名:getAlignY

LC.getAlignY介绍

[英]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 getLayoutAlignmentY(Container parent)
{
  return lc != null && lc.getAlignY() != null ? lc.getAlignY().getPixels(1, checkParent(parent), null) : 0;
}

代码示例来源:origin: com.miglayout/miglayout-swt

public float getLayoutAlignmentY(Composite parent)
{
  return lc != null && lc.getAlignY() != null ? lc.getAlignY().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

UnitValue alignY = lc.getAlignY();
if (alignX != null || alignY != null) {
  if (alignX != null && alignY != 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);

相关文章