tn5250j/src/org/tn5250j My5250.java,1.32,1.33 Gui5250Frame.java,1.14,1.15 TN5250jConstants.java,1.46,1.47 Gui5250.java,1.47,1.48

[email protected]
Newsgroups gmane.comp.java.tn5250j.cvs
Message-ID <[email protected]>
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j
In directory sc8-pr-cvs1:/tmp/cvs-serv6373/src/org/tn5250j

Modified Files:
	My5250.java Gui5250Frame.java TN5250jConstants.java 
	Gui5250.java 
Log Message:
Added Kunststoff LOOK&FEEL [patrick]
Added Shortcut-key to Spool-Exporter [kenneth]

Index: My5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/My5250.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** My5250.java	11 Nov 2003 13:11:31 -0000	1.32
--- My5250.java	24 Nov 2003 12:22:30 -0000	1.33
***************
*** 30,33 ****
--- 30,34 ----
  import javax.swing.UIManager;
  import javax.swing.*;
+ 
  import java.awt.*;
  import java.net.*;
***************
*** 64,70 ****
  
        try  {
!          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
        catch(Exception e) {
        }
  
--- 65,87 ----
  
        try  {
! 		UIManager.setLookAndFeel(
! 			"com.incors.plaf.kunststoff.KunststoffLookAndFeel");
        }
        catch(Exception e) {
+       	  try {
+ 			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ 		} catch (ClassNotFoundException e1) {
+ 			// TODO Auto-generated catch block
+ 			e1.printStackTrace();
+ 		} catch (InstantiationException e1) {
+ 			// TODO Auto-generated catch block
+ 			e1.printStackTrace();
+ 		} catch (IllegalAccessException e1) {
+ 			// TODO Auto-generated catch block
+ 			e1.printStackTrace();
+ 		} catch (UnsupportedLookAndFeelException e1) {
+ 			// TODO Auto-generated catch block
+ 			e1.printStackTrace();
+ 		}
        }
  

Index: Gui5250Frame.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Gui5250Frame.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Gui5250Frame.java	9 Jul 2003 18:55:39 -0000	1.14
--- Gui5250Frame.java	24 Nov 2003 12:22:30 -0000	1.15
***************
*** 68,76 ****
        this.getContentPane().setLayout(borderLayout1);
  
-       if (sequence > 0)
-          setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
-       else
-          setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
- 
        // update the frame sequences
        frameSeq = sequence++;
--- 68,71 ----
***************
*** 82,85 ****
--- 77,82 ----
        sessionPane.setDoubleBuffered(false);
  
+       sessionPane.addChangeListener(this);
+ 
        Properties props = GlobalConfigure.getInstance().
                             getProperties(GlobalConfigure.SESSIONS);
***************
*** 90,96 ****
        if (!hideTabBar) {
           this.getContentPane().add(sessionPane, BorderLayout.CENTER);
-          sessionPane.addChangeListener(this);
        }
  
        if (packFrame)
           pack();
--- 87,94 ----
        if (!hideTabBar) {
           this.getContentPane().add(sessionPane, BorderLayout.CENTER);
        }
  
+       setTitle();
+ 
        if (packFrame)
           pack();
***************
*** 154,174 ****
     private void nextSession() {
  
!       int index = sessionPane.getSelectedIndex();
        sessionPane.setForegroundAt(index,Color.black);
        sessionPane.setIconAt(index,unfocused);
  
-       if (index < sessionPane.getTabCount() - 1) {
-          sessionPane.setSelectedIndex(++index);
-          sessionPane.setForegroundAt(index,Color.blue);
-          sessionPane.setIconAt(index,focused);
  
!       }
!       else {
!          sessionPane.setSelectedIndex(0);
!          sessionPane.setForegroundAt(0,Color.blue);
!          sessionPane.setIconAt(0,focused);
  
!       }
!       ((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
  
     }
--- 152,179 ----
     private void nextSession() {
  
!       final int index = sessionPane.getSelectedIndex();
        sessionPane.setForegroundAt(index,Color.black);
        sessionPane.setIconAt(index,unfocused);
  
  
!       SwingUtilities.invokeLater(new Runnable() {
!          public void run() {
!             int index1 = index;
!             if (index1 < sessionPane.getTabCount() - 1) {
!                sessionPane.setSelectedIndex(++index1);
!                sessionPane.setForegroundAt(index1,Color.blue);
!                sessionPane.setIconAt(index1,focused);
  
!             }
!             else {
!                sessionPane.setSelectedIndex(0);
!                sessionPane.setForegroundAt(0,Color.blue);
!                sessionPane.setIconAt(0,focused);
! 
!             }
!             ((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
!             setTitle();
!        }
!       });
  
     }
***************
*** 176,197 ****
     private void prevSession() {
  
!       int index = sessionPane.getSelectedIndex();
        sessionPane.setForegroundAt(index,Color.black);
        sessionPane.setIconAt(index,unfocused);
  
!       if (index == 0) {
!          sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1);
!          sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue);
!          sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused);
  
!       }
!       else {
!          sessionPane.setSelectedIndex(--index);
!          sessionPane.setForegroundAt(index,Color.blue);
!          sessionPane.setIconAt(index,focused);
  
!       }
  
!       ((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
     }
  
--- 181,208 ----
     private void prevSession() {
  
!       final int index = sessionPane.getSelectedIndex();
        sessionPane.setForegroundAt(index,Color.black);
        sessionPane.setIconAt(index,unfocused);
  
!       SwingUtilities.invokeLater(new Runnable() {
!          public void run() {
!             int index1 = index;
!             if (index1 == 0) {
!                sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1);
!                sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue);
!                sessionPane.setIconAt(sessionPane.getSelectedIndex(),focused);
  
!             }
!             else {
!                sessionPane.setSelectedIndex(--index1);
!                sessionPane.setForegroundAt(index1,Color.blue);
!                sessionPane.setIconAt(index1,focused);
  
!             }
  
!             ((Session)sessionPane.getComponent(sessionPane.getSelectedIndex())).grabFocus();
!             setTitle();
!        }
!       });
     }
  
***************
*** 220,223 ****
--- 231,247 ----
     }
  
+    private void setTitle() {
+ 
+       if (sequence - 1 > 0)
+          setTitle("tn5250j <" + sequence + "> - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
+       else
+          setTitle("tn5250j - " + tn5250jRelease + tn5250jVersion + tn5250jSubVer);
+ 
+       if (getSessionAt(selectedIndex) != null &&
+                   getSessionAt(selectedIndex).getAllocDeviceName() != null)
+          setTitle(getTitle() + " - " + getSessionAt(selectedIndex).getAllocDeviceName());
+ 
+    }
+ 
     public void addSessionView(String tabText,Session sessionView) {
  
***************
*** 227,230 ****
--- 251,255 ----
  
           this.getContentPane().add(session, BorderLayout.CENTER);
+          session.addSessionListener(this);
  
           session.resizeMe();
***************
*** 236,239 ****
--- 261,265 ----
           embedded = true;
           session.grabFocus();
+          setTitle();
        }
        else {
***************
*** 249,252 ****
--- 275,279 ----
                 }
              }
+ 
              //ses = (Session)(this.getContentPane().getComponent(0));
              sessionPane.addTab(tabText,focused,ses);
***************
*** 367,372 ****
           return null;
        }
