Interface IADTabbox

All Superinterfaces:
UIPart
All Known Implementing Classes:
AbstractADTabbox, CompositeADTabbox

public interface IADTabbox extends UIPart
Interface for header+details AD_Tabs UI for AD_Window.
Author:
Low Heng Sin
  • Method Details

    • getSelectedIndex

      int getSelectedIndex()
      Returns:
      selected header tab index
    • setSelectedIndex

      void setSelectedIndex(int i)
      set selected header tab
      Parameters:
      i - tab index
    • updateSelectedIndex

      boolean updateSelectedIndex(int oldTabIndex, int newTabIndex)
      Change selected header tab index from oldTabIndex to newTabIndex
      Parameters:
      oldTabIndex -
      newTabIndex -
      Returns:
      true if selected tab successfully change to newTabIndex
    • getSelectedTabpanel

      IADTabpanel getSelectedTabpanel()
      Returns:
      selected header IADTabpanel instance
    • canNavigateTo

      boolean canNavigateTo(int fromIndex, int toIndex)
      Parameters:
      fromIndex -
      toIndex -
      Returns:
      true if user can change selected tab from fromIndex to toIndex, false otherwise
    • isDisplay

      boolean isDisplay(int index)
      Parameters:
      index -
      Returns:
      true if tab at index visible, false otherwise
    • addTab

      void addTab(GridTab tab, IADTabpanel tabPanel)
      add new tab (AD_Tab)
      Parameters:
      tab - GridTab for AD_Tab
      tabPanel - IADTabpanel instance for AD_Tab
    • getTabCount

      int getTabCount()
      Returns:
      Number of tab
    • evaluate

      void evaluate(DataStatusEvent e)
      Evaluate state of each tab after DataStatusEvent
      Parameters:
      e -
    • getPath

      String getPath()
      Returns:
      folder like parent/child path to the selected tab (for e.g Business Partner > Location)
    • setSelectionEventListener

      void setSelectionEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
      Set event listener for tab selection change event
      Parameters:
      listener -
    • getADTabpanel

      IADTabpanel getADTabpanel(int index)
      Parameters:
      index - tab index
      Returns:
      IADTabpanel instance at index
    • findADTabpanel

      IADTabpanel findADTabpanel(GridTab gTab)
      Parameters:
      gTab -
      Returns:
      IADTabpanel instance for gTab or null if not found
    • setADWindowPanel

      void setADWindowPanel(AbstractADWindowContent abstractADWindowPanel)
      Set AD Window content part that own this IADTabbox instance.
      Parameters:
      abstractADWindowPanel -
    • onDetailRecord

      void onDetailRecord()
      Edit current row of selected detail tab. The selected detail tab will become the new header tab.
    • isSortTab

      boolean isSortTab()
      Returns:
      true if current header tab is a sort tab
    • needSave

      boolean needSave(boolean rowChange, boolean onlyRealChange)
      Parameters:
      rowChange -
      onlyRealChange -
      Returns:
      true if there are changes pending to be save
    • dataIgnore

      void dataIgnore()
      ignore/undo all pending changes
    • getSelectedGridTab

      GridTab getSelectedGridTab()
      Returns:
      GridTab instance of header tab
    • dataSave

      boolean dataSave(boolean onSaveEvent)
      Save changes
      Parameters:
      onSaveEvent -
      Returns:
      true if save is successful
    • setDetailPaneStatusMessage

      void setDetailPaneStatusMessage(String status, boolean error)
      Update status text of DetailPane
      Parameters:
      status -
      error -
    • getSelectedDetailADTabpanel

      IADTabpanel getSelectedDetailADTabpanel()
      Returns:
      the selected detail IADTabpanel instance
    • getDirtyADTabpanel

      IADTabpanel getDirtyADTabpanel()
      Returns:
      dirty IADTabpanel that need save ( if any )
    • updateDetailPaneToolbar

      void updateDetailPaneToolbar(boolean changed, boolean readOnly)
      Parameters:
      changed - true if header tab has changed
      readOnly - true if header tab is readonly
    • setDetailPaneSelectedTab

      void setDetailPaneSelectedTab(int tabIndex, int currentRow)
      Set selected tab of DetailPane to tabIndex.
      Parameters:
      tabIndex -
      currentRow - set current row of tab at tabIndex to currentRow
    • isDetailPaneLoaded

      boolean isDetailPaneLoaded()
      Returns:
      true if all the tabs of detail pane have been linked up with header tab