Class Info

    • Field Detail

      • INFO_WIDTH

        protected final int INFO_WIDTH
      • SCREEN_HEIGHT

        protected final int SCREEN_HEIGHT
      • p_WindowNo

        protected int p_WindowNo
        Master (owning) Window
      • p_tableName

        protected String p_tableName
        Table Name
      • p_keyColumn

        protected String p_keyColumn
        Key Column Name
      • p_multiSelection

        protected boolean p_multiSelection
        Enable more than one selection
      • p_whereClause

        protected String p_whereClause
        Initial WHERE Clause
      • p_layout

        protected Info_Column[] p_layout
        Layout of Grid
      • p_loadedOK

        protected boolean p_loadedOK
        Loading success indicator
      • log

        protected CLogger log
        Logger
      • addonPanel

        protected CPanel addonPanel
      • parameterPanel

        protected CPanel parameterPanel
    • Constructor Detail

      • Info

        protected Info​(Frame frame,
                       boolean modal,
                       int WindowNo,
                       String tableName,
                       String keyColumn,
                       boolean multiSelection,
                       String whereClause)
        Detail Constructor
        Parameters:
        frame - parent frame
        modal - modal
        WindowNo - window no
        tableName - table name
        keyColumn - key column name
        multiSelection - multiple selection
        whereClause - where clause
      • Info

        protected Info​(Frame frame,
                       boolean modal,
                       int WindowNo,
                       String tableName,
                       String keyColumn,
                       boolean multiSelection,
                       String whereClause,
                       boolean lookup)
        Detail Constructor
        Parameters:
        frame - parent frame
        modal - modal
        WindowNo - window no
        tableName - table name
        keyColumn - key column name
        multiSelection - multiple selection
        whereClause - where clause
        lookup -
    • Method Detail

      • create

        public static Info create​(Frame frame,
                                  boolean modal,
                                  int WindowNo,
                                  String tableName,
                                  String keyColumn,
                                  String value,
                                  boolean multiSelection,
                                  String whereClause)
        Factory Constructor
        Parameters:
        frame - parent frame
        modal - new window is modal
        WindowNo - window no
        tableName - table name of the search
        keyColumn - key column of the search
        value - query value
        multiSelection - allow to select more than one row
        whereClause - fully qualified where clause for the search
        Returns:
        special or general Info Window
      • showBPartner

        public static void showBPartner​(Frame frame,
                                        int WindowNo)
        Show BPartner Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
      • showAsset

        public static void showAsset​(Frame frame,
                                     int WindowNo)
        Show Asset Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
      • showProduct

        public static void showProduct​(Frame frame,
                                       int WindowNo)
        Show Product Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
      • showOrder

        public static void showOrder​(Frame frame,
                                     int WindowNo,
                                     String value)
        Show Order Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
        value - query value
      • showInvoice

        public static void showInvoice​(Frame frame,
                                       int WindowNo,
                                       String value)
        Show Invoice Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
        value - query value
      • showInOut

        public static void showInOut​(Frame frame,
                                     int WindowNo,
                                     String value)
        Show Shipment Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
        value - query value
      • showPayment

        public static void showPayment​(Frame frame,
                                       int WindowNo,
                                       String value)
        Show Payment Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
        value - query value
      • showCashLine

        public static void showCashLine​(Frame frame,
                                        int WindowNo,
                                        String value)
        Show Cash Line Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
        value - query value
      • showAssignment

        public static void showAssignment​(Frame frame,
                                          int WindowNo,
                                          String value)
        Show Assignment Info (non modal)
        Parameters:
        frame - Parent Frame
        WindowNo - window no
        value - query value
      • loadedOK

        public boolean loadedOK()
        Loaded correctly
        Returns:
        true if loaded OK
      • setStatusLine

        public void setStatusLine​(String text,
                                  boolean error)
        Set Status Line
        Parameters:
        text - text
        error - error
      • setStatusDB

        public void setStatusDB​(String text)
        Set Status DB
        Parameters:
        text - text
      • prepareTable

        protected void prepareTable​(Info_Column[] layout,
                                    String from,
                                    String staticWhere,
                                    String orderBy)
        Prepare Table, Construct SQL (m_m_sqlMain, m_sqlAdd) and size Window
        Parameters:
        layout - layout array
        from - from clause
        staticWhere - where clause
        orderBy - order by clause
      • executeQuery

        protected void executeQuery()
        Execute Query
      • saveSelection

        protected void saveSelection()
        Save Selection - Called by dispose
      • getSelectedRowKey

        protected Integer getSelectedRowKey()
        Get the key of currently selected row
        Returns:
        selected key
      • getSelectedRowKeys

        protected ArrayList<Integer> getSelectedRowKeys()
        Get the keys of selected row/s based on layout defined in prepareTable
        Returns:
        IDs if selection present
      • getSelectedKeys

        public Object[] getSelectedKeys()
        Get selected Keys
        Returns:
        selected keys (Integers)
      • getSelectedKey

        public Object getSelectedKey()
        Get (first) selected Key
        Returns:
        selected key
      • isCancelled

        public boolean isCancelled()
        Is cancelled? - if pressed Cancel = true - if pressed OK or window closed = false
        Returns:
        true if cancelled
      • getSelectedSQL

        public String getSelectedSQL()
        Get where clause for (first) selected key
        Returns:
        WHERE Clause
      • zoom

        protected void zoom​(int AD_Window_ID,
                            MQuery zoomQuery)
        Zoom to target
        Parameters:
        AD_Window_ID - window id
        zoomQuery - zoom query
      • dispose

        public void dispose()
        Dispose (not OK)
        Overrides:
        dispose in class Window
      • dispose

        public void dispose​(boolean ok)
        Dispose and save Selection
        Parameters:
        ok - OK pressed
      • getTableName

        protected String getTableName()
        Get Table name Synonym
        Returns:
        table name
      • getKeyColumn

        protected String getKeyColumn()
        Get Key Column Name
        Returns:
        column name
      • enableButtons

        protected void enableButtons()
        Enable OK, History, Zoom if row/s selected --- Changes: Changed the logic for accomodating multiple selection
      • getSQLWhere

        protected abstract String getSQLWhere()
        Get dynamic WHERE part of SQL To be overwritten by concrete classes
        Returns:
        WHERE clause
      • setParameters

        protected abstract void setParameters​(PreparedStatement pstmt,
                                              boolean forCount)
                                       throws SQLException
        Set Parameters for Query To be overwritten by concrete classes
        Parameters:
        pstmt - statement
        forCount - for counting records
        Throws:
        SQLException
      • doReset

        protected void doReset()
        Reset Parameters To be overwritten by concrete classes
      • hasReset

        protected boolean hasReset()
        Has Reset (false) To be overwritten by concrete classes
        Returns:
        true if it has reset (default false)
      • showHistory

        protected void showHistory()
        History dialog To be overwritten by concrete classes
      • hasHistory

        protected boolean hasHistory()
        Has History (false) To be overwritten by concrete classes
        Returns:
        true if it has history (default false)
      • customize

        protected void customize()
        Customize dialog To be overwritten by concrete classes
      • hasCustomize

        protected boolean hasCustomize()
        Has Customize (false) To be overwritten by concrete classes
        Returns:
        true if it has customize (default false)
      • zoom

        protected void zoom()
        Zoom action To be overwritten by concrete classes
      • hasZoom

        protected boolean hasZoom()
        Has Zoom (false) To be overwritten by concrete classes
        Returns:
        true if it has zoom (default false)
      • saveSelectionDetail

        protected void saveSelectionDetail()
        Save Selection Details To be overwritten by concrete classes
      • getAD_Window_ID

        protected int getAD_Window_ID​(String tableName,
                                      boolean isSOTrx)
        Get Zoom Window
        Parameters:
        tableName - table name
        isSOTrx - sales trx
        Returns:
        AD_Window_ID
      • getKeyColumnIndex

        protected int getKeyColumnIndex()
        Returns:
        Index of Key Column
      • isOkPressed

        public boolean isOkPressed()
        Returns:
        true if OK button was pressed
      • isCancelPressed

        public boolean isCancelPressed()
        Returns:
        true if Cancel button was pressed
      • setDefaultSelected

        public void setDefaultSelected​(boolean value)
        Specify if the records should be checked(selected) by default. (for multi-selection only)
        Parameters:
        value -
      • isDefaultSelected

        public boolean isDefaultSelected()
        (for multi-selection only)
        Returns:
        true if records are selected by default
      • setDoubleClickTogglesSelection

        public void setDoubleClickTogglesSelection​(boolean value)
        (for multi-selection only)
        Parameters:
        value - true if double click should toggle record selection
      • isDoubleClickTogglesSelection

        public boolean isDoubleClickTogglesSelection()
        (for multi-selection only)
        Returns:
        true if double click should toggle record selection
      • isResetValue

        public boolean isResetValue()
      • isLookup

        public boolean isLookup()