diff --git a/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st b/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st index 940b5c6d..2726dcb9 100644 --- a/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st @@ -72,6 +72,18 @@ SpAbstractMorphicListAdapter >> itemFilter [ ^ self model itemFilter ] +{ #category : 'events' } +SpAbstractMorphicListAdapter >> refreshList [ + + self subclassResponsibility +] + +{ #category : 'events' } +SpAbstractMorphicListAdapter >> refreshList: anAnnouncement [ + + self refreshList +] + { #category : 'scrolling' } SpAbstractMorphicListAdapter >> scrollingChanged [ widget container updateAllRows. diff --git a/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st b/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st index a4b7e573..3e556fd8 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st @@ -157,14 +157,6 @@ SpMorphicListAdapter >> refreshList [ ^ self widget refresh ] -{ #category : 'widget API' } -SpMorphicListAdapter >> refreshList: anAnnouncement [ - "this can provide special handling of the kind of refresh, but for now just - letting it as is" - - self refreshList -] - { #category : 'widget API' } SpMorphicListAdapter >> refreshWidgetHeaderTitle [ diff --git a/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st b/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st index 440c98ab..e4ac1bfc 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st @@ -173,12 +173,6 @@ SpMorphicTableAdapter >> refreshList [ ^ self widget refresh ] -{ #category : 'widget API' } -SpMorphicTableAdapter >> refreshList: aValueChanged [ - - ^ self refreshList -] - { #category : 'refreshing' } SpMorphicTableAdapter >> refreshModel [ diff --git a/src/Spec2-Examples/SpAlexandriePresenter.extension.st b/src/Spec2-Examples/SpAlexandriePresenter.extension.st new file mode 100644 index 00000000..227e2352 --- /dev/null +++ b/src/Spec2-Examples/SpAlexandriePresenter.extension.st @@ -0,0 +1,46 @@ +Extension { #name : 'SpAlexandriePresenter' } + +{ #category : '*Spec2-Examples' } +SpAlexandriePresenter class >> example [ + "Show an Alexandrie (vectorial graphics) component embedded into a Spec window presenter." + + | extent | + extent := 350 @ 300. + self new + surfaceExtent: extent; + drawBlock: [ :aContext :boundingBox | + | gradient | + gradient := AeCairoLinearGradientPattern + from: 0@0 + to: extent + addStopsFrom: { + (0 -> Color red). + (1 -> Color green) }. + aContext + sourcePattern: gradient; + roundedRectangleTo: extent radius: 16; + fill ]; + open +] + +{ #category : '*Spec2-Examples' } +SpAlexandriePresenter class >> exampleResizing [ + "Show an Alexandrie component that adapts to the available space. + Resize the window to see the figure follow the drawing area." + + self new + surfaceExtent: 350 @ 300; + drawBlock: [ :aContext :boundingBox | + | gradient center radius | + center := boundingBox center. + radius := (boundingBox width min: boundingBox height) / 2 - 10. + gradient := AeCairoRadialGradientPattern center: center innerRadius: 0 outerRadius: radius. + gradient addStopsFrom: { + (0 -> Color orange). + (1 -> Color blue) }. + aContext + sourcePattern: gradient; + circleCenter: center radius: radius; + fill ]; + open +]