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


Java BorderLayout.EAST属性代码示例

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


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

示例1: getComponentAtConstraint

private static com.codename1.ui.Component getComponentAtConstraint(String constraint, com.codename1.ui.layouts.BorderLayout bl) {
    if(constraint == BorderLayout.WEST) {
        return bl.getWest();
    } else {
        if(constraint == BorderLayout.EAST) {
            return bl.getEast();
        } else {
            if(constraint == BorderLayout.SOUTH) {
                return bl.getSouth();
            } else {
                if(constraint == BorderLayout.NORTH) {
                    return bl.getNorth();
                }
                return bl.getCenter();
            }
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:18,代码来源:UserInterfaceEditor.java

示例2: setTabPlacement

/**
 * Sets the tab placement for this tabbedpane.
 * Possible values are:<ul>
 * <li><code>Component.TOP</code>
 * <li><code>Component.BOTTOM</code>
 * <li><code>Component.LEFT</code>
 * <li><code>Component.RIGHT</code>
 * </ul>
 * The default value, if not set, is <code>Component.TOP</code>.
 *
 * @param tabPlacement the placement for the tabs relative to the content
 */
public void setTabPlacement(int tabPlacement) {
    if (tabPlacement != TOP && tabPlacement != LEFT &&
            tabPlacement != BOTTOM && tabPlacement != RIGHT) {
        throw new IllegalArgumentException("illegal tab placement: must be TOP, BOTTOM, LEFT, or RIGHT");
    }
    if (this.tabPlacement == tabPlacement && tabsContainer.getParent() == null && isInitialized()) {
        return;
    }
    this.tabPlacement = tabPlacement;
    removeComponent(tabsContainer);

    setTabsLayout(tabPlacement);

    if (tabPlacement == TOP) {
        super.addComponent(BorderLayout.NORTH, tabsContainer);
    } else if (tabPlacement == BOTTOM) {
        super.addComponent(BorderLayout.SOUTH, tabsContainer);
    } else if (tabPlacement == LEFT) {
        super.addComponent(BorderLayout.WEST, tabsContainer);
    } else {// RIGHT
        super.addComponent(BorderLayout.EAST, tabsContainer);
    }

    initTabsFocus();

    tabsContainer.setShouldCalcPreferredSize(true);
    contentPane.setShouldCalcPreferredSize(true);

    revalidate();
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:42,代码来源:Tabs.java


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