tn5250j/src/org/tn5250j GuiGraphicBuffer.java,1.19,1.20 ScreenOIA.java,1.1,1.2 tnvt.java,1.45,1.46 Screen5250.java,1.63,1.64

"Kenneth J. Pouncey" <[email protected]> Mon, 05 Jul 2004 18:59:10 +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-serv13423/src/org/tn5250j

Modified Files:
	GuiGraphicBuffer.java ScreenOIA.java tnvt.java Screen5250.java 
Log Message:
First part of headless the OIA

Index: ScreenOIA.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/ScreenOIA.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScreenOIA.java	5 Jul 2004 16:45:28 -0000	1.1
--- ScreenOIA.java	5 Jul 2004 18:59:08 -0000	1.2
***************
*** 231,235 ****
        inhibitedText = message;
  
!       if (saveInhibit != inhibit || saveInhibitLevel != whatCode) {
           switch(inhibit) {
  
--- 231,235 ----
        inhibitedText = message;
  
! //      if (saveInhibit != inhibit || saveInhibitLevel != whatCode) {
           switch(inhibit) {
  
***************
*** 254,258 ****
           saveInhibitLevel = level;
           fireOIAChanged();
!       }
     }
  
--- 254,258 ----
           saveInhibitLevel = level;
           fireOIAChanged();
! //      }
     }
  

Index: tnvt.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/tnvt.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** tnvt.java	5 Jul 2004 17:01:03 -0000	1.45
--- tnvt.java	5 Jul 2004 18:59:08 -0000	1.46
***************
*** 1,4 ****
- 
- 
  /**
   * Title: tn5250J Copyright: Copyright (c) 2001 Company:
--- 1,2 ----

Index: GuiGraphicBuffer.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/GuiGraphicBuffer.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** GuiGraphicBuffer.java	5 Jul 2004 18:22:36 -0000	1.19
--- GuiGraphicBuffer.java	5 Jul 2004 18:59:08 -0000	1.20
***************
*** 125,137 ****
      * Draw the operator information area
      */
!    public Graphics2D drawOIA (int fmWidth,
!                            int fmHeight,
!                            int numRows,
!                            int numCols,
!                            Font font,
!                            Color colorBg,
!                            Color colorBlue
!                            ) {
  
           Graphics2D g2d;
  
--- 125,133 ----
      * Draw the operator information area
      */
!       public Graphics2D drawOIA () {
  
+       	int numRows = screen.getRows();
+       	int numCols = screen.getCols();
+       	
           Graphics2D g2d;
  
***************
*** 146,171 ****
           g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
                 RenderingHints.VALUE_RENDER_SPEED);
!          g2d.setFont(font);
  
  
!          g2d.setColor(colorBg);
           g2d.fillRect(0,0,bi.getWidth(null),bi.getHeight(null));
!          tArea.setRect(0,0,bi.getWidth(null),(fmHeight * (numRows)));
!          cArea.setRect(0,fmHeight * (numRows + 1),bi.getWidth(null),fmHeight * (numRows + 1));
           aArea.setRect(0,0,bi.getWidth(null),bi.getHeight(null));
!          sArea.setRect(fmWidth * 9,fmHeight * (numRows + 1),fmWidth * 20,fmHeight);
!          pArea.setRect(bi.getWidth(null) - fmWidth * 6,fmHeight * (numRows + 1),fmWidth * 6,fmHeight);
!          mArea.setRect((float)(sArea.getX()+ sArea.getWidth()) + fmWidth + fmWidth,
!                                        fmHeight * (numRows + 1),
!                                        fmWidth + fmWidth,
!                                        fmHeight);
!          kbArea.setRect((float)(sArea.getX()+ sArea.getWidth()) + (20 * fmWidth),
!                                        fmHeight * (numRows + 1),
!                                        fmWidth + fmWidth,
!                                        fmHeight);
!          scriptArea.setRect((float)(sArea.getX()+ sArea.getWidth()) + (16 * fmWidth),
!                                        fmHeight * (numRows + 1),
!                                        fmWidth + fmWidth,
!                                        fmHeight);
  //         cArea = new Rectangle2D.Float(0,fmHeight * (numRows + 1),bi.getWidth(null),fmHeight * (numRows + 1));
  //         aArea = new Rectangle2D.Float(0,0,bi.getWidth(null),bi.getHeight(null));
--- 142,167 ----
           g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
                 RenderingHints.VALUE_RENDER_SPEED);
!          g2d.setFont(screen.font);
  
  
!          g2d.setColor(screen.colorBg);
           g2d.fillRect(0,0,bi.getWidth(null),bi.getHeight(null));
!          tArea.setRect(0,0,bi.getWidth(null),(screen.fmHeight * (numRows)));
!          cArea.setRect(0,screen.fmHeight * (numRows + 1),bi.getWidth(null),screen.fmHeight * (numRows + 1));
           aArea.setRect(0,0,bi.getWidth(null),bi.getHeight(null));
!          sArea.setRect(screen.fmWidth * 9,screen.fmHeight * (numRows + 1),screen.fmWidth * 20,screen.fmHeight);
!          pArea.setRect(bi.getWidth(null) - screen.fmWidth * 6,screen.fmHeight * (numRows + 1),screen.fmWidth * 6,screen.fmHeight);
!          mArea.setRect((float)(sArea.getX()+ sArea.getWidth()) + screen.fmWidth + screen.fmWidth,
!                screen.fmHeight * (numRows + 1),
!                screen.fmWidth + screen.fmWidth,
!                screen.fmHeight);
!          kbArea.setRect((float)(sArea.getX()+ sArea.getWidth()) + (20 * screen.fmWidth),
!                screen.fmHeight * (numRows + 1),
!                screen.fmWidth + screen.fmWidth,
!                screen.fmHeight);
!          scriptArea.setRect((float)(sArea.getX()+ sArea.getWidth()) + (16 * screen.fmWidth),
!                screen.fmHeight * (numRows + 1),
!                screen.fmWidth + screen.fmWidth,
!                screen.fmHeight);
  //         cArea = new Rectangle2D.Float(0,fmHeight * (numRows + 1),bi.getWidth(null),fmHeight * (numRows + 1));
  //         aArea = new Rectangle2D.Float(0,0,bi.getWidth(null),bi.getHeight(null));
