Difference between revisions of "Scout/Concepts/ViewButton"

From Eclipsepedia

Jump to: navigation, search
m (Example)
 
Line 68: Line 68:
 
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
 
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
  
 
=== Screenshot ===
 
{{note|TODO|Add a screenshot (or remove this section, if there is no screenshot to make)}}
 
  
 
== See Also ==
 
== See Also ==
 
* {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}
 
* {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}

Latest revision as of 07:32, 2 May 2013


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitter
Bugzilla
Bugzilla


Specific type of Action.

  • implements: I obj.pngIViewButton
  • extends: C obj.pngAbstractViewButton

Contents

[edit] Description

ViewButton can be used to switch beetween different views in the main windows of an 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.

[edit] Outline ViewButton

Specific case of a ViewButton (it extends: C obj.pngAbstractOutlineViewButton ) OutlineViewButtons link the Desktop with an Outline.

[edit] Screenshot

Here an example with the Swing Nimbus look and feel: Scout ViewButtons Nimbus.png

Here an example with the Swing Rayo look and feel: Scout ViewButtons Rayo.png

[edit] Examples

Here an example of a simple view button, that has nothing to do with an outline:

@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);
  }
}

Here an example of a outline view button:

@Order(10.0)
public class StandardOutlineViewButton extends AbstractOutlineViewButton {
  public StandardOutlineViewButton() {
    super(Desktop.this, StandardOutline.class);
  }
 
  @Override
  protected String getConfiguredText() {
    return TEXTS.get("Standard");
  }
}

[edit] Properties

Defined with getConfiguredXxxxxx() methods.


[edit] Events

Defined with execXxxxxx() methods.


[edit] See Also