Package com.inet.viewer
Interface NavigationView
-
- All Superinterfaces:
ViewerComponent
- All Known Implementing Classes:
SwingNavigationView
public interface NavigationView extends ViewerComponent
The navigation view is responsible for the group tree, the search view, and any other navigation tabs needed by the application. These navigation tabs are displayed as individual tabs, that is, the user can switch between them. The typical use of a NavigationView would be a holder for a group tree to the left of the report scroll view, however it can be used in any other manner as well.- Since:
- 7.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addNavigationTab(java.lang.String title, NavigationTab tab)
Add a new NavigationTab to this NavigationView with a certain title.NavigationTab
getNavigationTab(int index)
Returns the navigation tab at the specified index - the index is 0-based and is determined by when the navigation tabs were added to the navigation view.int
getNavigationTabIndex(java.lang.String tabName)
Returns the NavigationTab index of the first found NavigationTab with the given name, or -1 if none is found with this name.int
getNavigationTabsCount()
Get the amount of navigation tabs in this navigation view - this is also one higher than the allowed index of any navigation tab.RenderData
getReportData()
Returns the RenderData object of this NavigationView, that is, the source of the report databoolean
isVisible()
Returns whether this navigation view is set to be visible or notvoid
reload()
Reloads the data underlying this navigation view and renews the display with the new data.void
removeNavigationTab(int index)
Removes the navigation tab at the specified index and causes the navigation view to be refreshed without this navigation tab.void
setVisible(boolean visible)
Shows or hides this navigation view.void
showError(java.lang.Throwable th)
Called when any error occurs within the navigation viewvoid
showNavigationTab(int tabIndex)
Causes the navigation tab at the given index to be selected and shown for this navigation view.-
Methods inherited from interface com.inet.viewer.ViewerComponent
getComponent
-
-
-
-
Method Detail
-
showError
void showError(java.lang.Throwable th)
Called when any error occurs within the navigation view- Parameters:
th
- Exception which has occurred.- Since:
- 7.0
-
getReportData
RenderData getReportData()
Returns the RenderData object of this NavigationView, that is, the source of the report data- Returns:
- The RenderData object of this NavigationView, that is, the source of the report data
- Since:
- 7.0
-
addNavigationTab
void addNavigationTab(java.lang.String title, NavigationTab tab)
Add a new NavigationTab to this NavigationView with a certain title. This allows you to create your own NavigationTab and add it to the NavigationView.- Parameters:
title
- Title the navigation tab is to havetab
- NavigationTab to add to the navigation view.- Since:
- 7.0
-
getNavigationTab
NavigationTab getNavigationTab(int index)
Returns the navigation tab at the specified index - the index is 0-based and is determined by when the navigation tabs were added to the navigation view. The maximum allowed index is getNavigationTabsCount()-1.- Parameters:
index
- Index of NavigationTab to return, 0-based- Returns:
- NavigationTab at this index
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if no such navigation tab exists- Since:
- 7.0
-
removeNavigationTab
void removeNavigationTab(int index)
Removes the navigation tab at the specified index and causes the navigation view to be refreshed without this navigation tab. The maximum allowed index is getNavigationTabsCount()-1.- Parameters:
index
- Index of navigation tab to remove- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if no such navigation tab exists- Since:
- 7.0
-
getNavigationTabsCount
int getNavigationTabsCount()
Get the amount of navigation tabs in this navigation view - this is also one higher than the allowed index of any navigation tab. That is, to iterate through all navigation tabs, example code would be:int count = getNavigationTabsCount();
for (int i=0; i < count; i++) {
NavigationTab tab = getNavigationTab(i);
...
}- Returns:
- The amount of navigation tabs in the navigation view.
- Since:
- 7.0
-
isVisible
boolean isVisible()
Returns whether this navigation view is set to be visible or not- Returns:
- Whether this navigation view is set to be visible or not
- Since:
- 7.0
-
setVisible
void setVisible(boolean visible)
Shows or hides this navigation view.- Parameters:
visible
- Show this navigation view or not- Since:
- 7.0
-
reload
void reload()
Reloads the data underlying this navigation view and renews the display with the new data. Reload will be called whenever the ReportView is reloaded in order to prevent two different states between the ReportView and the NavigationView. It will be passed on to all navigation tabs in this navigation view.- Since:
- 7.0
-
getNavigationTabIndex
int getNavigationTabIndex(java.lang.String tabName)
Returns the NavigationTab index of the first found NavigationTab with the given name, or -1 if none is found with this name. See the constants for examples to use to retrieve the search or group views- Parameters:
tabName
- Name of NavigationTab for which the index is to be returned.- Returns:
- NavigationTab's index
- Since:
- 7.0
- See Also:
GroupView.TAB_GROUP_TREE
,SearchView.TAB_SEARCH
-
showNavigationTab
void showNavigationTab(int tabIndex)
Causes the navigation tab at the given index to be selected and shown for this navigation view. The index for any navigation tab can be retrieved using the method getNavigationTabIndex(String).- Parameters:
tabIndex
- Index of navigation tab to select and display.- Throws:
java.lang.IndexOutOfBoundsException
- If index given does not correspond to a navigation tab- Since:
- 7.0
-
-