Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j
In directory sc8-pr-cvs1:/tmp/cvs-serv7845/src/org/tn5250j
Modified Files:
Gui5250Frame.java
Log Message:
Update related to send screen through email + fix for the title and the
focus-problem when starting new session.
Index: Gui5250Frame.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Gui5250Frame.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Gui5250Frame.java 24 Nov 2003 14:18:08 -0000 1.16
--- Gui5250Frame.java 28 Nov 2003 13:21:03 -0000 1.17
***************
*** 50,53 ****
--- 50,54 ----
private boolean embedded = false;
private boolean hideTabBar = false;
+ public static int count = 0;
//Construct the frame
***************
*** 89,93 ****
}
! setTitle();
if (packFrame)
--- 90,94 ----
}
! if (count == 0) setSessionTitle();
if (packFrame)
***************
*** 173,177 ****
}
((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
! setTitle();
}
});
--- 174,178 ----
}
((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
! setSessionTitle();
}
});
***************
*** 202,206 ****
((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
! setTitle();
}
});
--- 203,207 ----
((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
! setSessionTitle();
}
});
***************
*** 229,247 ****
p.setIconAt(selectedIndex,focused);
! setTitle();
}
! private void setTitle() {
! if (getSessionAt(selectedIndex) != null &&
! getSessionAt(selectedIndex).getAllocDeviceName() != null)
! setTitle(getSessionAt(selectedIndex).getAllocDeviceName());
! if (sequence - 1 > 0)
! setTitle(getTitle() + " - tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
! else
! setTitle(getTitle() + " - tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
}
--- 230,256 ----
p.setIconAt(selectedIndex,focused);
! setSessionTitle();
}
! private void setSessionTitle() {
! Session ses = getSessionAt(selectedIndex);
! if (ses != null && ses.getAllocDeviceName() != null && ses.isConnected()) {
! if (sequence - 1 > 0)
! setTitle(ses.getAllocDeviceName() + " - tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
! else
! setTitle(ses.getAllocDeviceName() + " - tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
! }
! else {
!
! if (sequence - 1 > 0)
! setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
! else
! setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
! }
+ count +=1;
}
***************
*** 264,268 ****
embedded = true;
session.grabFocus();
! setTitle();
}
else {
--- 273,277 ----
embedded = true;
session.grabFocus();
! setSessionTitle();
}
else {
***************
*** 423,427 ****
SwingUtilities.invokeLater(tc);
}
! setTitle();
}
--- 432,436 ----
SwingUtilities.invokeLater(tc);
}
! setSessionTitle();
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.