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

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

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

LC.getInsets介绍

[英]The insets for the layed out panel. The insets will be an empty space around the components in the panel. null values means that the default panel insets for the platform is used. See PlatformDefaults#setDialogInsets(net.miginfocom.layout.UnitValue,net.miginfocom.layout.UnitValue,net.miginfocom.layout.UnitValue,net.miginfocom.layout.UnitValue).
[中]分层面板的插图。插图将是面板中组件周围的空白区域。null值表示使用平台的默认面板插图。请参阅PlatformDefaults#setDialogInsets(net.miginfocom.layout.UnitValue、net.miginfocom.layout.UnitValue、net.miginfocom.layout.UnitValue、net.miginfocom.layout.UnitValue)。

代码示例

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

/** Returns the insets for the side.
 * @param side top == 0, left == 1, bottom = 2, right = 3.
 * @param getDefault If <code>true</code> the default insets will get retrieved if <code>lc</code> has none set.
 * @return The insets for the side. Never <code>null</code>.
 */
static UnitValue getInsets(LC lc, int side, boolean getDefault)
{
  UnitValue[] i = lc.getInsets();
  return (i != null && i[side] != null) ? i[side] : (getDefault ? PlatformDefaults.getPanelInsets(side) : UnitValue.ZERO);
}

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

sb.append(asAPI ? ".bottomToTop()" : ",btt");
UnitValue[] insets = lc.getInsets();
if (insets != null) {
  String cs = LayoutUtil.getCCString(insets);

相关文章