hudson.model
Class ViewGroupMixIn

java.lang.Object
  extended by hudson.model.ViewGroupMixIn

public abstract class ViewGroupMixIn
extends Object

Implements ViewGroup to be used as a "mix-in". Not meant for a consumption from outside ViewGroups.

How to use this class

  1. Create three data fields in your class:
     private String primaryView;
     private CopyOnWriteArrayList<View> views;
     private ViewsTabBar viewsTabBar;
     
  2. Define a transient field and store ViewGroupMixIn subype, then wire up getters and setters:
     private transient ViewGroupMixIn = new ViewGroupMixIn() {
         List<View> views() { return views; }
         ...
     }
     

    Author:
    Kohsuke Kawaguchi
    See Also:
    ItemGroupMixIn

    Constructor Summary
    protected ViewGroupMixIn(ViewGroup owner)
               
     
    Method Summary
     void addView(View v)
               
     boolean canDelete(View view)
               
     void deleteView(View view)
               
     View getPrimaryView()
              Returns the primary View that renders the top-page of Hudson.
     View getView(String name)
               
     Collection<View> getViews()
              Gets the read-only list of all Views.
     void onViewRenamed(View view, String oldName, String newName)
               
    protected abstract  String primaryView()
               
    protected abstract  void primaryView(String newName)
               
    protected abstract  List<View> views()
              Returns all the views.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    ViewGroupMixIn

    protected ViewGroupMixIn(ViewGroup owner)
    Method Detail

    views

    protected abstract List<View> views()
    Returns all the views. This list must be concurrently iterable.


    primaryView

    protected abstract String primaryView()

    primaryView

    protected abstract void primaryView(String newName)

    addView

    public void addView(View v)
                 throws IOException
    Throws:
    IOException

    canDelete

    public boolean canDelete(View view)

    deleteView

    public void deleteView(View view)
                    throws IOException
    Throws:
    IOException

    getView

    public View getView(String name)

    getViews

    @Exported
    public Collection<View> getViews()
    Gets the read-only list of all Views.


    getPrimaryView

    @Exported
    public View getPrimaryView()
    Returns the primary View that renders the top-page of Hudson.


    onViewRenamed

    public void onViewRenamed(View view,
                              String oldName,
                              String newName)


    Copyright © 2004-2013. All Rights Reserved.