當前位置: 首頁>>代碼示例>>Java>>正文


Java ProjectInfo.getObjectByIdent方法代碼示例

本文整理匯總了Java中me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo.getObjectByIdent方法的典型用法代碼示例。如果您正苦於以下問題:Java ProjectInfo.getObjectByIdent方法的具體用法?Java ProjectInfo.getObjectByIdent怎麽用?Java ProjectInfo.getObjectByIdent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo的用法示例。


在下文中一共展示了ProjectInfo.getObjectByIdent方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setProjectMetadata

import me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo; //導入方法依賴的package包/類
public void setProjectMetadata(String projIdent, String objIdent, ArrayList<String> meta, boolean isProjectMeta)
{
    for(ProjectInfo info : projects)
    {
        if(info.identifier.equals(projIdent))
        {
            if(isProjectMeta)
            {
                info.metadata = meta;
            }
            else
            {
                Object obj = info.getObjectByIdent(objIdent);
                if(obj instanceof CubeInfo)
                {
                    ((CubeInfo)obj).metadata = meta;
                }
                else if(obj instanceof CubeGroup)
                {
                    ((CubeGroup)obj).metadata = meta;
                }
            }
            streamProject(info);
        }
    }
}
 
開發者ID:iChun,項目名稱:Tabula,代碼行數:27,代碼來源:Mainframe.java

示例2: copyGroupTo

import me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo; //導入方法依賴的package包/類
public void copyGroupTo(String projIdent, String groupIdent, boolean inPlace)
{
    CubeGroup group = null;
    ProjectInfo project = null;
    for(ProjectInfo info : projects)
    {
        if(info.identifier.equals(projIdent))
        {
            project = info;
        }
        if(group == null)
        {
            group = (CubeGroup)info.getObjectByIdent(groupIdent);
        }
    }
    if(project != null && group != null)
    {
        //can't just add, groups and cubes have unique identifiers.
        CubeGroup group1 = new CubeGroup(group.name);
        project.cubeGroups.add(group1);
        cloneGroups(group, group1, inPlace);

        streamProject(project);
    }
}
 
開發者ID:iChun,項目名稱:Tabula,代碼行數:26,代碼來源:Mainframe.java

示例3: setGroupVisibility

import me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo; //導入方法依賴的package包/類
public void setGroupVisibility(String projIdent, String groupIdent, boolean hidden)
{
    for(ProjectInfo info : projects)
    {
        if(info.identifier.equals(projIdent))
        {
            CubeGroup group = (CubeGroup)info.getObjectByIdent(groupIdent);

            if(group != null)
            {
                group.hidden = hidden;
            }

            streamProject(info);
        }
    }
}
 
開發者ID:iChun,項目名稱:Tabula,代碼行數:18,代碼來源:Mainframe.java

示例4: dragOnto

import me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo; //導入方法依賴的package包/類
public void dragOnto(String projIdent, String draggedOntoIdent, String draggedIdent)
{
    for(ProjectInfo info : projects)
    {
        if(info.identifier.equals(projIdent))
        {
            Object draggedOnto = info.getObjectByIdent(draggedOntoIdent);
            Object dragged = info.getObjectByIdent(draggedIdent);

            //HANDLE.
            //Cube on Group
            if(dragged instanceof CubeInfo && draggedOnto instanceof CubeGroup && !((CubeGroup)draggedOnto).cubes.contains(dragged))
            {
                ((CubeGroup)draggedOnto).cubes.add((CubeInfo)dragged);
            }
            //Group on Group
            else if(dragged instanceof CubeGroup && draggedOnto instanceof CubeGroup && !((CubeGroup)draggedOnto).cubeGroups.contains(dragged))
            {
                ((CubeGroup)draggedOnto).cubeGroups.add((CubeGroup)dragged);
            }
            //Cube on Cube
            else if(dragged instanceof CubeInfo && draggedOnto instanceof CubeInfo && !((CubeInfo)draggedOnto).getChildren().contains(dragged))
            {
                if(((CubeInfo)draggedOnto).parentIdentifier != null && ((CubeInfo)draggedOnto).parentIdentifier.equals(((CubeInfo)dragged).identifier))
                {
                    ((CubeInfo)dragged).removeChild((CubeInfo)draggedOnto);
                    childProtectiveServices(info, null, draggedOnto);
                }
                ((CubeInfo)draggedOnto).addChild((CubeInfo)dragged);
            }
            childProtectiveServices(info, draggedOnto, dragged);

            streamProject(info);
        }
    }
}
 
開發者ID:iChun,項目名稱:Tabula,代碼行數:37,代碼來源:Mainframe.java


注:本文中的me.ichun.mods.ichunutil.common.module.tabula.project.ProjectInfo.getObjectByIdent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。