Differences

This shows you the differences between two versions of the page.

Link to this comparison view

controllers:controllers [2015/10/05 17:52] (current)
Line 1: Line 1:
 +<WRAP adihi>
 +Adichatz defines a new layer composed of controllers which forms a main feature of the component-driven architecture.\\
 +A controller is a [[http://​www.javaworld.com/​article/​2076814/​core-java/​inheritance-versus-composition--which-one-should-you-choose-.html |composition]] of Rich UI components, as a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​ManagedForm.html | ManagedForm]] or simple SWT components as [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Text.html | Text]].
 +\\ \\ 
 +The controller manages links between UI components and **entities** (see [[tutorial:​runtime_overview#​model_layer|Model layer]]) to ensure the connection with locks, dirty and lazy fetches management.\\
 +A life cycle, in which the developer can act, is combined to the controller.
 + </​WRAP>​
 +\\
 +<wrap adititle>​Controllers can be divided in 4 categories:</​wrap>​
 +
 +|< ^100% 300px ->|
 +^[[controllers:​controllers#​collection_controllers_hosting_entity|Collection controllers hosting entity]] | Entity injection process is managed by these controllers. That means that by default, they received the entity of the parent controller, but they can define they own entity or a null value. |
 +^[[controllers:​controllers#​field_controllers|Field controllers]]| These controllers can be linked to a field of a Pojo and follow [[tutorial:​databinding_service | databinding]] rules. | 
 +^[[controllers:​controllers#​other_collection_controllers|Other Collection controllers]]| Others controllers which contains a collection of controllers but do not manage entities. | 
 +^[[controllers:​controllers#​other_controllers|Other controllers]]| Other controllers | 
 +\\
 +
 +====== Collection controllers hosting entity ======
 +|< 100% 200px ->|
 +^ArgPShelfController| Composition around a [[ http://​www.eclipse.org/​nebula/​widgets/​pshelf/​pshelf.php | PShelf]] (see nebula project). Children should be PShelftemControllers and are defined by a List of values (like a combo) and so is not determined like for PShelfController. |
 +^ArgTabFolderController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​custom/​CTabFolder.html | CTabFolder]]. Children should be CtabItemControllers and are defined by a List of values (like a combo) and so is not determined like for CtabFolderController. |
 +^[[controllers:​compositecontroller|CompositeController]]| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Composite.html | Composite]]. Children available are the same as those of SectionController. |
 +^CompositeBagController| Composition around a specific control called CompositeBag:​ A bag of composites. Only one composite is displayed. |
 +^CTabItemController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​custom/​CTabItem.html | CTabItem]]. Children available are the same as those of SectionController. |
 +^FormPageController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​ManagedForm.html|ManagedForm]] for simulating a page of an editor. |
 +^GroupController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Group.html | Group]]. Children available are the same as those of SectionController. |
 +^IncludeController| Specific controller to manage include process (see [[features:​xml | axml Files]]) |
 +^PGroupController| Composition around a [[http://​www.eclipse.org/​nebula/​widgets/​pgroup/​pgroup.php | PGroup]] (nebula project). |
 +^PShelfItemController| Composition around a [[http://​www.eclipse.org/​nebula/​widgets/​pshelf/​pshelf.php | PShelfItem]] (nebula project). |
 +^SashFormController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​custom/​SashForm.html | SashForm]]. |
 +^ScrolledCompositeController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​widgets/​SharedScrolledComposite.html | SharedScrolledComposite]]. |
 +^ScrolledFormController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​widgets/​ScrolledForm.html | ScrolledForm]] (Assumes scrolling and message zone). |
 +^ScrolledPGroupController| Composition around a [[http://​www.eclipse.org/​nebula/​widgets/​pgroup/​pgroup.php | PGroup]] (nebula project). Content composite is a scrolled composite. |
 +^SectionController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​widgets/​Section.html|Section]]. |
 +
 +
 +====== Field controllers ======
 +|< 100% 200px ->|
 +^CComboController| Composition of a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=%252Forg.eclipse.platform.doc.isv%252Freference%252Fapi%252Forg%252Feclipse%252Fswt%252Fcustom%252FCCombo.html | CCombo]]. Style AdiSWT.FIELD_ASSIST was added when Field Assist is demanded. |
 +^CheckBoxController| Composition of a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Button.html | Button]] with style SWT.CHECK. Corresponding type in the database is boolean. |
 +^ComboController| Composition of a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Combo.html | Combo]]. Style AdiSWT.FIELD_ASSIST was added when Field Assist is demanded. |
 +^DateTextController| Composition of a DateText. DateText is an UI Adichatz component which allows to manage date in several format (Date, DateTime...). ​ |
 +^[[controllers:​extratextcontroller|ExtraTextController]]| Composition of a ExtraText. a extra text is a special widget that allows you to manage the bold, italic, underline or URLs in the text. |
 +^FileController| Composition of a FileText: a specific control which manage file path. |
 +^FormTextController| Composition of a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​widgets/​FormText.html | FormText]]. An easy way to manage URL tag and image in your application. |
 +^[[controllers:​gmapcontroller|GMapController]]| Composition of a GMap control. GMap is a composite control which contains a browser. A http request is send to google and map result is displayed. |
 +^HyperlinkController| Composition of a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​ui/​forms/​widgets/​Hyperlink.html | Hyperlink]]. |
 +^ImageViewerController| Receive an URL or file path or data and display an image. |
 +^LabelController| Composition of a [[ http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Label.html | Label]]. |
 +^NumericTextController| Composition of a NumericText. NumericText is a Adichatz UI component. Corresponding types in the database are all numeric types. Format could be specified. |
 +^RadioGroupController| Composition of a list of [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Button.html | Buttons]] with style SWT.RADIO. |
 +^RefRadioGroupController| Similar to a referenced RadioGroupController,​ but list of [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Button.html | Buttons]] is determined by a persistent set or a query. |
 +^RefTextController| Composition of a RefText. RefText (referenced text) is an UI Adichatz component which allows to manage Many-To-One relationship. ​ Styles AdiSWT.FIND_BUTTON,​ AdiSWT.DELETE_BUTTON and AdiSWT.EDITOR_BUTTON are added when a <wrap adicode>​find button</​wrap>,​ a <wrap adicode>​delete button</​wrap>​ (for clearing value) and a <wrap adicode>​edit button</​wrap>​ (for opening an editor) are demanded. |
 +^[[controllers:​richtextcontroller|RichTextController]]| Composition of a RichText. a rich text is a special widget that allows you to manage the bold, italic, underline or URLs in the text. |
 +^TextController| Composition of a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​widgets/​Text.html | Text]]. Corresponding type in the database is varchar. |
 +
 +====== Other Collection controllers ======
 +|< 100% 200px ->|
 +^ButtonBarController |Composition around a bar of buttonControllers and separators. You can specify an orientation. |
 +^CTabFolderController| Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=/​org.eclipse.platform.doc.isv/​reference/​api/​org/​eclipse/​swt/​custom/​CTabFolder.html | CTabFolder]]. Children should be CTabItemControllers. |
 +^GridController |Composition around nebula components [[https://​www.eclipse.org/​nebula/​widgets/​grid/​grid.php | Grid]] and GridViewer (nebula project). |
 +^ManagedToolBarController |Specific [[ http://​help.eclipse.org/​mars/​index.jsp?​topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fwidgets%2FToolBar.html | ToolBar]] used in section. Children should be ActionControllers. |
 +^PShelfController |Composition around nebula component [[https://​www.eclipse.org/​nebula/​widgets/​pshelf/​pshelf.php | PShelf]]. Children should be PShelfItemControllers. |
 +^TableController |Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fwidgets%2FTable.html | Table]] and a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjface%2Fviewers%2FTableViewer.html | TableViewer]]. |
 +^ToolBarController |Composition around a [[ http://​help.eclipse.org/​mars/​index.jsp?​topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fwidgets%2FToolBar.html | ToolBar]]. Children should be ToolItemControllers. |
 +^TreeController |Composition around a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fwidgets%2FTree.html | Tree]] and a [[http://​help.eclipse.org/​mars/​index.jsp?​topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjface%2Fviewers%2FTreeViewer.html | TreeViewer]]. |
 +
 +====== Other controllers ======
 +|< 100% 200px ->|
 +^ActionController| Child controller of ManagedToolBarController or component of a ButtonController. |
 +^ButtonController| Composition of a Button. It could contain, an Action Controller or define its own action. |
 +^ToolItemController| Child controller of ToolItemController,​ composition of a ToolItem. |
 +^FormattedTextController| Composition around a FormattedText (nebula project). |
 +^GridColumnController| Child controller of GridController (nebula project) corresponding to a column. |
 +^GridColumnGroupController| Child controller of GridController (nebula project) corresponding to a group of columns. |
 +^PGroupMenuController| Menu of a PGroup (nebula project). |
 +^PGroupToolItemController| Tool Item of a PGroup (nebula project). |
 +^TableColumnController| Child controller of TableController,​ composition of a TableViewerColumn. |
  
controllers/controllers.txt · Last modified: 2015/10/05 17:52 (external edit)