java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.designer.gui.tools.SecurityPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SecurityPanel extends JPanel
Enclosing panel for a SecurityTable that also adds a header and add/delete/refresh buttons. Security table is initialized with a single "empty" row. Typical usage is:
     
     SecurityPanel panel = new SecurityPanel(nounKey);
     panel.update(myZoneRoleList);
     ...
     List<ZoneRoleRequirement> usersRequirements = panel.getZoneRoleRequirements();
     
 
See Also:
  • Constructor Details

    • SecurityPanel

      public SecurityPanel(String noun)
      Constructor that takes a noun for this panel. This allows us to use the same panel in multiple places, like named queries and gateway message handlers.
      Parameters:
      noun - Actual noun, not a bundle key. Not null.
  • Method Details

    • update

      public void update(List<ZoneRoleRequirement> requirements)
      Update the table in the panel with a new list of ZoneRoleRequirements
      Parameters:
      requirements - List of ZoneRoleRequirements, nullable.
    • getTable

      public SecurityTable getTable()
      Gets the actual security table. This allows setting/removing of listeners, etc.
      Returns:
      SecurityTable. Null is probably an error
    • getPermissions

      public List<ZoneRoleRequirement> getPermissions()
      Gets the list of permissions the user has set in the table. Use this to retrieve results rather than getting the table itself.
      Returns:
      List<ZoneRoleRequirement>. Not null.
    • addTableModelListener

      public void addTableModelListener(TableModelListener securitySelectionListener)
      Add a TableModelListener to the underlying security table. Allows other items to enable/disable depending on the state of the table.
      Parameters:
      securitySelectionListener - Not null.