use of com.cas.util.vo.BaseVO in project TeachingInSimulation by ScOrPiOzzy.
the class ValveLogic method changeBlockState.
private void changeBlockState(String oldId, String newId) {
BlockState oldBlock = def.getBlockStatesMap().get(oldId);
if (oldBlock != null) {
List<BaseVO<?>> oldBlockList = oldBlock.getChildren();
for (BaseVO<?> baseVO : oldBlockList) {
if (baseVO instanceof BlockRelation) {
BlockRelation relation = (BlockRelation) baseVO;
def.blockRelationRemoved(relation);
G.g().refreshGasPressure();
}
}
}
BlockState newBlock = def.getBlockStatesMap().get(newId);
if (newBlock != null) {
List<BaseVO<?>> newBlockList = newBlock.getChildren();
for (BaseVO<?> baseVO : newBlockList) {
if (baseVO instanceof BlockRelation) {
BlockRelation relation = (BlockRelation) baseVO;
def.blockRelationAdded(relation);
G.g().refreshGasPressure();
}
}
}
}
use of com.cas.util.vo.BaseVO in project TeachingInSimulation by ScOrPiOzzy.
the class ValveLogicEx method changeBlockState.
private void changeBlockState(String oldId, String newId) {
BlockState oldBlock = def.getBlockStatesMap().get(oldId);
if (oldBlock != null) {
List<BaseVO<?>> oldBlockList = oldBlock.getChildren();
for (BaseVO<?> baseVO : oldBlockList) {
if (baseVO instanceof BlockRelation) {
BlockRelation relation = (BlockRelation) baseVO;
def.blockRelationRemoved(relation);
G.g().refreshGasPressure();
}
}
}
BlockState newBlock = def.getBlockStatesMap().get(newId);
if (newBlock != null) {
List<BaseVO<?>> newBlockList = newBlock.getChildren();
for (BaseVO<?> baseVO : newBlockList) {
if (baseVO instanceof BlockRelation) {
BlockRelation relation = (BlockRelation) baseVO;
def.blockRelationAdded(relation);
G.g().refreshGasPressure();
}
}
}
}
Aggregations