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

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

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

LC.setWrapAfter介绍

[英]Sets after what cell the grid should always auto wrap.
[中]设置网格应始终自动换行的单元格。

代码示例

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

/** Same functionality as {@link #setWrapAfter(int)} only this method returns <code>this</code> for chaining multiple calls.
 * <p>
 * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
 * @param count After what cell the grid should always auto wrap. If <code>0</code> the number of columns/rows in the
 * @return <code>this</code> so it is possible to chain calls. E.g. <code>new LayoutConstraint().noGrid().gap().fill()</code>.
 */
public final LC wrapAfter(int count)
{
  setWrapAfter(count);
  return this;
}

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

/** Sets a wrap after the number of columns/rows that is defined in the {@link net.miginfocom.layout.AC}.
 * <p>
 * Same functionality as calling {@link #setWrapAfter(int)} with <code>0</code> only this method returns <code>this</code> for chaining multiple calls.
 * <p>
 * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
 * @return <code>this</code> so it is possible to chain calls. E.g. <code>new LayoutConstraint().noGrid().gap().fill()</code>.
 */
public final LC wrap()
{
  setWrapAfter(0);
  return this;
}

代码示例来源:origin: stackoverflow.com

LC lc_Y = (new LC()).fill().flowY();
lc_Y.setWrapAfter(ITEMS_PER_COLUMN);
JPanel panel = new JPanel(new MigLayout(lc_Y));

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

if (ix > -1) {
  String num = part.substring(ix).trim();
  lc.setWrapAfter(num.length() != 0 ? Integer.parseInt(num) : 0);
  continue;

相关文章