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