&& newState instanceof IActionState) {
child.setElementParent(newState);
}
else if (child.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION
&& newState instanceof IViewState) {
IViewState state = (IViewState) newState;
if (state.getRenderActions() == null) {
RenderActions entry = new RenderActions();
entry.createNew(state);
state.setRenderActions(entry);
}
child.setElementParent(state.getRenderActions());
}
else if (child.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION
&& newState instanceof IState) {
IState state = (IState) newState;
if (state.getEntryActions() == null) {
EntryActions entry = new EntryActions();
entry.createNew(state);
state.setEntryActions(entry);
}
child.setElementParent(state.getEntryActions());
}
else if (child.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION
&& newState instanceof IState) {
IState state = (IState) newState;
if (state.getExitActions() == null) {
ExitActions entry = new ExitActions();
entry.createNew(state);
state.setExitActions(entry);
}
child.setElementParent(state.getExitActions());
}
if (child.getElementParent() instanceof IEntryActions) {
((IEntryActions) child.getElementParent()).addEntryAction(child);
}