***************
*** 178,186 ****
  
           separatorLine.setLine(0,
!                (fmHeight * (numRows + 1)) - (fmHeight / 2),
                 bi.getWidth(null),
!                (fmHeight * (numRows + 1)) - (fmHeight / 2));
  
!          g2d.setColor(colorBlue);
           g2d.draw(separatorLine);
  
--- 174,182 ----
  
           separatorLine.setLine(0,
!                (screen.fmHeight * (numRows + 1)) - (screen.fmHeight / 2),
                 bi.getWidth(null),
!                (screen.fmHeight * (numRows + 1)) - (screen.fmHeight / 2));
  
!          g2d.setColor(screen.colorBlue);
           g2d.draw(separatorLine);
  
***************
*** 297,301 ****
     }
  
!    public void drawScriptRunning(Color color) {
  
        Graphics2D g2d;
--- 293,297 ----
     }
  
!    private void drawScriptRunning(Color color) {
  
        Graphics2D g2d;
***************
*** 327,331 ****
     }
  
!    public void eraseScriptRunning(Color color) {
  
        Graphics2D g2d;
--- 323,327 ----
     }
  
!    private void eraseScriptRunning(Color color) {
  
        Graphics2D g2d;
***************
*** 463,520 ****
     }
  
-    public void setStatus(byte attr,byte value,String s,
-                            int fmWidth,
-                            int fmHeight,
-                            LineMetrics lm,
-                            Font font,
-                            Color colorBg,
-                            Color colorRed,
-                            Color colorWhite) {
- 
-       Graphics2D g2d = getWritingArea(font);
- 
-       if (g2d == null)
-          return;
- 
-       try {
-          g2d.setColor(colorBg);
-          g2d.fill(sArea);
- 
-          float Y = ((int)sArea.getY() + fmHeight)- (lm.getLeading() + lm.getDescent());
-          switch (attr) {
- 
-             case STATUS_SYSTEM:
-                if (value == STATUS_VALUE_ON) {
-                   g2d.setColor(colorWhite);
- 
-                   if (s != null)
-                      g2d.drawString(s,(float)sArea.getX(),Y);
-                   else
-                      g2d.drawString(xSystem,(float)sArea.getX(),Y);
-                }
-                break;
-             case STATUS_ERROR_CODE:
-                if (value == STATUS_VALUE_ON) {
-                   g2d.setColor(colorRed);
- 
-                   if (s != null)
-                      g2d.drawString(s,(float)sArea.getX(),Y);
-                   else
-                      g2d.drawString(xError,(float)sArea.getX(),Y);
- 
-                }
-                break;
- 
-          }
-          g2d.dispose();
-       }
-       catch (Exception e) {
- 
-          log.warn(" gui graphics setStatus " + e.getMessage());
- 
-       }
-    }
- 
- //   public void setStatus(byte attr,byte value,String s) {
     public void setStatus(ScreenOIA oia) {
  
--- 459,462 ----
***************
*** 627,633 ****
              setStatus(changedOIA);
              break;
- 		// draw the status information
- //		bi.setStatus(attr, value, s, fmWidth, fmHeight, lm, font, colorBg,
- //				colorRed, colorWhite);
  
        }
--- 569,572 ----

Index: Screen5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Screen5250.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** Screen5250.java	5 Jul 2004 18:22:36 -0000	1.63
--- Screen5250.java	5 Jul 2004 18:59:08 -0000	1.64
***************
*** 784,789 ****
  				screen[y].setAttribute(screen[y].getCharAttr());
  			}
! 			bi.drawOIA(fmWidth, fmHeight, numRows, numCols, font, colorBg,
! 					colorBlue);
  		}
  		gui.validate();
--- 784,788 ----
  				screen[y].setAttribute(screen[y].getCharAttr());
  			}
! 			bi.drawOIA();
  		}
  		gui.validate();
***************
*** 1795,1798 ****
--- 1794,1798 ----
  		//      }
  		this.keybuf.append(text);
+ 		
  		if (isStatusErrorCode() && !resetRequired) {
  			setCursorActive(false);
***************
*** 4451,4461 ****
  	}
  
! 	public boolean isStatusErrorCode() {
  
! 		return statusErrorCode;
  
  	}
  
! 	public boolean isXSystem() {
  
  		return statusXSystem;
--- 4451,4461 ----
  	}
  
! 	protected boolean isStatusErrorCode() {
  
! 		return oia.getLevel() == ScreenOIA.OIA_LEVEL_INPUT_ERROR;
  
  	}
  
! 	public boolean iisXSystem() {
  
  		return statusXSystem;
***************
*** 4796,4801 ****
  
  		// get ourselves a global pointer to the graphics
! 		g2d = bi.drawOIA(fmWidth, fmHeight, numRows, numCols, font, colorBg,
! 				colorBlue);
  
  		tArea.setRect(bi.getTextArea());
--- 4796,4800 ----
  
  		// get ourselves a global pointer to the graphics
! 		g2d = bi.drawOIA();
  
  		tArea.setRect(bi.getTextArea());



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com