Class Maintenance


public class Maintenance
extends Object
A collection of static utilities to provide cross referencing information among the various PanelPro objects. Most likely, this is incomplete as there still may be references held by objects unknown to the author. It is intended to inform users where and how the various elements are used. In particular to identify useless elements ('orphans'). Currently, called only from the Logix JFrame, which is probably not its ultimate UI.
  • Field Details

  • Constructor Details

  • Method Details

    • deviceReportPressed

      public static void deviceReportPressed​(String devName, Frame parent)
      Find references of a System or User name in the various Manager Objects.
      devName - name to look for
      parent - Frame calling this method
    • findOrphansPressed

      public static void findOrphansPressed​(Frame parent)
      Find orphaned elements in the various Manager Objects.
      parent - Frame to check
    • findEmptyPressed

      public static void findEmptyPressed​(Frame parent)
      Find useless Conditionals in the various Manager Objects.
      parent - Frame to check
    • getTypeAndNames

      Find type of element and its names from a name that may be a user name or a system name.

      Searches each Manager for a reference to the "name".

      name - string (name base) to look for
      4 element String array: {Type, userName, sysName, numListeners} - This should probably return an instance of a custom type rather than a bunch of string names
    • testName

      static boolean testName​(String name, boolean found, String[] names, String line1, String line2, String line, StringBuilder tempText)
      Check if a given string is either a user or a system name.
      name - the string to compare
      found - whether the item has already been found somewhere
      names - array containing system and user name as items 0 and 1
      line1 - message line 1 to use if string is not matched
      line2 - message line 2 to use if string is not matched
      line - message line to use if string is matched
      tempText - body of text to add to, a global variable
      false if name is null or cannot be matched to the names array
    • search

      static boolean search​(String name, JTextArea text)
      Search if a given string is used as the name of a NamedBean.
      name - the string to look for
      text - body of the message to be displayed reporting the result
      true if name is found at least once as a bean name
    • makeDialog

      static void makeDialog​(Component component, Component button, Frame parent, String title)
      Build and display a dialog box with an OK button and optional 2nd button.
      component - Body of message to put in dialog box
      button - optional second button to add to pane
      parent - Frame that asked for this dialog
      title - text do use as title of the dialog box