14. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/5/2018 10:24:08 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

14.1 Files compared

# Location File Last Modified
1 patch_205_build_9.zip\Java\CacheWeb\src\gov\va\med\cache\gui\client StackLayoutDataPanel.java Wed May 30 14:35:21 2018 UTC
2 patch_205_build_9.zip\Java\CacheWeb\src\gov\va\med\cache\gui\client StackLayoutDataPanel.java Fri Jun 1 19:21:39 2018 UTC

14.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 548
Changed 1 2
Inserted 0 0
Removed 0 0

14.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

14.4 Active regular expressions

No regular expressions were active.

14.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.c ache.gui.c lient;
  5  
  6   import jav a.util.Col lections;
  7   import jav a.util.Has hSet;
  8   import jav a.util.Lin kedHashMap ;
  9   import jav a.util.Lis t;
  10   import jav a.util.Map ;
  11   import jav a.util.Set ;
  12   import org .apache.lo gging.log4 j.LogManag er;
  13   import org .apache.lo gging.log4 j.Logger;
  14  
  15   import com .google.gw t.dom.clie nt.Style.U nit;
  16   import com .google.gw t.event.sh ared.Handl erRegistra tion;
  17   import com .google.gw t.user.cli ent.ui.Sta ckLayoutPa nel;
  18   import com .google.gw t.user.cli ent.ui.Wid get;
  19   import com .google.gw t.view.cli ent.HasDat a;
  20   import com .google.gw t.view.cli ent.Range;
  21   import com .google.gw t.view.cli ent.RangeC hangeEvent .Handler;
  22   import com .google.gw t.view.cli ent.Select ionModel;
  23  
  24   /**
  25    * @author   PI I
  26    *
  27    */
  28   public abs tract clas s StackLay outDataPan el<T, W ex tends Widg et> 
  29   extends St ackLayoutP anel 
  30   implements  HasData<T >
  31   {
  32           pu blic final  static St ring ELEME NT_STYLE =  "stack-el ement";
  33           pu blic final  static St ring ELEME NT_HEADER_ STYLE = "s tack-eleme nt-header" ;
  34           
  35           //  ordering  is critica l, use a M ap that pr ovides con sistent or dering
  36           pr ivate fina l Map<W, T > widgetVa lueMap = n ew LinkedH ashMap<W,  T>();
  37           pr ivate int  headerSize  = 40;
  38  
  39           pr ivate Sele ctionModel <? super T > selectio nModel;
  40           
  41           pr ivate fina l Set<Hand ler> range CheckHandl ers = new  HashSet<Ha ndler>();
  42           pr ivate fina l Set<com. google.gwt .view.clie nt.RowCoun tChangeEve nt.Handler > changeEv entHandler s =
  43                    new  HashSet<co m.google.g wt.view.cl ient.RowCo untChangeE vent.Handl er>();
  44           pr ivate fina l Set<com. google.gwt .view.clie nt.CellPre viewEvent. Handler<T> > cellPrev iewHandler s =
  45                    new  HashSet<co m.google.g wt.view.cl ient.CellP reviewEven t.Handler< T>>();
  46           pr ivate Rang e visibleR ange = new  Range(0,0 );
  47           pr ivate int  rowCount =  0;
  48           pr ivate bool ean rowCou ntExact =  false;
  49           
  50           Lo gger logge r = LogMan ager.getLo gger("Stac kLayoutDat aPanel");
  51           
  52           /* *
  53            *  
  54            *  @param un it
  55            * /
  56           pu blic Stack LayoutData Panel(Unit  unit, int  headerSiz e)
  57           {
  58                    supe r(unit);
  59                    this .headerSiz e = header Size;
  60           }
  61  
  62           pu blic int g etHeaderSi ze()
  63           {
  64                    retu rn headerS ize;
  65           }
  66  
  67           /* *
  68            *  This meth od must be  overridde n.
  69            *  
  70            *  @param id entifier
  71            *  @return
  72            * /
  73           pu blic abstr act W crea teStackPan elWidget(T  elementVa lue);
  74           
  75           /* *
  76            *  This meth od should  be overwri tten to do  anything  meaningful .
  77            *  By defaul t, this me thod simpl y creates  an HTML wi dget with  toString()  of the el ement.
  78            *  
  79            *  @param id entifier
  80            *  @return
  81            * /
  82           pu blic abstr act Widget  createSta ckPanelHea derWidget( T elementV alue);
  83           
  84           //  ========= ========== ========== ========== ========== ========== ========== ========== ==
  85           //  HasData i mplementat ion
  86           //  ========= ========== ========== ========== ========== ========== ========== ========== ==
  87           @O verride
  88           pu blic void  setSelecti onModel(Se lectionMod el<? super  T> select ionModel)
  89           {
  90                    this .selection Model = se lectionMod el;
  91           }
  92  
  93           @O verride
  94           pu blic Selec tionModel< ? super T>  getSelect ionModel()
  95           {
  96                    retu rn this.se lectionMod el;
  97           }
  98  
  99           @O verride
  100           pu blic T get VisibleIte m(int inde xOnPage)
  101           {
  102                    int  index = 0;
  103                    for( Map.Entry< W, T> entr y : this.w idgetValue Map.entryS et())
  104                             if(ind exOnPage = = index++)
  105                                      return e ntry.getVa lue();
  106                    
  107                    retu rn null;
  108           }
  109  
  110           @O verride
  111           pu blic int g etVisibleI temCount()
  112           {
  113                    retu rn this.vi sibleRange .getLength ();
  114           }
  115  
  116           @O verride
  117           pu blic Itera ble<T> get VisibleIte ms()
  118           {
  119                    retu rn Collect ions.unmod ifiableCol lection( t his.widget ValueMap.v alues() );
  120           }
  121  
  122           @O verride
  123           pu blic void  setRowData (int start , List<? e xtends T>  values)
  124           {
  125                    for( T elementV alue : val ues)
  126                    {
  127                             //Mess ageDialog. showInform ationDialo g("CacheSt ackPanel",  "Adding p anel for ' " + cache. getName()  + "'.");
  128                             W pane lWidget =  createStac kPanelWidg et(element Value);
  129                             Widget  headerWid get = crea teStackPan elHeaderWi dget(eleme ntValue);
  130                             
  131                             panelW idget.setS tylePrimar yName(ELEM ENT_STYLE) ;
  132                             header Widget.set StylePrima ryName(ELE MENT_HEADE R_STYLE);
  133                             
  134                             // ret ain the ma pping of t he element s widget t o the valu e
  135                             widget ValueMap.p ut(panelWi dget, elem entValue);
  136                             
  137                             // add  the panel  and the h eader to o urselves
  138                             this.a dd(panelWi dget, head erWidget,  getHeaderS ize());
  139                    }
  140                    
  141                    setR owCount(wi dgetValueM ap.size()- 1, true);
  142                    setV isibleRang e(new Rang e(0, widge tValueMap. size()-1)) ;
  143           }
  144  
  145           @O verride
  146           pu blic void  setVisible RangeAndCl earData(Ra nge range,  boolean f orceRangeC hangeEvent )
  147           {
  148                    setV isibleRang e(range);
  149           }
  150  
  151           //  ========= ========== ========== ========== ========== ========== ========== ========== ==
  152           //  HasRows i mplementat ion
  153           //  ========= ========== ========== ========== ========== ========== ========== ========== ==
  154  
  155           @O verride
  156           pu blic Handl erRegistra tion addRa ngeChangeH andler(Han dler handl er)
  157           {
  158                    rang eCheckHand lers.add(h andler);
  159                    retu rn new Loc alRangeChe ckHandlerR egistratio n<T, W>(th is, handle r);
  160           }
  161           @O verride
  162           pu blic Handl erRegistra tion addRo wCountChan geHandler( com.google .gwt.view. client.Row CountChang eEvent.Han dler handl er)
  163           {
  164                    chan geEventHan dlers.add( handler);
  165                    retu rn new Loc alChangeEv entHandler Registrati on<T, W>(t his, handl er);
  166           }
  167           @O verride
  168           pu blic Handl erRegistra tion addCe llPreviewH andler(com .google.gw t.view.cli ent.CellPr eviewEvent .Handler<T > handler)
  169           {
  170                    cell PreviewHan dlers.add( handler);
  171                    retu rn new Loc alCellPrev iewHandler Registrati on<T, W>(t his, handl er);
  172           }
  173           
  174           @O verride
  175           pu blic Range  getVisibl eRange()
  176           {
  177                    retu rn new Ran ge(0, getV isibleItem Count()-1) ;
  178           }
  179           @O verride
  180           pu blic void  setVisible Range(int  start, int  length)
  181           {
  182                    
  183           }
  184           @O verride
  185           pu blic void  setVisible Range(Rang e range)
  186           {
  187                    this .visibleRa nge = rang e;
  188           }
  189  
  190           @O verride
  191           pu blic int g etRowCount ()
  192           {
  193                    retu rn this.ro wCount;
  194           }
  195           @O verride
  196           pu blic boole an isRowCo untExact()
  197           {
  198                    retu rn rowCoun tExact;
  199           }
  200           @O verride
  201           pu blic void  setRowCoun t(int coun t)
  202           {
  203                    this .rowCount  = count;
  204           }
  205           @O verride
  206           pu blic void  setRowCoun t(int coun t, boolean  isExact)
  207           {
  208                    setR owCount(co unt);
  209                    this .rowCountE xact = isE xact;
  210           }
  211  
  212           //  ========= ========== ========== ========== ========== ========== ========== ========== ==
  213           //  HandlerRe gistration  Classes
  214           //  ========= ========== ========== ========== ========== ========== ========== ========== ==
  215           pr ivate stat ic class L ocalRangeC heckHandle rRegistrat ion<T, W e xtends Wid get>
  216           im plements H andlerRegi stration
  217           {
  218                    priv ate StackL ayoutDataP anel<T, W>  ghost;
  219                    priv ate Handle r handler;
  220                    publ ic LocalRa ngeCheckHa ndlerRegis tration(St ackLayoutD ataPanel<T , W> ghost , Handler  handler)
  221                    {
  222                             super( );
  223                             this.g host = gho st;
  224                             this.h andler = h andler;
  225                    }
  226                    
  227                    @Sup pressWarni ngs("synth etic-acces s")
  228                    @Ove rride
  229                    publ ic void re moveHandle r()
  230                    {
  231                             ghost. rangeCheck Handlers.r emove(hand ler);
  232                    }
  233           }
  234  
  235           pr ivate stat ic class L ocalChange EventHandl erRegistra tion<T, W  extends Wi dget>
  236           im plements H andlerRegi stration
  237           {
  238                    priv ate StackL ayoutDataP anel<T, W>  ghost;
  239                    priv ate com.go ogle.gwt.v iew.client .RowCountC hangeEvent .Handler h andler;
  240                    publ ic LocalCh angeEventH andlerRegi stration(S tackLayout DataPanel< T, W> ghos t, com.goo gle.gwt.vi ew.client. RowCountCh angeEvent. Handler ha ndler)
  241                    {
  242                             super( );
  243                             this.g host = gho st;
  244                             this.h andler = h andler;
  245                    }
  246                    
  247                    @Sup pressWarni ngs("synth etic-acces s")
  248                    @Ove rride
  249                    publ ic void re moveHandle r()
  250                    {
  251                             ghost. changeEven tHandlers. remove(han dler);
  252                    }
  253           }
  254           
  255           pr ivate stat ic class L ocalCellPr eviewHandl erRegistra tion<T, W  extends Wi dget>
  256           im plements H andlerRegi stration
  257           {
  258                    priv ate StackL ayoutDataP anel<T, W>  ghost;
  259                    priv ate com.go ogle.gwt.v iew.client .CellPrevi ewEvent.Ha ndler<T> h andler;
  260                    publ ic LocalCe llPreviewH andlerRegi stration(S tackLayout DataPanel< T, W> ghos t, com.goo gle.gwt.vi ew.client. CellPrevie wEvent.Han dler<T> ha ndler)
  261                    {
  262                             super( );
  263                             this.g host = gho st;
  264                             this.h andler = h andler;
  265                    }
  266                    
  267                    @Sup pressWarni ngs("synth etic-acces s")
  268                    @Ove rride
  269                    publ ic void re moveHandle r()
  270                    {
  271                             ghost. cellPrevie wHandlers. remove(han dler);
  272                    }
  273           }        
  274  
  275   }