public void recordState(DialogueState state,String name){
  states.put(name,state);
  if (!listModel.contains(name)) {
    int position=name.contains(CURRENT) ? 0 : Math.min(2,listModel.size());
    listModel.add(position,name);
  }
}

public void recordState ( DialogueState state , String name ) { states . put ( name , state ) ; if ( ! listModel . contains ( name ) ) { int position = name . contains ( CURRENT ) ? 0 : Math . min ( 2 , listModel . size ( ) ) ; listModel . add ( position , name ) ; } }
records a dialogue state in the component and makes it available for display in the network selection list on the left side . the network is associated with a specific name . if the name already exists , the previous network is erased .