!       else
           return (Session)sessionPane.getComponentAt(index);
     }
  
--- 394,402 ----
           return null;
        }
!       else {
!          if (sessionPane.getTabCount() <= 0)
!             return null;
           return (Session)sessionPane.getComponentAt(index);
+       }
     }
  
***************
*** 382,391 ****
                 System.out.println(changeEvent.getState() + " " + d);
                 final int index = sessionPane.indexOfComponent(ses);
!                Runnable tc = new Runnable () {
!                   public void run() {
!                      sessionPane.setTitleAt(index,d);
!                   }
!                };
!                SwingUtilities.invokeLater(tc);
  
              }
--- 412,424 ----
                 System.out.println(changeEvent.getState() + " " + d);
                 final int index = sessionPane.indexOfComponent(ses);
!                if (index >= 0) {
!                   Runnable tc = new Runnable () {
!                      public void run() {
!                         sessionPane.setTitleAt(index,d);
!                      }
!                   };
!                   SwingUtilities.invokeLater(tc);
!                }
!                setTitle();
  
              }

Index: TN5250jConstants.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/TN5250jConstants.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** TN5250jConstants.java	17 Jun 2003 06:36:07 -0000	1.46
--- TN5250jConstants.java	24 Nov 2003 12:22:30 -0000	1.47
***************
*** 197,201 ****
          "[opennew]","[togcon]","[hotspots]","[gui]","[dspmsgs]",
          "[dspattr]","[print]","[cursor]","[debug]","[close]",
!         "[transfer]","[e-mail]","[runscript]"
     };
  
--- 197,201 ----
          "[opennew]","[togcon]","[hotspots]","[gui]","[dspmsgs]",
          "[dspattr]","[print]","[cursor]","[debug]","[close]",
!         "[transfer]","[e-mail]","[runscript]","[spoolfile]"
     };
  
***************
*** 219,223 ****
          5002, 5003, 5004, 5005, 5006,
          5007, 5008, 5009, 5010, 5011,
!         5012, 5013, 5014
     };
  
--- 219,223 ----
          5002, 5003, 5004, 5005, 5006,
          5007, 5008, 5009, 5010, 5011,
!         5012, 5013, 5014, 5015
     };
  
***************
*** 313,316 ****
--- 313,317 ----
     public static final String MNEMONIC_FILE_TRANSFER   =  "[transfer]";
     public static final String MNEMONIC_RUN_SCRIPT   =  "[runscript]";
+    public static final String MNEMONIC_SPOOL_FILE   =  "[spoolfile]";
  
  

Index: Gui5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Gui5250.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** Gui5250.java	11 Nov 2003 08:36:34 -0000	1.47
--- Gui5250.java	24 Nov 2003 12:22:30 -0000	1.48
***************
*** 1029,1033 ****
     }
  
!    private void doMeSpool() {
  
        try {
--- 1029,1033 ----
     }
  
!    public void doMeSpool() {
  
        try {




-------------------------------------------------------
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.