本文整理汇总了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();
}
}
}
}
示例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();
}