forked from pharo-project/pharo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add abstract GUI to select an item from a dropList, and choose elemen…
…ts from a list. Change preview of push down method, using the new GUI. Remove old GUIs of push up and push down
- Loading branch information
Showing
9 changed files
with
126 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
src/SystemCommands-RefactoringSupport/RBAbstractSelectionPresenter.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
Class { | ||
#name : #RBAbstractSelectionPresenter, | ||
#superclass : #RBItemsSelectionPresenter, | ||
#instVars : [ | ||
'dropList', | ||
'dropLabel', | ||
'acceptBlock' | ||
], | ||
#category : #'SystemCommands-RefactoringSupport' | ||
} | ||
|
||
{ #category : #specs } | ||
RBAbstractSelectionPresenter class >> defaultSpec [ | ||
^ SpBoxLayout newVertical | ||
add: #dropLabel withConstraints: [ :c | c height: self labelHeight ]; | ||
add: | ||
(SpBoxLayout newHorizontal | ||
add: #dropList ; | ||
yourself) withConstraints: [ :c | c height: self toolbarHeight ]; | ||
add: #label withConstraints: [ :c | c height: self buttonHeight ]; | ||
add: | ||
(SpBoxLayout newHorizontal | ||
add: #table; | ||
yourself); | ||
yourself | ||
] | ||
|
||
{ #category : #specs } | ||
RBAbstractSelectionPresenter class >> label: aString dropLabel: aString2 withItems: coll1 selecting: coll2 dropItems: coll3 acceptBlock: aBlock [ | ||
^ self new | ||
label: aString | ||
dropLabel: aString2 | ||
withItems: coll1 | ||
selecting: coll2 | ||
dropItems: coll3 | ||
acceptBlock: aBlock; | ||
openModalWithSpec | ||
] | ||
|
||
{ #category : #actions } | ||
RBAbstractSelectionPresenter >> accept [ | ||
acceptBlock value: self selectedItem value: selectedItems | ||
] | ||
|
||
{ #category : #initialization } | ||
RBAbstractSelectionPresenter >> initializeDropList [ | ||
dropList := self newDropList. | ||
dropList | ||
display: [ :scope | scope name ]; | ||
iconBlock: [ :e | e systemIcon ] | ||
] | ||
|
||
{ #category : #initialization } | ||
RBAbstractSelectionPresenter >> initializeWidgets [ | ||
super initializeWidgets . | ||
dropLabel := self newLabel. | ||
self initializeDropList. | ||
] | ||
|
||
{ #category : #initialization } | ||
RBAbstractSelectionPresenter >> label: aString dropLabel: aString2 withItems: coll1 selecting: coll2 dropItems: coll3 acceptBlock: aBlock [ | ||
self label: aString withItems: coll1 selecting: coll2. | ||
dropLabel label: aString2. | ||
dropList items: coll3. | ||
acceptBlock := aBlock. | ||
|
||
] | ||
|
||
{ #category : #accessing } | ||
RBAbstractSelectionPresenter >> selectedItem [ | ||
^ dropList selectedItem | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 0 additions & 138 deletions
138
src/SystemCommands-RefactoringSupport/RBPushDownPreviewPresenter.class.st
This file was deleted.
Oops, something went wrong.
104 changes: 0 additions & 104 deletions
104
src/SystemCommands-RefactoringSupport/RBPushUpPreviewPresenter.class.st
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.