本文整理匯總了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);
}
}
}