当前位置: 首页>>代码示例>>Java>>正文


Java LayoutStyle.ComponentPlacement方法代码示例

本文整理汇总了Java中javax.swing.LayoutStyle.ComponentPlacement方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutStyle.ComponentPlacement方法的具体用法?Java LayoutStyle.ComponentPlacement怎么用?Java LayoutStyle.ComponentPlacement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.LayoutStyle的用法示例。


在下文中一共展示了LayoutStyle.ComponentPlacement方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeVerticalStrut

import javax.swing.LayoutStyle; //导入方法依赖的package包/类
private Component makeVerticalStrut(JComponent compA,
                                    JComponent compB,
                                    LayoutStyle.ComponentPlacement relatedUnrelated) {
    int height = LayoutStyle.getInstance().getPreferredGap(
                        compA,
                        compB,
                        relatedUnrelated,
                        SOUTH,
                        this);
    return Box.createVerticalStrut(height);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:CommitPanel.java

示例2: makeHorizontalStrut

import javax.swing.LayoutStyle; //导入方法依赖的package包/类
private Component makeHorizontalStrut(JComponent compA,
                                      JComponent compB,
                                      LayoutStyle.ComponentPlacement relatedUnrelated) {
    int width = LayoutStyle.getInstance().getPreferredGap(
                        compA,
                        compB,
                        relatedUnrelated,
                        WEST,
                        this);
    return Box.createHorizontalStrut(width);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:CommitPanel.java

示例3: getSpace

import javax.swing.LayoutStyle; //导入方法依赖的package包/类
private int getSpace(JComponent parent, JComponent compA, JComponent compB, LayoutStyle.ComponentPlacement related, int horizontal) {
    return LayoutStyle.getInstance()
           .getPreferredGap(compA,
                            compB,
                            related,
                            (horizontal == HORIZONTAL) ? EAST : SOUTH,
                            parent);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:RepositorySelectorBuilder.java

示例4: createHorizontalStrut

import javax.swing.LayoutStyle; //导入方法依赖的package包/类
private Component createHorizontalStrut(JComponent parent, JComponent compA, JComponent compB, LayoutStyle.ComponentPlacement related) {
    return Box.createHorizontalStrut(getSpace(parent, compA, compB, related, HORIZONTAL));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:RepositorySelectorBuilder.java

示例5: createVerticalStrut

import javax.swing.LayoutStyle; //导入方法依赖的package包/类
private Component createVerticalStrut(JComponent parent, JComponent compA, JComponent compB, LayoutStyle.ComponentPlacement related) {
    return Box.createVerticalStrut(getSpace(parent, compA, compB, related, VERTICAL));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:RepositorySelectorBuilder.java


注:本文中的javax.swing.LayoutStyle.ComponentPlacement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。