|
|
Line 1: |
Line 1: |
− | {{ScoutPage|cat=Component Model}}
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | Specific type of {{ScoutLink|Concepts|Action|Action}}.
| + | |
− | | + | |
− | * implements: {{ScoutJavadoc|IViewButton|I}}
| + | |
− | * extends: {{ScoutJavadoc|AbstractViewButton|C}}
| + | |
− | | + | |
− | == Description ==
| + | |
− | ViewButton can be used to switch beetween different views in the main windows of an {{ScoutLink|Concepts|Outline based application}}. They appear on top of the page area (page tree and page content) in the main windows.
| + | |
− | | + | |
− | The Rayo look and feel render them as tabs. | + | |
− | | + | |
− | ===Outline ViewButton===
| + | |
− | Specific case of a ViewButton (it extends: {{ScoutJavadoc|AbstractOutlineViewButton|C}})
| + | |
− | OutlineViewButtons link the {{ScoutLink|Concepts|Desktop|Desktop}} with an {{ScoutLink|Concepts|Outline|Outline}}.
| + | |
− | | + | |
− | == Screenshot ==
| + | |
− | Here an example with the Swing Nimbus look and feel:
| + | |
− | [[Image:Scout ViewButtons Nimbus.png]]
| + | |
− | | + | |
− | Here an example with the {{ScoutLink|Concepts|Rayo|Swing Rayo}} look and feel:
| + | |
− | [[Image:Scout ViewButtons Rayo.png]]
| + | |
− | | + | |
− | == Examples ==
| + | |
− | Here an example of a simple view button, that has nothing to do with an outline:
| + | |
− | <source lang="java">
| + | |
− | @Order(30.0)
| + | |
− | public class DrawLineViewButton extends AbstractViewButton {
| + | |
− | | + | |
− | @Override
| + | |
− | protected String getConfiguredIconId() {
| + | |
− | return Icons.Pen;
| + | |
− | }
| + | |
− | | + | |
− | @Override
| + | |
− | protected String getConfiguredText() {
| + | |
− | return TEXTS.get("DrawLine");
| + | |
− | }
| + | |
− | | + | |
− | @Override
| + | |
− | protected void execAction() throws ProcessingException {
| + | |
− | MessageBox.showOkMessage(TEXTS.get("DrawLineTitle"), TEXTS.get("DrawLineInfo"), null);
| + | |
− | setSelected(false);
| + | |
− | }
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | Here an example of a outline view button:
| + | |
− | <source lang="java">
| + | |
− | @Order(10.0)
| + | |
− | public class StandardOutlineViewButton extends AbstractOutlineViewButton {
| + | |
− | public StandardOutlineViewButton() {
| + | |
− | super(Desktop.this, StandardOutline.class);
| + | |
− | }
| + | |
− | | + | |
− | @Override
| + | |
− | protected String getConfiguredText() {
| + | |
− | return TEXTS.get("Standard");
| + | |
− | }
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | == Properties ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
| + | |
− | | + | |
− | | + | |
− | == Events ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
| + | |
− | | + | |
− | | + | |
− | == See Also ==
| + | |
− | * {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}
| + | |