本文整理汇总了Java中com.codename1.ui.layouts.BorderLayout.CENTER属性的典型用法代码示例。如果您正苦于以下问题:Java BorderLayout.CENTER属性的具体用法?Java BorderLayout.CENTER怎么用?Java BorderLayout.CENTER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.codename1.ui.layouts.BorderLayout
的用法示例。
在下文中一共展示了BorderLayout.CENTER属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Tabs
/**
* Creates an empty <code>TabbedPane</code> with the specified tab placement
* of either: <code>Component.TOP</code>, <code>Component.BOTTOM</code>,
* <code>Component.LEFT</code>, or <code>Component.RIGHT</code>.
*
* @param tabP the placement for the tabs relative to the content
*/
public Tabs(int tabP) {
super(new BorderLayout());
focusListener = new TabFocusListener();
contentPane.setUIID("TabbedPane");
super.addComponent(BorderLayout.CENTER, contentPane);
tabsContainer = new Container();
tabsContainer.setUIID("TabsContainer");
tabsContainer.setScrollVisible(false);
tabsContainer.getStyle().setMargin(0, 0, 0, 0);
if(tabP == -1){
setTabPlacement(tabPlacement);
}else{
setTabPlacement(tabP);
}
press = new SwipeListener(SwipeListener.PRESS);
drag = new SwipeListener(SwipeListener.DRAG);
release = new SwipeListener(SwipeListener.RELEASE);
setUIID("Tabs");
BorderLayout bd = (BorderLayout)super.getLayout();
if(bd != null) {
if(UIManager.getInstance().isThemeConstant("tabsOnTopBool", false)) {
bd.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_TOTAL_BELOW);
} else {
bd.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_SCALE);
}
}
}
示例2: init
private void init() {
setUIID("Dialog");
title.setUIID("DialogTitle");
contentPane.setUIID("DialogContentPane");
super.addComponent(BorderLayout.NORTH, titleArea);
titleArea.addComponent(BorderLayout.CENTER, title);
super.addComponent(BorderLayout.CENTER, contentPane);
setGrabsPointerEvents(true);
}