diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java index 15c18f999c..22b2d4ef2f 100644 --- a/client/src/org/compiere/apps/APanel.java +++ b/client/src/org/compiere/apps/APanel.java @@ -2100,6 +2100,33 @@ public final class APanel extends CPanel return m_curTab; } // getCurrentTab + /** + * Get the number of tabs in the panels JTabbedPane. + * @return no of tabs in the JTabbedPane of the panel + */ + public int noOfTabs() { + return m_curWinTab.getTabCount(); + } + + /** + * Get the selected tab index of the panels JTabbedPane. + * @return selected index of JTabbedPane + */ + public int getSelectedTabIndex() { + return m_curWinTab.getSelectedIndex(); + } + + /** + * Get the name of the selected tab in the panels JTabbedPane. + * @return name of selected tab + */ + public String getSelectedTabName() { + String title = m_curWinTab.getTitleAt(m_curWinTab.getSelectedIndex()); + title = title.substring(title.indexOf("")+6); + title = title.substring(0,title.indexOf("<")); + return title; + } + /** * String representation * @return String representation