Class AbstractADTabbox

java.lang.Object
org.adempiere.webui.part.AbstractUIPart
org.adempiere.webui.adwindow.AbstractADTabbox
All Implemented Interfaces:
IADTabbox, ISupportMask, UIPart
Direct Known Subclasses:
CompositeADTabbox

public abstract class AbstractADTabbox extends AbstractUIPart implements IADTabbox
Abstract base class for header+details AD_Tabs UI for AD_Window.
Author:
Ashley G Ramdass, Low Heng Sin
  • Field Details

  • Constructor Details

    • AbstractADTabbox

      public AbstractADTabbox()
      default constructor
  • Method Details

    • addTab

      public void addTab(GridTab gTab, IADTabpanel tabPanel)
      Add new tab(AD_Tab).
      Delegate to doAddTab(GridTab, IADTabpanel)
      Specified by:
      addTab in interface IADTabbox
      Parameters:
      gTab - grid tab model
      tabPanel -
    • doAddTab

      protected abstract void doAddTab(GridTab tab, IADTabpanel tabPanel)
      Handle add new tab to UI.
      Override to implement add new tab to UI.
      Parameters:
      tab -
      tabPanel -
    • isEnabledAt

      public boolean isEnabledAt(int index)
      Is tab enable at index
      Parameters:
      index - of tab
      Returns:
      true if enable, false otherwise
    • updateSelectedIndex

      public boolean updateSelectedIndex(int oldIndex, int newIndex)
      Change selected tab index from oldIndex to newIndex.
      Delegate to doTabSelectionChanged(int, int).
      Specified by:
      updateSelectedIndex in interface IADTabbox
      Parameters:
      oldIndex -
      newIndex -
      Returns:
      true if successfully switch to newIndex
    • doTabSelectionChanged

      protected abstract void doTabSelectionChanged(int oldIndex, int newIndex)
      Handle tab selection change event.
      Override to update UI for tab selection change.
      Parameters:
      oldIndex -
      newIndex -
    • isDisplay

      public boolean isDisplay(int index)
      Evaluate display logic
      Specified by:
      isDisplay in interface IADTabbox
      Parameters:
      index -
      Returns:
      true if visible, false otherwise
    • canNavigateTo

      public boolean canNavigateTo(int fromIndex, int toIndex)
      Specified by:
      canNavigateTo in interface IADTabbox
      Parameters:
      fromIndex -
      toIndex -
      Returns:
      true if can change selected tab from fromIndex to toIndex
    • canNavigateTo

      public boolean canNavigateTo(int fromIndex, int toIndex, boolean checkRecordID)
      Is navigation allow from fromIndex to toIndex
      Parameters:
      fromIndex -
      toIndex -
      checkRecordID - true to validate fromIndex has a valid record id
      Returns:
      true if can change selected tab from fromIndex to toIndex
    • getPath

      public String getPath()
      Get break crumb path
      Specified by:
      getPath in interface IADTabbox
      Returns:
      full break crumb path
    • evaluate

      public void evaluate(DataStatusEvent e)
      Handle DataStatusEvent.
      Delegate to updateTabState().
      Specified by:
      evaluate in interface IADTabbox
      Parameters:
      e - event
    • updateTabState

      protected abstract void updateTabState()
      Update UI state of tab (visibility, activation and if need invalidate)
    • getTabCount

      public int getTabCount()
      Get number of tab
      Specified by:
      getTabCount in interface IADTabbox
      Returns:
      the number of tab panels present
    • getADTabpanel

      public IADTabpanel getADTabpanel(int index)
      Get IADTabpanel at index
      Specified by:
      getADTabpanel in interface IADTabbox
      Parameters:
      index -
      Returns:
      IADTabpanel
    • setSelectedIndex

      public void setSelectedIndex(int newIndex)
      Set newIndex as selected tab.
      Delegate to updateSelectedIndex(int, int).
      Specified by:
      setSelectedIndex in interface IADTabbox
      Parameters:
      newIndex -
    • setADWindowPanel

      public void setADWindowPanel(AbstractADWindowContent abstractADWindowPanel)
      Set parent AD window panel
      Specified by:
      setADWindowPanel in interface IADTabbox
      Parameters:
      abstractADWindowPanel -