Class APanel

  • All Implemented Interfaces:
    ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, IProcessUI, DataStatusListener

    public final class APanel
    extends CPanel
    implements DataStatusListener, ChangeListener, ActionListener, IProcessUI
    Main Panel of application window.
      Structure:
          (MenuBar) -> to be added to owning window
                    northPanel  (ToolBar)
                    tabPanel
                    southPanel  (StatusBar)
      
    Version:
    $Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $ Colin Rooney 2007/03/20 RFE#1670185 & related BUG#1684142 - Extend Sec to Info Queries
    Author:
    Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1824621 ] History button can't be canceled
  • BF [ 1941271 ] VTreePanel is modifying even if is save wasn't successfull
  • FR [ 1943731 ] Window data export functionality
  • FR [ 1974354 ] VCreateFrom.create should be more flexible
  • BF [ 1996056 ] Report error message is not displayed
  • BF [ 1998575 ] Document Print is discarding any error, Teo Sarca, teo.sarca@gmail.com
  • BF [ 2876892 ] Save included tab before calling button action https://sourceforge.net/tracker/?func=detail&aid=2876892&group_id=176962&atid=879332, victor.perez@e-evolution.com, Cristina Ghita, www.arhipac.ro, hengsin, hengsin.low@idalica.com
  • See Also:
    [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail=1966328=176962=879335, [ 2877111 ] See identifiers columns when delete records https://sourceforge.net/tracker/?func=detail=879335=2877111=176962, [2887701] https://sourceforge.net/tracker/?func=detail=879335=2887701=176962, Serialized Form
    • Field Detail

      • aIgnore

        public AppsAction aIgnore
        Ignore Button
      • aSaveAndCreate

        public AppsAction aSaveAndCreate
        Save & Create Button
      • aLock

        public AppsAction aLock
        Private Lock Button
    • Constructor Detail

      • APanel

        public APanel​(GridController gc,
                      int windowNo)
        Constructs a new instance. Need to call initPanel for dynamic initialization
      • APanel

        public APanel​(AWindow window)
    • Method Detail

      • dispose

        public void dispose()
        Dispose
      • getMenuBar

        public JMenuBar getMenuBar()
        Return MenuBar
        Returns:
        JMenuBar
      • getTitle

        public String getTitle()
        Get Title of Window
        Returns:
        String with Title
      • initPanel

        public boolean initPanel​(int AD_Workbench_ID,
                                 int AD_Window_ID,
                                 MQuery query)
        Dynamic Panel Initialization - either single window or workbench.
          either
          - Workbench tabPanel    (VTabbedPane)
              - Tab               (GridController)
          or
          - Workbench tabPanel    (VTabbedPane)
              - Window            (VTabbedPane)
                  - Tab           (GridController)
          
        tabPanel
        Parameters:
        AD_Workbench_ID - if > 0 this is a workbench, AD_Window_ID ignored
        AD_Window_ID - if not a workbench, Window ID
        query - if not a Workbench, Zoom Query - additional SQL where clause
        Returns:
        true if Panel is initialized successfully
      • getWindowNo

        public int getWindowNo()
        Get Current Window No
        Returns:
        win no
      • getImage

        public Image getImage()
        Get Window Image
        Returns:
        image or null
      • setStatusLine

        public void setStatusLine​(String text,
                                  boolean error)
        Set Status Line to text
        Parameters:
        text - clear text
        error - error flag
      • cmd_save

        public boolean cmd_save​(boolean manualCmd)
        If required ask if you want to save and save it
        Parameters:
        manualCmd - true if invoked manually (i.e. force)
        Returns:
        true if saved
      • cmd_saveAndCreate

        public boolean cmd_saveAndCreate​(boolean manualCmd)
      • cmd_process

        public void cmd_process()
        opens a pulldown menu to start processes from "Button" type fields.
      • lockUI

        public void lockUI​(ProcessInfo pi)
        Lock User Interface. Called from the Worker before processing
        Specified by:
        lockUI in interface IProcessUI
        Parameters:
        pi - process info
      • unlockUI

        public void unlockUI​(ProcessInfo pi)
        Unlock User Interface. Called from the Worker when processing is done
        Specified by:
        unlockUI in interface IProcessUI
        Parameters:
        pi - of execute ASync call
      • isUILocked

        public boolean isUILocked()
        Is the UI locked (Internal method)
        Specified by:
        isUILocked in interface IProcessUI
        Returns:
        true, if UI is locked
      • executeASync

        public void executeASync​(ProcessInfo pi)
        Method to be executed async. Called from the ASyncProcess worker
        Parameters:
        pi - process info
      • getCurrentTab

        public GridTab getCurrentTab()
        Get Current Tab
        Returns:
        current tab
      • noOfTabs

        public int noOfTabs()
        Get the number of tabs in the panels JTabbedPane.
        Returns:
        no of tabs in the JTabbedPane of the panel
      • getSelectedTabIndex

        public int getSelectedTabIndex()
        Get the selected tab index of the panels JTabbedPane.
        Returns:
        selected index of JTabbedPane
      • setSelectedTabIndex

        public void setSelectedTabIndex​(int index)
        Set the tab index of the panels JTabbedPane.
      • getSelectedTabName

        public String getSelectedTabName()
        Get the name of the selected tab in the panels JTabbedPane.
        Returns:
        name of selected tab
      • toString

        public String toString()
        String representation
        Overrides:
        toString in class CPanel
        Returns:
        String representation
      • isNested

        public boolean isNested()
        Returns:
        boolean
      • getCurrentTabbedPane

        public JTabbedPane getCurrentTabbedPane()
        Returns:
        JTabbedPane
      • statusUpdate

        public void statusUpdate​(String message)
        Description copied from interface: IProcessUI
        Provide status feedback to user
        Specified by:
        statusUpdate in interface IProcessUI
      • ask

        public void ask​(String message,
                        Callback<Boolean> callback)
        Description copied from interface: IProcessUI
        Prompt for user input. Example Usage in process:
                    final StringBuffer answer = new StringBuffer();
                        aProcessMonitor.ask(adMessage, new Callback() {
        
        Specified by:
        ask in interface IProcessUI
      • download

        public void download​(File file)
        Description copied from interface: IProcessUI
        add to list of file available for download after process end
        Specified by:
        download in interface IProcessUI