tn5250j/src/org/tn5250j Gui5250Frame.java,1.27,1.28
"Kenneth J. Pouncey" <[email protected]> Fri, 08 Jul 2005 06:08:04 +0000
| Newsgroups | gmane.comp.java.tn5250j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24344/src/org/tn5250j
Modified Files:
Gui5250Frame.java
Log Message:
Show last view changes and scrolling of tabs with mouse wheel
Index: Gui5250Frame.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Gui5250Frame.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Gui5250Frame.java 16 Jun 2005 04:41:17 -0000 1.27
--- Gui5250Frame.java 8 Jul 2005 06:08:02 -0000 1.28
***************
*** 53,57 ****
BorderLayout borderLayout1 = new BorderLayout();
- // JTabbedPane sessionPane = new JTabbedPane();
TN5250jTabbedPane sessionPane = new TN5250jTabbedPane();
private int selectedIndex = 0;
--- 53,56 ----
***************
*** 82,107 ****
frameSeq = sequence++;
-
- // try
- // {
- // ClassLoader loader = Gui5250Frame.class.getClassLoader();
- // if (loader == null)
- // loader = ClassLoader.getSystemClassLoader();
- //
- // Class tabClass;
- // Constructor keyProcessorConstructor;
- //
- // try {
- // String className = "org.tn5250j.gui.TN5250jTabbedPane";
- // if (!OperatingSystem.hasJava14())
- // className += "13";
- //
- // tabClass = loader.loadClass(className);
- // tabConstructor = tabkeyProcessorClass.getConstructor(null);
- // Object obj = keyProcessorConstructor.newInstance(null);
- // }
- // catch (Throwable t) {
- // }
-
sessionPane.setBorder(BorderFactory.createEtchedBorder());
sessionPane.setBounds(new Rectangle(78, 57, 5, 5));
--- 81,84 ----
***************
*** 123,127 ****
}
! if (count == 0) setSessionTitle();
if (packFrame)
--- 100,105 ----
}
! if (count == 0)
! setSessionTitle();
if (packFrame)
***************
*** 189,193 ****
final int index = sessionPane.getSelectedIndex();
sessionPane.setForegroundAt(index,Color.black);
- // sessionPane.setIconAt(index,unfocused);
sessionPane.setIconAt(unfocused,index);
--- 167,170 ----
***************
*** 199,203 ****
sessionPane.setSelectedIndex(++index1);
sessionPane.setForegroundAt(index1,Color.blue);
- // sessionPane.setIconAt(index1,focused);
sessionPane.setIconAt(focused,index1);
--- 176,179 ----
***************
*** 206,210 ****
sessionPane.setSelectedIndex(0);
sessionPane.setForegroundAt(0,Color.blue);
- // sessionPane.setIconAt(0,focused);
sessionPane.setIconAt(focused,0);
--- 182,185 ----
***************
*** 223,227 ****
final int index = sessionPane.getSelectedIndex();
sessionPane.setForegroundAt(index,Color.black);
- // sessionPane.setIconAt(index,unfocused);
sessionPane.setIconAt(unfocused,index);
--- 198,201 ----
***************
*** 232,236 ****
sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1);
sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue);
- // sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused);
sessionPane.setIconAt(focused,sessionPane.getSelectedIndex());
--- 206,209 ----
***************
*** 239,243 ****
sessionPane.setSelectedIndex(--index1);
sessionPane.setForegroundAt(index1,Color.blue);
- // sessionPane.setIconAt(index1,focused);
sessionPane.setIconAt(focused,index1);
--- 212,215 ----
***************
*** 252,260 ****
public void stateChanged(ChangeEvent e) {
- // JTabbedPane p = (JTabbedPane)e.getSource();
TN5250jTabbedPane p = (TN5250jTabbedPane)e.getSource();
p.setForegroundAt(selectedIndex,Color.black);
- // p.setIconAt(selectedIndex,unfocused);
p.setIconAt(unfocused,selectedIndex);
--- 224,230 ----
***************
*** 272,276 ****
selectedIndex = p.getSelectedIndex();
p.setForegroundAt(selectedIndex,Color.blue);
- // p.setIconAt(selectedIndex,focused);
p.setIconAt(focused,selectedIndex);
--- 242,245 ----
***************
*** 333,338 ****
}
- //ses = (Session)(this.getContentPane().getComponent(0));
- // sessionPane.addTab(tabText,focused,ses);
sessionPane.addTab(tabText,ses,focused);
final SessionGUI finalSession = ses;
--- 302,305 ----
***************
*** 363,376 ****
}
- // sessionPane.addTab(tabText,focused,session);
sessionPane.addTab(tabText,session,focused);
sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.black);
- // sessionPane.setIconAt(sessionPane.getSelectedIndex(),unfocused);
sessionPane.setIconAt(unfocused,sessionPane.getSelectedIndex());
sessionPane.setSelectedIndex(sessionPane.getTabCount()-1);
sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue);
- // sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused);
sessionPane.setIconAt(focused,sessionPane.getSelectedIndex());
--- 330,340 ----
***************
*** 414,421 ****
! if (index < tabs) {
sessionPane.setSelectedIndex(index);
sessionPane.setForegroundAt(index,Color.blue);
- // sessionPane.setIconAt(index,focused);
sessionPane.setIconAt(focused,index);
((SessionGUI)sessionPane.getComponentAt(index)).requestFocus();
--- 378,384 ----
! if (tabs > 0 && index <= tabs) {
sessionPane.setSelectedIndex(index);
sessionPane.setForegroundAt(index,Color.blue);
sessionPane.setIconAt(focused,index);
((SessionGUI)sessionPane.getComponentAt(index)).requestFocus();
***************
*** 426,430 ****
sessionPane.setSelectedIndex(0);
sessionPane.setForegroundAt(0,Color.blue);
- // sessionPane.setIconAt(0,focused);
sessionPane.setIconAt(focused,0);
((SessionGUI)sessionPane.getComponentAt(0)).requestFocus();
--- 389,392 ----
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar