; $Id: davegr1d__resetlegend.pro,v 1.2 2005/02/08 17:17:34 azuah Exp $
;###############################################################################
;
; CLASS NAME:
;   DaveGr1D
;
; PURPOSE:
;   The DaveGr1D class extends the DaveGr class to better handle
;   plotting of 1D data ie line plots.
;
; CATEGORY:
;   Data Browser
;
; SUPERCLASSES:
;   DaveGr
;
; PUBLIC METHODS:
;   Display
;   Get
;   ResetLegend
;   ReserMiscGrAttribs
;   Set
;
; AUTHOR:
;   Richard Tumanjong Azuah
;   NIST Center for Neutron Research
;   100 Bureau Drive, Gaithersburg, MD 20899
;   United States
;   azuah@nist.gov; (301) 9755604
;   Nov, 2002
;
; LICENSE:
;  The software in this file is written by an employee of 
;  National Institute of Standards and Technology 
;  as part of the DAVE software project.
;
;  The DAVE software package is not subject to copyright protection
;  and is in the public domain. It should be considered as an
;  experimental neutron scattering data reduction, visualization, and
;  analysis system. As such, the authors assume no responsibility
;  whatsoever for its use, and make no guarantees, expressed or
;  implied, about its quality, reliability, or any other
;  characteristic. The use of certain trade names or commercial
;  products does not imply any endorsement of a particular product,
;  nor does it imply that the named product is necessarily the best
;  product for the stated purpose. We would appreciate acknowledgment
;  if the DAVE software is used or if the code in this file is
;  included in another product.
;
;###############################################################################



;===============================================================================
; DaveGr1D::ResetLegend
;
; PURPOSE:
;   Private method to initialize/reset legend prpoerties.
;
; PARAMETERS:
;
pro DaveGr1D::resetLegend

message,/reset

self.legend.bkgdColor = [192,192,192]
self.legend.font = 'HELVETICA'
self.legend.fontsize = 8.0
self.legend.tFont = 'HELVETICA'
self.legend.tFontsize = 11.0
self.legend.title = 'Legend'
self.legend.tColor = [0,0,0]
self.legend.gap = 0.5
self.legend.gWidth = 2.5
self.legend.hideFlag = 0
self.legend.fillFlag = 1
self.legend.outlFlag = 1
self.legend.outlColor = [128,0,0]
self.legend.outlThick = 1.0
self.legend.textColor = [0,0,0]
self.legend.location = [0.7,0.65]

nData = self->count()
if (nData le 0) then return
if (not self->get(dataRef=dataRef)) then return
for i=0, nData-1 do begin
    self.legend.itemThick[i] = 1.0
    if (not (dataRef[i])->get(nameTag=nameTag)) then return
    self.legend.itemName[i] = nameTag
endfor

end
