Package jmri.swing

Interface PermissionSwing

All Known Implementing Classes:
EditorPermissionsSwing.EditorPermissionSwing, LoadAndStorePermissionOwnerSwing.LoadXmlFilePermissionSwing, LoadAndStorePermissionOwnerSwing.StoreXmlFilePermissionSwing, PermissionsProgrammerSwing.PermissionProgrammingOnMainSwing, PermissionsProgrammerSwing.PermissionProgrammingTrackSwing, PermissionsSystemAdminSwing.PermissionEditOwnPasswordSwing, PermissionsSystemAdminSwing.PermissionEditPermissionsSwing, PermissionsSystemAdminSwing.PermissionEditPreferencesSwing, PermissionSwing.BooleanPermissionSwing

public interface PermissionSwing
The parent interface for configuring permissions with Swing.
  • Method Details

    • getLabel

      default JLabel getLabel(Permission permission) throws IllegalArgumentException
      Get a label for the permission component.
      Parameters:
      permission - the permission to configure with this component
      Returns:
      a component that configures the permission or null if no label
      Throws:
      IllegalArgumentException - if this class does not support the class with the name given in parameter 'className'
    • getComponent

      Get a component that configures this permission. This method initializes the panel with an empty configuration.
      Parameters:
      role - the role
      permission - the permission to configure with this component
      onChange - executes on change, used mainly to set dirty flag
      Returns:
      a component that configures the permission
      Throws:
      IllegalArgumentException - if this class does not support the class with the name given in parameter 'className'