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

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

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

LC.isFlowX介绍

[英]The default flow direction. Normally (which is true) this is horizontal and that means that the "next" component will be put in the cell to the right (or to the left if left-to-right is false).
[中]默认流向。通常情况下(即true)这是水平的,这意味着“下一个”组件将放在单元格的右侧(如果从左到右为假,则放在左侧)。

代码示例

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

/** Go to next cell.
 * @param p The point to increase
 * @param cnt How many cells to advance.
 * @return The new value in the "increasing" dimension.
 */
private int increase(int[] p, int cnt)
{
  return lc.isFlowX() ? (p[0] += cnt) : (p[1] += cnt);
}

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

/** Wraps to the next row or column depending on if horizontal flow or vertical flow is used.
 * @param cellXY The point to wrap and thus set either x or y to 0 and increase the other one.
 * @param gapSize The gaps size specified in a "wrap XXX" or "newline XXX" or <code>null</code> if none.
 */
private void wrap(int[] cellXY, BoundSize gapSize)
{
  boolean flowx = lc.isFlowX();
  cellXY[0] = flowx ? 0 : cellXY[0] + 1;
  cellXY[1] = flowx ? cellXY[1] + 1 : 0;
  if (gapSize != null) {
    if (wrapGapMap == null)
      wrapGapMap = new HashMap<Integer, BoundSize>(8);
    wrapGapMap.put(cellXY[flowx ? 1 : 0], gapSize);
  }
  // add the row/column so that the gap in the last row/col will not be removed.
  if (flowx) {
    rowIndexes.add(cellXY[1]);
  } else {
    colIndexes.add(cellXY[0]);
  }
}

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

if (lc.isFlowX() == false)
  sb.append(asAPI ? ".flowY()" : ",flowy");

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

this.callbackList = callbackList;
int wrap = lc.getWrapAfter() != 0 ? lc.getWrapAfter() : (lc.isFlowX() ? colConstr : rowConstr).getConstaints().length;
boolean useVisualPadding = lc.isVisualPadding();
final DimConstraint[] specs = (lc.isFlowX() ? rowConstr : colConstr).getConstaints();
  final boolean isRowInGridMode = !lc.isNoGrid() && !((DimConstraint) LayoutUtil.getIndexSafe(specs, lc.isFlowX() ? cellXY[1] : cellXY[0])).isNoGrid();
        cellXY[1] = cy;
      } else {    // Only one coordinate is specified. Use the current row (flowx) or column (flowy) to fill in.
        if (lc.isFlowX()) {
          cellXY[0] = cx;
        } else {
    int spanx = Math.min(!isRowInGridMode && lc.isFlowX() ? LayoutUtil.INF : rootCc.getSpanX(), MAX_GRID - cellXY[0]);
    int spany = Math.min(!isRowInGridMode && !lc.isFlowX() ? LayoutUtil.INF : rootCc.getSpanY(), MAX_GRID - cellXY[1]);
    cell = new Cell(spanx, spany, cellFlowX != null ? cellFlowX : lc.isFlowX());
  int splitLeft = isRowInGridMode ? rootCc.getSplit() - 1 : LayoutUtil.INF;
  boolean splitExit = false;
  final boolean spanRestOfRow = (lc.isFlowX() ? rootCc.getSpanX() : rootCc.getSpanY()) == LayoutUtil.INF;
    int span = lc.isFlowX() ? cell.spanx : cell.spany;
    if (Math.abs((lc.isFlowX() ? cellXY[0] : cellXY[1])) + span >= wrap) {
      hitEndOfRow = true;
    } else {

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

continue;
BoundSize wrapGapSize = (wrapGapMap == null || isHor == lc.isFlowX() ? null : wrapGapMap.get(wgIx++));

相关文章