tn5250j/src/org/tn5250j Session5250.java,1.1,1.2

"Kenneth J. Pouncey" <[email protected]> Mon, 26 Jul 2004 19:29:17 +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-serv13227/src/org/tn5250j

Modified Files:
	Session5250.java 
Log Message:
Added tn5250 package to framework to start work on the interfaces

Index: Session5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Session5250.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Session5250.java	22 Jul 2004 04:55:29 -0000	1.1
--- Session5250.java	26 Jul 2004 19:29:14 -0000	1.2
***************
*** 28,31 ****
--- 28,33 ----
  import org.tn5250j.event.SessionChangeEvent;
  import org.tn5250j.interfaces.ScanListener;
+ import org.tn5250j.framework.tn5250.Screen5250;
+ import org.tn5250j.framework.tn5250.tnvt;
  
  /**
***************
*** 42,47 ****
     private SessionChangeEvent sce;
     private String sslType;
-    private boolean firstScreen;
-    private char[] signonSave;
     private boolean heartBeat;
     String propFileName;
--- 44,47 ----
***************
*** 59,63 ****
                       SessionConfig config) {
  
- //      super(config);
        propFileName = config.getConfigurationResource();
  
--- 59,62 ----
***************
*** 71,75 ****
           heartBeat = true;
  
!       screen = new Screen5250(sesConfig);
        screen.setVT(vt);
  
--- 70,75 ----
           heartBeat = true;
  
!       screen = new Screen5250();
! 
        screen.setVT(vt);
  
***************
*** 101,104 ****
--- 101,108 ----
     }
  
+    public Properties getConnectionProperties() {
+       return sesProps;
+    }
+ 
     public void setGUI (SessionGUI gui) {
        guiComponent = gui;
***************
*** 108,150 ****
        return guiComponent;
     }
- //      public boolean isOnSignOnScreen() {
- //
- //         // check to see if we should check.
- //         if (firstScreen) {
- //
- //            char[] so = screen.getScreenAsChars();
- //            int size = signonSave.length;
- //
- //            Rectangle region = super.sesConfig.getRectangleProperty("signOnRegion");
- //
- //            int fromRow = region.x;
- //            int fromCol = region.y;
- //            int toRow = region.width;
- //            int toCol = region.height;
- //
- //            // make sure we are within range.
- //            if (fromRow == 0)
- //               fromRow = 1;
- //            if (fromCol == 0)
- //               fromCol = 1;
- //            if (toRow == 0)
- //               toRow = 24;
- //            if (toCol == 0)
- //               toCol = 80;
- //
- //            int pos = 0;
- //
- //            for (int r = fromRow; r <= toRow; r++)
- //               for (int c =fromCol;c <= toCol; c++) {
- //                  pos = screen.getPos(r - 1, c - 1);
- //   //               System.out.println(signonSave[pos]);
- //                  if (signonSave[pos] != so[pos])
- //                     return false;
- //               }
- //         }
- //
- //         return true;
- //      }
- 
     public String getSessionName() {
        return sessionName;
--- 112,115 ----
***************
*** 187,194 ****
              support132 = true;
  
!       final tnvt vt = new tnvt(screen,enhanced,support132);
        setVT(vt);
  
!       vt.setController(this);
  
        if (sesProps.containsKey(SESSION_PROXY_PORT))
--- 152,159 ----
              support132 = true;
  
!       final tnvt vt = new tnvt(this,screen,enhanced,support132);
        setVT(vt);
  
! //      vt.setController(this);
  
        if (sesProps.containsKey(SESSION_PROXY_PORT))
***************
*** 240,244 ****
        ct.setDaemon(true);
        ct.start();
- //      addSessionListener(this);
  
     }
--- 205,208 ----
***************
*** 321,325 ****
      * @see scanned(String,String)
      */
!   protected void scanned(String command, String remainder)
    {
      if (scanListener != null)
--- 285,289 ----
      * @see scanned(String,String)
      */
!   public void scanned(String command, String remainder)
    {
      if (scanListener != null)
***************
*** 342,361 ****
      * @param state  The state change property object.
      */
!    protected void fireSessionChanged(int state) {
! 
!       switch (state) {
! 
!          case TN5250jConstants.STATE_CONNECTED:
!             if (!firstScreen) {
!                firstScreen = true;
!                signonSave = screen.getScreenAsChars();
! //               System.out.println("Signon saved");
!             }
!             break;
!          default:
!             firstScreen = false;
!             signonSave = null;
! 
!       }
  
        if (listeners != null) {
--- 306,310 ----
      * @param state  The state change property object.
      */
!    public void fireSessionChanged(int state) {
  
        if (listeners != null) {



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click