equal
deleted
inserted
replaced
613 ! |
613 ! |
614 |
614 |
615 drawLabelsAtX:xLeft y:yTop h:h from:start to:stop |
615 drawLabelsAtX:xLeft y:yTop h:h from:start to:stop |
616 "redraw labels from start to stop" |
616 "redraw labels from start to stop" |
617 |
617 |
618 |fg y yT x hspace lblHg bg label row isSel cachedWidth lineColor| |
618 |fg y yT x hspace lblHg bg label row isSel cachedWidth lineColor minTopMargin| |
619 |
619 |
|
620 minTopMargin := 4. |
|
621 |
620 cachedWidth := self width. |
622 cachedWidth := self width. |
621 cachedWidth isNil ifTrue:[ ^ self ]. |
623 cachedWidth isNil ifTrue:[ ^ self ]. |
622 |
624 |
623 yT := yTop. |
625 yT := yTop. |
624 hspace := dataSet horizontalSpacing. |
626 hspace := dataSet horizontalSpacing. |
682 label := nil |
684 label := nil |
683 ] |
685 ] |
684 ] ifFalse:[ |
686 ] ifFalse:[ |
685 (isSel and:[dataSet hasOpenEditor]) ifTrue:[ |
687 (isSel and:[dataSet hasOpenEditor]) ifTrue:[ |
686 label := nil |
688 label := nil |
687 ] ifFalse:[ |
689 ] ifFalse:[ |
688 label := self shownValueForRow:row rowNr:aRowNr |
690 label := self shownValueForRow:row rowNr:aRowNr |
689 ] |
691 ] |
690 ]. |
692 ]. |
691 label notNil ifTrue:[ |
693 label notNil ifTrue:[ |
692 "/ care for a dark-colored label, |
694 "/ care for a dark-colored label, |
697 ]. |
699 ]. |
698 |
700 |
699 lblHg := self heightOfLabel:label. |
701 lblHg := self heightOfLabel:label. |
700 |
702 |
701 lblHg ~~ 0 ifTrue:[ |
703 lblHg ~~ 0 ifTrue:[ |
702 y := y + ((h - lblHg) // 2). |
704 lblHg < (h - minTopMargin) ifTrue:[ |
|
705 y := y + ((h - lblHg) // 2). |
|
706 ] ifFalse:[ |
|
707 y := y + minTopMargin. |
|
708 ]. |
703 dataSet paint:fg on:bg. |
709 dataSet paint:fg on:bg. |
704 |
710 |
705 (label isString and:[label includes:Character cr]) ifTrue:[ |
711 (label isString and:[label includes:Character cr]) ifTrue:[ |
706 label := label asCollectionOfLines |
712 label := label asCollectionOfLines |
707 ]. |
713 ]. |
708 |
714 |
709 (label isNonByteCollection) ifTrue:[ |
715 (label isNonByteCollection) ifTrue:[ |
|
716 |skipRest| |
|
717 |
710 "a collection of labels" |
718 "a collection of labels" |
|
719 skipRest := false. |
711 label do:[:el| |
720 label do:[:el| |
712 el notNil ifTrue:[ |
721 |yNext| |
713 self drawLabel:el atX:x y:y. |
722 |
714 y := y + (el heightOn:dataSet). |
723 (el notNil and:[skipRest not]) ifTrue:[ |
|
724 yNext := y + (el heightOn:dataSet). |
|
725 yNext >= (h-minTopMargin) ifTrue:[ |
|
726 self drawLabel:'...' atX:x y:y-4. |
|
727 skipRest := true. |
|
728 ] ifFalse:[ |
|
729 self drawLabel:el atX:x y:y. |
|
730 y := yNext. |
|
731 ] |
715 ] |
732 ] |
716 ] |
733 ] |
717 ] ifFalse:[ |
734 ] ifFalse:[ |
718 "a single label" |
735 "a single label" |
719 self drawLabel:label atX:x y:y |
736 self drawLabel:label atX:x y:y |
723 ]. |
740 ]. |
724 yT := yT + h |
741 yT := yT + h |
725 ] |
742 ] |
726 |
743 |
727 "Modified: / 20-01-2011 / 08:50:18 / cg" |
744 "Modified: / 20-01-2011 / 08:50:18 / cg" |
|
745 "Modified: / 23-04-2019 / 20:04:00 / Claus Gittinger" |
728 ! |
746 ! |
729 |
747 |
730 drawRendererInRow:rowNr x:xLeft y:y width:cellWidth value:cellValue |
748 drawRendererInRow:rowNr x:xLeft y:y width:cellWidth value:cellValue |
731 (rendererType == #ComboBox or:[rendererType == #ComboList]) ifTrue:[ |
749 (rendererType == #ComboBox or:[rendererType == #ComboList]) ifTrue:[ |
732 (self hasChoices:rowNr) ifTrue:[ |
750 (self hasChoices:rowNr) ifTrue:[ |