title: self getTitleName; generate. 3.3.2 Spec importation. UIPAinterSPecImporter>>import: aComposableModel inPanel: aPanel. Is the entry point of the class.
1 Installation The UIPainter project works in 3.0, needed Spec. You can also install it using the following instructions : Gofer new smalltalkhubUser: ’ErwanDouaille’ project: ’UIPainter’; configurationOf: ’UIPainter’; load. (Smalltalk at: #ConfigurationOfUIPainter) load
Otherwise, you can download an image including UIPainter by default, following this link : UIPainter
1
2 How to use it You can launch the UIPainter using : UIPainter open
or by using the tools menu.
Figure 2.1 – UIPainter The UIPainter project is used to graphically create user interface (UI) by dragging and dropping items in a canvas. This is the UIPainter interface :
2
Figure 2.2 – UIPainter
2.1 2.1.1
Components Toolbar
Load : Allow the user to load an existing spec ui and add widgets into the canvas. The user allow the user to modify an existing spec window New : It open a new tab. clear : Remove all widgets into your canvas GenerateUI : This is the most important button. It generate the Spec source code corresponding to the canvas contents.
3
2.1.2
Widget list
This panel provides Spec widgets. Each item can be dropped into the canvas
2.1.3
Canvas
This is the place where you drag and drop items.
4
2.1.4
Properties panel
Here is the place where you can settup widgets. To make it appears, you have to choose a widget. When you finish to setup the widget, you have to apply settings by clicking on ”Apply settings” button.
5
2.1.5
Halo
close : duplicate : move :
close and delete the widget duplicate the widget, including properties move the widgets :)
sticky : active or disable it. When enabled, the morph will stick to the closest grid point. The color will change depending of the activation state resize :
resize the widgets.
6
3 Classes 3.1
Related to the user interface
UIPainter is the main class. It’s a ComposableModel extended class which implement : UIPainterToolbar UIPainterPanel UIPainterWidgetLister UIPainterPropertiesPanel
3.2
Related to the properties panel
All related classes are in UIPainter-Core-Properties. Use case in Add new items chapter.
3.3
Related to the Spec
Spec classes are in the UIPainter-Core-Spec. There is 2 class, UIPainterSpecGeneration and UIPainterSpecImporter
3.3.1
Spec generation
UIPAinterSPecGeneration>>generate: aPanel
Is the entry point of the class. Panel have to be an UIPainterPanel instance. You also have to specify the class name, the category and the title name of the generated UI. You can see the use case : 7
Is the entry point of the class. Panel have to be an UIPainterPanel instance and aComposableModel a subclass of ComposableModel.
3.4
Related to the Widgets
All widgets related classes are in UIPainter-Core package. WidgetWrapper : is the object containing efficient widgegt informations. Properties, spec related model, id, morph representation ... WidgetWrapperMorph : this is the morph representation used in UIPainter canvas. WidgetWrapperMorphHalo : is the halo used for UIPainter widgets.
8
4 Add new items If you want to add new widgets into the widget list you have to implement this methods into class side :
4.1
Widgets
YourClass>>icons ”the icon use in the widget list. This is the default icon” ˆ ThemeIcons new smallWindowIcon YourClass>>uiPainter ”use in UIPainter ? return true or false” ˆtrue
Of course, your class should extend from ComposableModel Another thing to implement is : YourClass>>properties ˆ Dictionary new at: #text: put: #String; at: #whenTextChanged: put: #BlockClosure; yourself.
properties have to return a Dictionary containing a selector of your class and the expected object. This is an example from LabelModel. If you didn’t implement properties nothing happends and it means than your widget will not be parameterized from the UIPainter.
4.2
PropertiesPanel
Adding a properties panel for a specific Object is really easy. I added an example for the Integer class.
PropertiesPanelInteger is the properties panel class. Your properties panel have to extend from PropertiesPanel. Your panel have to implement two methods YourPanel>>readContents ˆ Association key: input text contents asString value: (nil class compiler evaluate: (ReadWriteStream on: input text contents from: 1 to: input text contents size) in: nil to: nil notifying: nil ifFail: [ ] logged: true)
readContents is the default api for the spec generation to retrieve input data. It have to return an association containing as the key, the string input data, and as the value, the compiled input data, meaning the expected object. YourPanel>>setContents: anObject anObject isNil ifTrue: [ ˆ self ]. input text: anObject key asString
setContents : anObject is the way you will setup your panel by retrieving old input data. This object is an Association. PropertiesPanelInteger contains a text field object. Of course you have to setup #initializeWidgets and class side #defaultSpec
Repeat the process for a few objects (at least 3). Check in the folder named âWork folderâ : you should find. - A folder named âimagesâ for recorded images with ...
del cabezal deslice el conjunto de cortina y el carro dentro del cabezal. Poser le boîtier et le montage du store sur une surface plane et propre, la partie avant.
Installez un jeu pour la tringle porteuse et un jeu pour la tringle de tension. Install headrail (top) and close installation bracket covers. Instale el riel (superior) y ...
3 Poignée(s). 4 Supports de retenue (en option). 5 Rallonges (en option). 6 Supports pour pose latérale (en option). Thank you for purchasing this fine window ...
Para subir o bajar la cortina, use ambas asideras en cada riel para subirla o bajarla. Pour les stores à ouverture vers le haut/vers le bas en option, clipser deux ...
M Lay panels ï¬at. Measure front lest pleat on one to last pleat on the other. Subtract 5" (12.7cm) for center overlap. Fiat fabric on ends forms drapery rettu'n.
project, he will have employed a surprising variety of skills. One of them ... Whatever the material or dimensions of a tube, un- controlled .... common that much thought has been put into finding so- lutions. ... with wood and pour in dry, well-sift
1801â16" a 204". 9. 2041â16" a 228". 10. 2281â16" a 252". 11. 2521â16" a 276". 12. 2761â16" a 300". 13. 3001â16" a 324". 14. 3241â16" a 348". 15. 3481â16" a 366 ...
Hell, men don't even need toilet seats. ...... dence, and that will attract them likes flies to honey. .... (women desperately want [Hell, they need, really to believe.
Essayer une autre marque ou torréfaction de café. L'espresso est trop corsé ou amer. • Trop de mouture d'espresso a été utilisé. • La mouture du café est trop ...
3 Poignée(s). 4 Supports de retenue (en option). 5 Rallonges (en option). 6 Supports pour pose latérale (en option). 1. Everything needed to install your shade.
Position side rail for desired look, and mark. Posicione el riel lateral para la apariencia deseada, ... Remueva suavemente el objeto insertado del canal del riel inferior, revelando los componentes del resorte de tensión. Guarde el ... mark screw l
Feb 12, 2001 - I'm in charge of postfix mailers, and When I started, what I knew of postfix was. "It's probably the ... One girl(boy)friend (to cool you down at the most exciting point, when nothing works) ... What you need is a little bit of time, a
verb, how its grammar differs from English, or how you ... computer. These were very simple computers compared to the ones we keep in our homes and offices ...
Thank you for purchasing this fine window treatment proudly constructed by us. Your shade has been custom sized to your personal specifications with the ...