com.atlassian.jira.plugin.browsepanel
Class AbstractFragmentBasedTabPanel<D extends AbstractTabPanelModuleDescriptor,C extends BrowseContext,F extends ProjectTabPanelFragment>

java.lang.Object
  extended by com.atlassian.jira.plugin.browsepanel.AbstractFragmentBasedTabPanel<D,C,F>
All Implemented Interfaces:
TabPanel<D,C>
Direct Known Subclasses:
AbstractFragmentBasedComponentTabPanel, AbstractFragmentBasedVersionTabPanel, IssuesProjectTabPanel, SummaryProjectTabPanel

public abstract class AbstractFragmentBasedTabPanel<D extends AbstractTabPanelModuleDescriptor,C extends BrowseContext,F extends ProjectTabPanelFragment>
extends java.lang.Object
implements TabPanel<D,C>

Abstract base for TabPanel implementers to extend. This looks after the layout of all the fragments on the page and delegates content to the ProjectTabPanelFragment.

Since:
v4.0

Field Summary
protected  D moduleDescriptor
           
 
Constructor Summary
AbstractFragmentBasedTabPanel()
           
 
Method Summary
 java.lang.String createEmptyContent()
          Create content for when there ae no fragments shown.
 java.lang.String getHtml(C ctx)
          Used to render the tab.
protected abstract  java.util.List<F> getLeftColumnFragments(C ctx)
           
protected  java.util.List<MenuFragment> getMenuFragments()
           
protected abstract  java.util.List<F> getRightColumnFragments(C ctx)
           
 void init(D descriptor)
          Initialize the tab panel panel with the plugins ProjectTabPanelModuleDescriptor.
 boolean showPanel(C context)
          Determine whether or not to show this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moduleDescriptor

protected D extends AbstractTabPanelModuleDescriptor moduleDescriptor
Constructor Detail

AbstractFragmentBasedTabPanel

public AbstractFragmentBasedTabPanel()
Method Detail

init

public void init(D descriptor)
Description copied from interface: TabPanel
Initialize the tab panel panel with the plugins ProjectTabPanelModuleDescriptor. This is usually used for rendering velocity views.

Specified by:
init in interface TabPanel<D extends AbstractTabPanelModuleDescriptor,C extends BrowseContext>
Parameters:
descriptor - the descriptor for this module as defined in the plugin xml descriptor.

getHtml

public java.lang.String getHtml(C ctx)
Description copied from interface: TabPanel
Used to render the tab.

Specified by:
getHtml in interface TabPanel<D extends AbstractTabPanelModuleDescriptor,C extends BrowseContext>
Parameters:
ctx - The current context the tab is rendering in.
Returns:
Escaped string with the required html.

createEmptyContent

public java.lang.String createEmptyContent()
Create content for when there ae no fragments shown.

Returns:
the html for the empty content.

getLeftColumnFragments

protected abstract java.util.List<F> getLeftColumnFragments(C ctx)
Parameters:
ctx - the browse context
Returns:
a list of fragments to be displayed in the left column of the project tab panel

getRightColumnFragments

protected abstract java.util.List<F> getRightColumnFragments(C ctx)
Parameters:
ctx - the browse context
Returns:
a list of fragments to be displayed in the right column of the project tab panel

getMenuFragments

protected java.util.List<MenuFragment> getMenuFragments()
Returns:
a list of fragments to be displayed in the menu section of the panel

showPanel

public boolean showPanel(C context)
Description copied from interface: TabPanel
Determine whether or not to show this.

Specified by:
showPanel in interface TabPanel<D extends AbstractTabPanelModuleDescriptor,C extends BrowseContext>
Parameters:
context - The current context the tab is rendering in.
Returns:
True if the conditions are right to display tab, otherwise false.


Copyright © 2002-2010 Atlassian. All Rights Reserved.