Class PFlagsPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PFlagsPanel extends JPanel
This panel is used to map Java integer (int) bits to checkboxes.

Example usage is to view/modify a list of Product status inactive flags.

See Also:
  • Constructor Details

    • PFlagsPanel

      public PFlagsPanel()
      Initializes a number of checkboxes based on the flags which, by default, are specified in "CustomerCenterResources.properties" under the names of "Flag0", "Flag1", etc.

      Users can customize the labels to be mapped to within "CustomizedResources.properties" using CustomerCareSDK.

    • PFlagsPanel

      public PFlagsPanel(String prefix)
      Initializes a number of checkboxes based on the flags which are specified in "CustomerCenterResources.properties" under the names with the passed in prefix. For example, if the "prefix" is "Reasons", then the flags would be "Reasons0", "Reasons2", etc.

      Users can customize the labels to be mapped to within "CustomizedResources.properties" using CustomerCareSDK.

      Parameters:
      prefix - resource property key prefix to be concatenated with bit position
    • PFlagsPanel

      public PFlagsPanel(int maxBits)
      Initializes a number of checkboxes based on the flags which are specified in "CustomerCenterResources.properties" under the names with the passed in prefix. For example, if the "prefix" is "Reasons", then the flags would be "Reasons0", "Reasons2", etc.

      Users can customize the labels to be mapped to within "CustomizedResources.properties" using CustomerCareSDK.

      Parameters:
      maxBits - number of bits to be used. Maximum is 32 (the bits for a Java integer).
    • PFlagsPanel

      public PFlagsPanel(String prefix, int maxBits)
      Initializes a number of checkboxes based on the flags which are specified in "CustomerCenterResources.properties" under the names with the passed in prefix. For example, if the "prefix" is "Reasons", then the flags would be "Reasons0", "Reasons2", etc.

      Users can customize the labels to be mapped to within "CustomizedResources.properties" using CustomerCareSDK.

      Parameters:
      prefix - resource property key prefix to be concatenated with bit position
      maxBits - number of bits to be used. Maximum is 32 (the bits for a Java integer).
  • Method Details

    • setEnabled

      public void setEnabled(boolean b)
      enable/disable all checkboxes on the panel
      Overrides:
      setEnabled in class JComponent
    • getValue

      public int getValue()
      retrieves the flag value
    • isDirty

      public boolean isDirty()
      checks whether the flag value has been changed
    • setValue

      public void setValue(int flag)
      Sets the flag value for display. It is called during initializing a component or reset.
    • deselectAll

      public void deselectAll()
      Clears all check boxes.
    • hasSelection

      public boolean hasSelection()
      Checks whether there are any selections of the checkboxes.