v2.10-0 (21000JUN2005)

Go4ConditionsBase
Class TGo4LabelPainter

Direct Known Subclasses:
TGo4ConditionPainter, TGo4MarkerPainter

class TGo4LabelPainter
derived from TAttFill, TAttLine, TAttText, TNamed

Base class for painters providing a textlabel for
additional information. To be inherited by
condition painters and marker painters.

Author:
J. Adamczewski
Since: 6/2004

Field Summary
 private Bool_tfbIsLabStreamed
          Flag to handle streamed label from file correctly
 private Double_tfdHeight
          initial height relative to whole pad
 private Double_tfdWidth
          initial width relative to whole pad
 private Double_tfdX0
          initial reference coordinates x
 private Double_tfdY0
          initial reference coordinates y
 private TStringfxCaption
          Headline for the label
 private TGo4Label*fxLabel
          the label

Fields inherited from class TAttFill
fFillColor, fFillStyle

Fields inherited from class TAttLine
fLineColor, fLineStyle, fLineWidth

Fields inherited from class TAttText
fTextAngle, fTextSize, fTextAlign, fTextColor, fTextFont

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4LabelPainter()
           
TGo4LabelPainter(const Text_t* name)
           
TGo4LabelPainter(const Text_t* name, const Text_t* title)
           

Destructor Summary
 virtual synchronized ~TGo4LabelPainter()
           

Method Summary
 voidAddToLabel(const Text_t* txt)
           
 private Bool_tCheckLabel()
          Check if label is still existing.
 private TGo4Label*CreateCurrentLabel(Double_t x, Double_t y)
          Create Label at the window coords.
 Double_tGetLabelXlo()
          Reference coordinate x of label box (lower left corner)
 Double_tGetLabelXup()
          Reference coordinate x of label box (upper right corner)
 Double_tGetLabelYlo()
          Reference coordinate y of label box (lower left corner)
 Double_tGetLabelYup()
          Reference coordinate y of label box (upper right corner)
 voidInitAttributes()
          Initialize the label attributes
 private voidLabelCoords(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax)
          Evaluate coordinates for new label for given xmin, ymin with respect to pad size
 virtual voidPaintLabel(Option_t* opt)
          Draw the label
 virtual voidRePaintLabel(Option_t* opt)
          refresh painting of label with current attributes
 voidSetCaption(const Text_t* txt)
           
 voidSetHeight(Double_t h)
           
 voidSetWidth(Double_t w)
           
 voidSetX0(Double_t x)
           
 voidSetY0(Double_t y)
           
 virtual voidUnPaintLabel(Option_t* opt)
          Erase the label

Methods inherited from class TAttFill
Copy, GetFillColor, GetFillStyle, IsTransparent, Modify, ResetAttFill, SaveFillAttributes, SetFillAttributes, SetFillColor, SetFillStyle, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Methods inherited from class TAttLine
Copy, DistancetoLine, GetLineColor, GetLineStyle, GetLineWidth, ResetAttLine, SaveLineAttributes, SetLineAttributes, SetLineColor, SetLineStyle, SetLineWidth

Methods inherited from class TAttText
Copy, GetTextAlign, GetTextAngle, GetTextColor, GetTextFont, GetTextSize, ResetAttText, SaveTextAttributes, SetTextAttributes, SetTextAlign, SetTextAngle, SetTextColor, SetTextFont, SetTextSize, SetTextSizePixels

Methods inherited from class TNamed
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof

Field Detail

fbIsLabStreamed

private Bool_t fbIsLabStreamed
Flag to handle streamed label from file correctly

fdHeight

private Double_t fdHeight
initial height relative to whole pad

fdWidth

private Double_t fdWidth
initial width relative to whole pad

fdX0

private Double_t fdX0
initial reference coordinates x

fdY0

private Double_t fdY0
initial reference coordinates y

fxCaption

private TString fxCaption
Headline for the label

fxLabel

private TGo4Label* fxLabel
the label
Constructor Detail

TGo4LabelPainter

public TGo4LabelPainter()

TGo4LabelPainter

public TGo4LabelPainter(const Text_t* name)

TGo4LabelPainter

public TGo4LabelPainter(const Text_t* name, const Text_t* title)
Method Detail

~TGo4LabelPainter

public virtual synchronized ~TGo4LabelPainter()
Method Detail

AddToLabel

public void AddToLabel(const Text_t* txt)

CheckLabel

private Bool_t CheckLabel()
Check if label is still existing. Uses root list of cleanups.

CreateCurrentLabel

private TGo4Label* CreateCurrentLabel(Double_t x, Double_t y)
Create Label at the window coords.

GetLabelXlo

public Double_t GetLabelXlo()
Reference coordinate x of label box (lower left corner)

GetLabelXup

public Double_t GetLabelXup()
Reference coordinate x of label box (upper right corner)

GetLabelYlo

public Double_t GetLabelYlo()
Reference coordinate y of label box (lower left corner)

GetLabelYup

public Double_t GetLabelYup()
Reference coordinate y of label box (upper right corner)

InitAttributes

public void InitAttributes()
Initialize the label attributes

LabelCoords

private void LabelCoords(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax)
Evaluate coordinates for new label for given xmin, ymin with respect to pad size

PaintLabel

public virtual void PaintLabel(Option_t* opt)
Draw the label

RePaintLabel

public virtual void RePaintLabel(Option_t* opt)
refresh painting of label with current attributes

SetCaption

public void SetCaption(const Text_t* txt)

SetHeight

public void SetHeight(Double_t h)

SetWidth

public void SetWidth(Double_t w)

SetX0

public void SetX0(Double_t x)

SetY0

public void SetY0(Double_t y)

UnPaintLabel

public virtual void UnPaintLabel(Option_t* opt)
Erase the label

Association Links

to Class TGo4Label

the label

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005