com.atlassian.jira.plugin.browsepanel
Class AbstractFragmentBasedTabPanel<D extends TabPanelModuleDescriptor,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 TabPanelModuleDescriptor,C extends BrowseContext,F extends ProjectTabPanelFragment>
extends 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
 String createEmptyContent()
          Create content for when there ae no fragments shown.
 String getHtml(C ctx)
          Used to render the tab.
 String getInlineHeader()
           
protected abstract  List<F> getLeftColumnFragments(C ctx)
           
protected  List<MenuFragment> getMenuFragments()
           
protected abstract  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 TabPanelModuleDescriptor 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 TabPanelModuleDescriptor,C extends BrowseContext>
Parameters:
descriptor - the descriptor for this module as defined in the plugin xml descriptor.

getHtml

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

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

getInlineHeader

public String getInlineHeader()

createEmptyContent

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

Returns:
the html for the empty content.

getLeftColumnFragments

protected abstract 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 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 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 TabPanelModuleDescriptor,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-2012 Atlassian. All Rights Reserved.