Class SearchPanel

    • Constructor Detail

    • Method Detail

      • getInstance

        public static SearchPanel getInstance​(ArchiveViewer viewer)
        Get a new instance of SearchPanel
        Parameters:
        viewer - the application instance
        Returns:
        the seach panel instance
      • clean

        public static void clean()
        Clean all the criteria of the current instance of SearchPanel
      • checkCriterion

        public boolean checkCriterion​(Criterion criterion)
        Method similar to 'isNull' method of the 'Criterion' class. This method is necessary because for the template field is used a string value and for the date field is used a string value. If is used also to retrieves all the input text format errors
        Parameters:
        criterion - The criterion to check
        Returns:
        true if the criterion is valid, false if it is not valid
      • getColumnName

        public String getColumnName​(Criterion criterion)
        Method similar to 'getColumnName' method of the 'Criterion' class. This method is necessary because for the template field is used the 'ld_templatename' column
        Parameters:
        criterion - The evaluated criterion
        Returns:
        the column name
      • getSearchErrors

        public String getSearchErrors()
      • removeLine

        public void removeLine​(SearchLine searchLine)
        Removing a Search Line, this method removes also the associated criterion from the criterion list. Then the Search Panel is cleaned and reloaded
        Parameters:
        searchLine - the criterion line
      • getLabelFromArray

        public String getLabelFromArray​(Item[] items,
                                        String value)
        Useful method used to get the Label string of a Item with the given Value inside the given Item list
        Parameters:
        items - the list of Items in which is carried the research
        value - the Item's value
        Returns:
        the label
      • updateFieldsList

        public void updateFieldsList​(boolean updateOperatorsAndValues)
        This method updates the list of available fields.
        Parameters:
        updateOperatorsAndValues - If true also the operators and the values string are updated.
      • updateOperatorsList

        public void updateOperatorsList()
        This method updates the list of operators values. Then also the available fields list is updated
      • getLinesPanel

        public JPanel getLinesPanel()
      • getSelectedTemplate

        public String getSelectedTemplate()