本文整理汇总了Java中com.codename1.ui.layouts.BorderLayout.getNorth方法的典型用法代码示例。如果您正苦于以下问题:Java BorderLayout.getNorth方法的具体用法?Java BorderLayout.getNorth怎么用?Java BorderLayout.getNorth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.codename1.ui.layouts.BorderLayout
的用法示例。
在下文中一共展示了BorderLayout.getNorth方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: expandPathNode
import com.codename1.ui.layouts.BorderLayout; //导入方法依赖的package包/类
private Container expandPathNode(boolean animate, Container parent, Object node) {
int cc = parent.getComponentCount();
for(int iter = 0 ; iter < cc ; iter++) {
Component current = parent.getComponentAt(iter);
Object o = current.getClientProperty(KEY_OBJECT);
if(!model.isLeaf(o)){
//if(current instanceof Container) {
BorderLayout bl = (BorderLayout)((Container)current).getLayout();
// the tree component is always at north expanded or otherwise
current = bl.getNorth();
if(o == node || o != null && o.equals(node)) {
if(isExpanded(current)) {
return (Container)bl.getCenter();
}
return expandNodeImpl(animate, current);
}
}
}
return null;
}
示例2: collapsePathNode
import com.codename1.ui.layouts.BorderLayout; //导入方法依赖的package包/类
private void collapsePathNode(Container parent, Object node) {
int cc = parent.getComponentCount();
for(int iter = 0 ; iter < cc ; iter++) {
Component current = parent.getComponentAt(iter);
if(isExpanded(current)) {
BorderLayout bl = (BorderLayout)((Container)current).getLayout();
// the tree component is always at north expanded or otherwise
current = bl.getNorth();
Object o = current.getClientProperty(KEY_OBJECT);
if(o != null && o.equals(node)) {
if(isExpanded(current)) {
collapseNode(current, null);
}
return;
}
}
}
}
示例3: beforeShowAfterModel
import com.codename1.ui.layouts.BorderLayout; //导入方法依赖的package包/类
protected void beforeShowAfterModel(Form f) {
BorderLayout bl = (BorderLayout)ui.findCtnListLoading(f).getLayout();
if(bl.getNorth() != null)
{
ui.findCtnListLoading(f).removeComponent(bl.getNorth());
f.repaint();
}
else if(bl.getSouth() != null)
{
ui.findCtnListLoading(f).removeComponent(bl.getSouth());
f.repaint();
}
super.beforeShowAfterModel(f);
}
示例4: beforeShowAfterModel
import com.codename1.ui.layouts.BorderLayout; //导入方法依赖的package包/类
protected void beforeShowAfterModel(Form f) {
f.getTitleComponent().setEndsWith3Points(true);
BorderLayout bl = (BorderLayout)f.getContentPane().getLayout();
if(bl.getNorth() != null)
{
f.getContentPane().removeComponent(bl.getNorth());
f.repaint();
}
super.beforeShowAfterModel(f);
}
示例5: updateView
import com.codename1.ui.layouts.BorderLayout; //导入方法依赖的package包/类
public void updateView(final Form f, Playlist playlist)
{
// Prepare the playlist for the viewmodel
ListModelHelper.preparePlaylistForListing(playlist);
// Update the viewmodel
ui.findCtlPlaylistMediaItems(f).setModel(playlist);
f.setTitle(playlist.getName());
ui.hideComponent(ui.findCtnPlaylistProgress(f));
if (ui.findCtlPlaylistMediaItems(f).getModel().getSize() > 0) {
if (Api.getInstance().canDownload()) {
// Show the download-available container incl. checkbox
ui.findChkPlaylistIsOfflineAvailable(f).setSelected(playlist.getOfflineAvailable());
ui.resetComponentHeight(ui.findCtnOfflineAvailable(f));
// Hide the download-status if it isn't running
if (PlaylistHelper.isPlaylistDownloading(playlist)) {
ui.resetComponentHeight(ui.findCtnPlaylistProgress(f));
ui.findCtnPlaylistProgress(f).setHeight(StateMachine.getPixelFromMM(1,false));
ui.findSldPlaylistDownloadingProgress(f).setProgress(
PlaylistHelper.getPlaylistDownloadingProgress(playlist)
);
}
// Show is loading is in progress or already done
ui.findSldPlaylistDownloadingProgress(f).setMaxValue(playlist.getSize()*100);
}
else
{
ui.hideComponent(ui.findCtnTopbarEditing(f));
}
BorderLayout bl = (BorderLayout)ui.findCtnPlaylistItems(f).getLayout();
if(bl.getNorth() != null)
{
ui.findCtnPlaylistItems(f).removeComponent(bl.getNorth());
ui.findCtnPlaylistItems(f).repaint();
}
}
else
{
// If the locally saved version of the playlist contained items, but the remote (loaded later) does not
ui.hideComponent(ui.findCtnTopbarEditing(f));
ui.hideComponent(ui.findCtnOfflineAvailable(f));
ui.findCtnPlaylistItems(f).addComponent(BorderLayout.NORTH, StateMachine.createContainer("ViewEmptyPlaylist"));
}
if (onReady != null) {
Display.getInstance().callSerially(onReady);
onReady = null;
}
}