Class GroupWindow

java.lang.Object
passwordmanagergui.passwords.GroupWindow

public class GroupWindow extends Object
Window with group records
Since:
2024-01-31
See Also:
  • Field Details

  • Constructor Details

    • GroupWindow

      public GroupWindow(File groupFile)
      Class constructor initializing a group file with passwords
      Parameters:
      groupFile - file with a group of passwords
  • Method Details

    • open

      public void open()
      Method that creates a window with a list of accounts and additional controls
    • getPassword

      public String getPassword()
      Method that generates a window for entering a password for a group to decode the group
      Returns:
      user-entered password for the group
    • getBadPasswordMessage

      public void getBadPasswordMessage()
      Method that generates a window with a message about the user entering an incorrect password for a group
    • decodeStruct

      public boolean decodeStruct(String password)
      Method for decrypting a group of passwords
      Parameters:
      password - user entered password
      Returns:
      status of the correctness of the group password entered by the user
    • startCreateWindow

      public void startCreateWindow()
      Method for starting to create a window
    • finishCreateWindow

      public void finishCreateWindow()
      A method that packs all static elements of a window and also completes the creation of the window
    • generateComponents

      public void generateComponents()
      Method that fills a window with elements
    • generateMainTitle

      public void generateMainTitle()
      Method for adding a title to a window
    • generateAddButton

      public void generateAddButton()
      Method that adds a button for creating a new account to a window
    • generateFilterPanel

      public void generateFilterPanel()
      Method that adds a panel to the window to filter the list of accounts
    • generatePasswordsList

      public void generatePasswordsList()
      Method that adds a list to the window in which accounts will be located
    • addPasswordToListGUI

      public void addPasswordToListGUI(passwordmanager.decoded.IRecord record)
      Method that dynamically adds a new account to the list
      Parameters:
      record - account object to add to the list
    • showQRCode

      private void showQRCode(String text, String title)
    • wrapText

      private String wrapText(String text, int maxLength)
      Method that wraps text to fit within specified width
      Parameters:
      text - text to wrap
      maxLength - maximum line length
      Returns:
      wrapped text
    • repaintListFromData

      public void repaintListFromData()
      Method updating the list of accounts with all found accounts in the group
    • repaintList

      public void repaintList()
      Method for updating the list of accounts from a given set (necessary for filtering to work correctly)
    • filterPasswordsGroup

      public void filterPasswordsGroup(String expression)
      Method that filters the list of accounts
      Parameters:
      expression - expression expected in records that satisfy the filter