Annotation Type WorkbenchScreen


  • @Inherited
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface WorkbenchScreen
    Classes annotated with this are considered WorkbenchParts that display some form of non-editable (but possibly still interactive) content. If the content is associated with a VFS path, or otherwise represents some sort of document that can be edited and saved, developers should consider using @WorkbenchEditor.

    All classes annotated with @WorkbenchScreen must have a declared or inherited method annotated with @WorkbenchPartTitle.

    There are two options for providing the screen's view:

    1. the class implements com.google.gwt.user.client.ui.IsWidget (often by extending com.google.gwt.user.client.ui.Composite)
    2. the class declares or inherits a zero-argument method annotated with @WorkbenchPartView that returns the com.google.gwt.user.client.ui.IsWidget or preferably org.jboss.errai.common.client.api.IsElement that handles the view. In this case the class need not implement com.google.gwt.user.client.ui.IsWidget.

    Developers wishing to separate view from logic via the MVP pattern will choose the second option.

    WorkbechScreens can receive the following life-cycle calls:

    • @OnStartup
    • @OnOpen
    • @OnFocus
    • @OnLostFocus
    • @OnMayClose
    • @OnClose
    • @OnShutdown
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String identifier
      Identifier that should be unique within application.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean isDynamic
      Indicates that this screen can be discovered and loaded at runtime.
      Class<?> owningPerspective
      By default, a Workbench Screen will show up in the current active perspective.
      int preferredHeight
      Defines the preferred height.
      int preferredWidth
      Defines the preferred width.
    • Element Detail

      • identifier

        String identifier
        Identifier that should be unique within application.
      • owningPerspective

        Class<?> owningPerspective
        By default, a Workbench Screen will show up in the current active perspective. If this parameter is specified, this screen will only be shown on the given perspective. An attempt to navigate to this screen when a different perspective is active will first result in a switch to the owning perspective, then the screen will be shown in that perspective.
        Default:
        void.class
      • preferredHeight

        int preferredHeight
        Defines the preferred height. Preferred means that this Height will be used only if this screen is the trigger to create a new panel, if panel already exists this information is ignored.
        Default:
        -1
      • preferredWidth

        int preferredWidth
        Defines the preferred width. Preferred means that this Width will be used only if this screen is the trigger to create a new panel, if panel already exists this information is ignored.
        Default:
        -1
      • isDynamic

        boolean isDynamic
        Indicates that this screen can be discovered and loaded at runtime. This is useful when building plugins or extensions where the screen is part of an external script loaded at runtime, as opposed to being statically compiled into the main application.
        Default:
        false