Update of /cvsroot/javanetsim/javaNetSim/guiUI
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15817/guiUI
Modified Files:
MainScreen.java
Log Message:
Index: MainScreen.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** MainScreen.java 12 Oct 2006 17:26:26 -0000 1.45
--- MainScreen.java 12 Oct 2006 17:38:41 -0000 1.46
***************
*** 2356,2377 ****
public void ShowHubState(String InNodeName){
! int state = Sim.getState(InNodeName);
!
! if(state==-1){
JOptionPane.showMessageDialog(this,"There are currently no node's within the simulation","Warning!",JOptionPane.WARNING_MESSAGE);
! }else if(state==0){
JOptionPane.showMessageDialog(this,"Device state: normal",InNodeName + ": device state",JOptionPane.INFORMATION_MESSAGE);
! }else if(state==1){
JOptionPane.showMessageDialog(this,"Device state: freezed","Warning! "+ InNodeName + ": device state",JOptionPane.WARNING_MESSAGE);
!
}
!
}
--- 2356,2400 ----
public void ShowHubState(String InNodeName){
! int state = Sim.getState(InNodeName);
!
! try{
! if(Sim.getNode(InNodeName) instanceof core.Switch){
!
! String cache = Sim.getCache(InNodeName);
!
! if(state==-1){
! JOptionPane.showMessageDialog(this,"There are currently no node's within the simulation","Warning!",JOptionPane.WARNING_MESSAGE);
! }else if(state==0){
!
! JOptionPane.showMessageDialog(this,"Device state: normal\n\nSwitch cache:\n-----------\n" + cache,InNodeName + ": device state",JOptionPane.INFORMATION_MESSAGE);
!
! }else if(state==1){
!
! JOptionPane.showMessageDialog(this,"Device state: freezed","Warning! "+ InNodeName + ": device state",JOptionPane.WARNING_MESSAGE);
!
! }
!
! }else{
!
! if(state==-1){
JOptionPane.showMessageDialog(this,"There are currently no node's within the simulation","Warning!",JOptionPane.WARNING_MESSAGE);
! }else if(state==0){
JOptionPane.showMessageDialog(this,"Device state: normal",InNodeName + ": device state",JOptionPane.INFORMATION_MESSAGE);
! }else if(state==1){
JOptionPane.showMessageDialog(this,"Device state: freezed","Warning! "+ InNodeName + ": device state",JOptionPane.WARNING_MESSAGE);
! }
}
! }catch(Exception e){
!
! JOptionPane.showMessageDialog(this,"There are currently no node's within the simulation","Warning!",JOptionPane.WARNING_MESSAGE);
!
! }
}
|