File hren.vs.gzeballo.dif - RJL 981221 THis diff has 34 lines. lechner is a copy of mfernand's code with 96f523 javadoc team additions. Compare to hren.vs.jvinarub.dif (~ 10K lines): jupiter.cs.uml.edu(446)> pwd /usr/proj3/case/97s523/bde2gif/hren/bdejava jupiter.cs.uml.edu(447)> diff . $CASE/96f523/bde2java/lechner/java|wc 334 1223 11371 jupiter.cs.uml.edu(448)> diff . $CASE/96f523/bde2java/lechner/java > hren.vs.gzeballo.dif --------------------------------- Only in .: BitFile.class Only in .: BitUtils.class Only in /usr/proj3/case/96f523/bde2java/lechner/java: CVS Only in .: DataFlowDiagram.dat Only in .: DataFlowDiagramHG000001.gif Only in .: DataFlowDiagramHG000001.ps Only in .: DataFlowHG000001.ps Only in .: DisplayFrame.class Only in .: EndsWithFilter.class Only in .: GIFEncoder.class Only in .: GIFEncoder.java Only in .: GraphBox.class Only in .: ImageDescriptor.class Only in .: LZWCompressor.class Only in .: LZWStringTable.class Only in .: MultiLineLabel.class Only in .: ScreenDescriptor.class Only in .: bde2JavaApplet.class diff -bitw ./bde2JavaApplet.java /usr/proj3/case/96f523/bde2java/lechner/java/bde2JavaApplet.java 376d375 < Only in .: bdeAboutBox.class Only in .: bdeAppletFrame.class diff -bitw ./bdeAppletFrame.java /usr/proj3/case/96f523/bde2java/lechner/java/bdeAppletFrame.java 6,8d5 < < import GIFEncoder; < 10,11d6 < * < *
17,18c12
<  * Modified by: Hua Ren, 97s523, 042797
<  * 
--- > * 35,37d28 < * < * Modified by: Hua Ren, 97s523, 042797 < * 88,90d78 < /* The following menus have been modified and rearranged < * by Hua Ren, 97s523, 042797 < */ 93c81 < Menu fileOpen = new Menu("Open..."); --- > MenuItem fileOpen = new MenuItem("Open..."); 98,110c86,87 < < /* sub menu items of make File */ < fileOpen.add(new MenuItem("Open DATA File...")); < Menu printAsGif = new Menu("Print As GIF..."); < Menu printAsPS = new Menu("Print As PS..."); < filePrint.add(printAsGif); < filePrint.add(printAsPS); < < /* add items to Save As GIF */ < printAsGif.add(new MenuItem("Print Current Graph")); < printAsGif.add(new MenuItem("Print All Graphs")); < printAsPS.add(new MenuItem("Current Graph..")); < printAsPS.add(new MenuItem("All Graphs..")); --- > filePrint.add(new MenuItem("Current Graph..")); > filePrint.add(new MenuItem("All Graphs..")); 175a153,156 > // fileNew.disable(); > // filePrint.disable(); > // fileClose.disable(); > 219,221d199 < * < * Modified by: Hua Ren, 97s523 042797 < * 251c229,231 < /* If "Print As PS" was chosen, call the outputPostScriptFile() function */ --- > /* If "Print" was chosen, call the outputPostScriptFile() > function */ > 258,259c238,239 < /* If "Print As PS" was chosen, call the outputPostScriptFile() function */ < } --- > /* If "Print" was chosen, call the outputPostScriptFile() > function */ 261,263c241,242 < /* The follwoing sections were added or modified < * by Hua Ren, 97s523, 042797 < */ --- > } > if(label.equals("Open...")) 265,266d243 < if(label.equals("Open DATA File...")) < /* if "Open DATA File..." was chosen */ 296,305d272 < < if(label.equals("Save")) < /* If "Save" is chosen..*/ < { < outputFile(bdeApplet.FileName); < /* Call outputFile function */ < bSaveQuery = false; < } < < //Hua042697====== 307,308c274 < /* if "Save As..." was chosen..*/ < --- > /* if "Save As" was chosen..*/ 327,333d292 < < /* Due to the fact that AWT behaviors differently in different platform, < * a filter for FileName is needed to give a correct < * name to the bdeApplet and associated output files. < * Hua Ren, 97s523 < */ < 335,338d293 < /* If use cs PC lib, please close above sentance and open next one.*/ < < //bdeApplet.FileName = FileName.substring(0,(FileName.length()-4)); < 344,360c299,304 < < // === Hua Ren 041297: < /* if "Print As GIF File" was chosen..*/ < if(label.equals("Print Current Graph")) < { < boolean gifCurrGraph = true; < System.out.println("Start saving to gif"); < outputGif(bdeApplet.FileName.substring(0, (bdeApplet.FileName.length()-4)),gifCurrGraph); < /* call the "outputGif" function */ < } < if(label.equals("Print All Graphs")) < { < boolean gifCurrGraph = false; < System.out.println("Start saving to gif"); < outputGif(bdeApplet.FileName.substring(0, (bdeApplet.FileName.length()-4)),gifCurrGraph); < /* call the "outputGif" function */ < --- > if(label.equals("Save")) > /* If "Save" is chosen..*/ > { > outputFile(bdeApplet.FileName); > /* Call outputFile function */ > bSaveQuery = false; 374,375c318 < bdeReference.AUTHOR_NAMES + "\n" + < bdeReference.MODIFY_HISTORY); --- > bdeReference.AUTHOR_NAMES); 400d342 < 406,494d347 < * Method: public void outputGif(Graphics g, String file_name) < * < * Description: Save graph into a gif file < * < * Class: bdeAppletFrame < * < * Author: Hua Ren, 97s523, April 1997 < * < * < *************************************************************/ < public void outputGif(String file_name, boolean gifCurrGraph) < { < /** After Receiving Image generated by "double-buffering" < Call GIFEncoder to encode Image into GIF format and < save to a GIF file. < < GIFEncoder has two constructs: one use RGB byte arrays < and one use Image image. < < Hua Ren 97s523 < */ < < if(gifCurrGraph) < { < String gifFileName = file_name < + ((bdeGraph)bdeApplet.panel.elementAt(bdeApplet.bdeGraphCurrent)).Name < + ".gif"; < Image gifImage = ((bdeGraph)bdeApplet.panel.elementAt(bdeApplet.bdeGraphCurrent)).offscreen; < < try < { < //GIFEncoder encode = new GIFEncoder(red, green, blue); < GIFEncoder encode = new GIFEncoder(gifImage); < //OutputStream output = new BufferedOutputStream(new FileOutputStream(file_name)); < OutputStream output = new BufferedOutputStream(new FileOutputStream(gifFileName)); < encode.Write(output); < } < catch (AWTException e) < { < String err = e.toString(); < System.out.println(err); < } < catch (IOException e) < { < String err = e.toString(); < System.out.println(err); < } < < System.out.println("GIF File Saving Accomplished"); < } < else < { < for(int nIndexGraph = 0; nIndexGraph < bdeApplet.panel.size(); nIndexGraph++) < { < < String gifFileName = file_name < + ((bdeGraph)bdeApplet.panel.elementAt(nIndexGraph)).Name < //String gifFileName = ((bdeGraph)bdeApplet.panel.elementAt(nIndexGraph)).Name < + ".gif"; < < Image gifImage = ((bdeGraph)bdeApplet.panel.elementAt(nIndexGraph)).offscreen; < < try < { < //GIFEncoder encode = new GIFEncoder(red, green, blue); < GIFEncoder encode = new GIFEncoder(gifImage); < OutputStream output = new BufferedOutputStream(new FileOutputStream(gifFileName)); < encode.Write(output); < } < catch (AWTException e) < { < String err = e.toString(); < System.out.println(err); < } < catch (IOException e) < { < String err = e.toString(); < System.out.println(err); < } < < System.out.println("GIF File: " + gifFileName + " Saving Accomplished"); < } < System.out.println("All graphs have been saved."); < } < < } /* outputGif() - end */ < < < /************************************************************* 765,766c618 < //FileOutputStream fileOut = new FileOutputStream(bdeApplet.FileName); < FileOutputStream fileOut = new FileOutputStream(PathFileName); --- > FileOutputStream fileOut = new FileOutputStream(bdeApplet.FileName); Only in .: bdeBendPoint.class Only in .: bdeCaptionText.class Only in .: bdeGraph.class diff -bitw ./bdeGraph.java /usr/proj3/case/96f523/bde2java/lechner/java/bdeGraph.java 1,3d0 < import java.io.*; < import java.awt.*; < import java.awt.image.*; 4a2 > import java.awt.*; 6d3 < 13d9 < 20c16 < * Modified by: Hua Ren, 97s523, 050297 --- > * 442a439 > 965,967d961 < * < * Modified by: Hua Ren, 97s523, 050397 < * 976,982c970 < /* Position of Graph Label */ < int x_pos = 0; < int y_pos = -560; < < PostScriptString = " " + x_pos + " " + y_pos + " " < +"( "+ Author +" "+ ModificationDate +" " < + System.getProperty("user.dir") + ") Text "+"\n"; --- > PostScriptString = " 0 -560 "+"( "+ Author +" "+ ModificationDate +" "+System.getProperty("user.dir") + ") Text "+"\n"; 1170,1171d1157 < < Only in .: bdeGraphBox.class diff -bitw ./bdeGraphBox.java /usr/proj3/case/96f523/bde2java/lechner/java/bdeGraphBox.java 15d14 < Only in .: bdeGraphCaption.class diff -bitw ./bdeGraphCaption.java /usr/proj3/case/96f523/bde2java/lechner/java/bdeGraphCaption.java 56,57c56 < if(selected == true) < /*if selected */ --- > if(selected == true) > /*if selected */ 60,61c59 < g.drawRect(x, y, width, height); < /*draw the frame */ --- > g.drawRect(x, y, width, height); > /*draw the frame */ Only in .: bdeGraphSelectionBox.class Only in .: bdeJava.class diff -bitw ./bdeJava.java /usr/proj3/case/96f523/bde2java/lechner/java/bdeJava.java 4c4 < import GIFEncoder; --- > Only in .: bdeLink.class Only in .: bdeLinkCaption.class Only in .: bdeMenuItem.class Only in .: bdeNode.class Only in .: bdeNodeAttribute.class Only in .: bdeNodeAttributesBox.class Only in .: bdeReference.class diff -bitw ./bdeReference.java /usr/proj3/case/96f523/bde2java/lechner/java/bdeReference.java 30d29 < static final String MODIFY_HISTORY = "Modified by: Hua Ren, 97s523"; 364d362 < System.out.println(" " + MODIFY_HISTORY); Only in .: bdeText.class Only in .: bdeToolBox.class Only in .: hren.vs.gzeballo.dif Only in .: menuList.class Only in .: menubox.class Only in .: menutest.class Only in .: test.dat Only in .: test2.dat Only in .: test2HG000001.gif Only in .: test2HG000002.gif Only in .: test2HG000002.ps