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


Java BorderLayout.getNorth方法代码示例

本文整理汇总了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;
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:23,代码来源:Tree.java

示例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;
            }
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:20,代码来源:Tree.java

示例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);
}
 
开发者ID:martijn00,项目名称:MusicPlayerCodenameOne,代码行数:16,代码来源:NewsView.java

示例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);
}
 
开发者ID:martijn00,项目名称:MusicPlayerCodenameOne,代码行数:13,代码来源:BrowseView.java

示例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;
    }
}
 
开发者ID:martijn00,项目名称:MusicPlayerCodenameOne,代码行数:55,代码来源:PlaylistView.java


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