Package jmri.swing
Interface PermissionSwing
-
- All Known Implementing Classes:
EditorPermissionsSwing.EditorPermissionSwing
,LoadAndStorePermissionOwnerSwing.LoadXmlFilePermissionSwing
,LoadAndStorePermissionOwnerSwing.StoreXmlFilePermissionSwing
,PermissionsSystemAdminSwing.PermissionEditOwnPasswordSwing
,PermissionsSystemAdminSwing.PermissionEditPermissionsSwing
,PermissionsSystemAdminSwing.PermissionEditPreferencesSwing
,PermissionSwing.BooleanPermissionSwing
public interface PermissionSwing
The parent interface for configuring permissions with Swing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PermissionSwing.BooleanPermissionSwing
The default swing implementation for BooleanPermission.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description javax.swing.JComponent
getComponent(Role role, Permission permission, java.lang.Runnable onChange)
Get a component that configures this permission.default javax.swing.JLabel
getLabel(Permission permission)
Get a label for the permission component.
-
-
-
Method Detail
-
getLabel
default javax.swing.JLabel getLabel(Permission permission) throws java.lang.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:
java.lang.IllegalArgumentException
- if this class does not support the class with the name given in parameter 'className'
-
getComponent
javax.swing.JComponent getComponent(Role role, Permission permission, java.lang.Runnable onChange) throws java.lang.IllegalArgumentException
Get a component that configures this permission. This method initializes the panel with an empty configuration.- Parameters:
role
- the rolepermission
- the permission to configure with this componentonChange
- executes on change, used mainly to set dirty flag- Returns:
- a component that configures the permission
- Throws:
java.lang.IllegalArgumentException
- if this class does not support the class with the name given in parameter 'className'
-
-