Package passwordmanagergui.passwords
Class GroupWindow
java.lang.Object
passwordmanagergui.passwords.GroupWindow
Window with group records
- Since:
- 2024-01-31
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate JPanelPanel with a list of accountsprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final Stringprivate static final intprivate static final intprivate static final intprivate static final Stringprivate static final Stringprivate static final intprivate static final Stringprivate static final intprivate final StringPath to copy iconprivate passwordmanager.decoded.IStorageDecrypted password groupprivate static final Stringprivate static final intprivate static final Stringprivate static final intprivate passwordmanager.encoded.IRawDataEncrypted password groupprivate static final intprivate static final intprivate static final intprivate static final intprivate FileFile with an encrypted group of passwordsprivate StringGroup passwordprivate JFrameGroup window objectprivate static final intprivate static final intprivate static final intprivate static final intprivate final intThe maximum length of account information, from which the information will be shortened for convenient displayprivate static final intprivate static final Stringprivate static final intprivate static final intprivate static final intprivate static final intprivate JScrollPaneContainer with a slider for a list of accountsprivate static final intprivate static final Stringprivate static final intprivate static final intprivate static final intprivate static final Stringprivate static final Stringprivate intAccount counterprivate static final intprivate static final Stringprivate static final intprivate static final intprivate static final intprivate final StringPath to show QRprivate static final Stringprivate static final intprivate static final intprivate JPanelPanel with children of the group windowprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionGroupWindow(File groupFile) Class constructor initializing a group file with passwords -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPasswordToListGUI(passwordmanager.decoded.IRecord record) Method that dynamically adds a new account to the listbooleandecodeStruct(String password) Method for decrypting a group of passwordsvoidfilterPasswordsGroup(String expression) Method that filters the list of accountsvoidA method that packs all static elements of a window and also completes the creation of the windowvoidMethod that adds a button for creating a new account to a windowvoidMethod that fills a window with elementsvoidMethod that adds a panel to the window to filter the list of accountsvoidMethod for adding a title to a windowvoidMethod that adds a list to the window in which accounts will be locatedvoidMethod that generates a window with a message about the user entering an incorrect password for a groupMethod that generates a window for entering a password for a group to decode the groupvoidopen()Method that creates a window with a list of accounts and additional controlsvoidMethod for updating the list of accounts from a given set (necessary for filtering to work correctly)voidMethod updating the list of accounts with all found accounts in the groupprivate voidshowQRCode(String text, String title) voidMethod for starting to create a windowprivate StringMethod that wraps text to fit within specified width
-
Field Details
-
WINDOW_WIDTH
private static final int WINDOW_WIDTH- See Also:
-
WINDOW_HEIGHT
private static final int WINDOW_HEIGHT- See Also:
-
MAIN_TITLE_X
private static final int MAIN_TITLE_X- See Also:
-
MAIN_TITLE_Y
private static final int MAIN_TITLE_Y- See Also:
-
MAIN_TITLE_WIDTH
private static final int MAIN_TITLE_WIDTH- See Also:
-
MAIN_TITLE_HEIGHT
private static final int MAIN_TITLE_HEIGHT- See Also:
-
ADD_BUTTON_X
private static final int ADD_BUTTON_X- See Also:
-
ADD_BUTTON_Y
private static final int ADD_BUTTON_Y- See Also:
-
ADD_BUTTON_WIDTH
private static final int ADD_BUTTON_WIDTH- See Also:
-
ADD_BUTTON_HEIGHT
private static final int ADD_BUTTON_HEIGHT- See Also:
-
ADD_BUTTON_PREFERRED_WIDTH
private static final int ADD_BUTTON_PREFERRED_WIDTH- See Also:
-
ADD_BUTTON_PREFERRED_HEIGHT
private static final int ADD_BUTTON_PREFERRED_HEIGHT- See Also:
-
FILTER_PANEL_X
private static final int FILTER_PANEL_X- See Also:
-
FILTER_PANEL_Y
private static final int FILTER_PANEL_Y- See Also:
-
FILTER_PANEL_WIDTH
private static final int FILTER_PANEL_WIDTH- See Also:
-
FILTER_PANEL_HEIGHT
private static final int FILTER_PANEL_HEIGHT- See Also:
-
SEARCH_FIELD_WIDTH
private static final int SEARCH_FIELD_WIDTH- See Also:
-
SEARCH_FIELD_HEIGHT
private static final int SEARCH_FIELD_HEIGHT- See Also:
-
ACCOUNTS_PANEL_X
private static final int ACCOUNTS_PANEL_X- See Also:
-
ACCOUNTS_PANEL_Y
private static final int ACCOUNTS_PANEL_Y- See Also:
-
ACCOUNTS_PANEL_WIDTH
private static final int ACCOUNTS_PANEL_WIDTH- See Also:
-
ACCOUNTS_PANEL_HEIGHT
private static final int ACCOUNTS_PANEL_HEIGHT- See Also:
-
PASSWORD_SCROLL_PANE_X
private static final int PASSWORD_SCROLL_PANE_X- See Also:
-
PASSWORD_SCROLL_PANE_Y
private static final int PASSWORD_SCROLL_PANE_Y- See Also:
-
PASSWORD_SCROLL_PANE_WIDTH
private static final int PASSWORD_SCROLL_PANE_WIDTH- See Also:
-
PASSWORD_SCROLL_PANE_HEIGHT
private static final int PASSWORD_SCROLL_PANE_HEIGHT- See Also:
-
COPY_BUTTON_WIDTH
private static final int COPY_BUTTON_WIDTH- See Also:
-
COPY_BUTTON_HEIGHT
private static final int COPY_BUTTON_HEIGHT- See Also:
-
QR_BUTTON_WIDTH
private static final int QR_BUTTON_WIDTH- See Also:
-
QR_BUTTON_HEIGHT
private static final int QR_BUTTON_HEIGHT- See Also:
-
QR_WIDTH
private static final int QR_WIDTH- See Also:
-
QR_HEIGHT
private static final int QR_HEIGHT- See Also:
-
EDIT_BUTTON_WIDTH
private static final int EDIT_BUTTON_WIDTH- See Also:
-
EDIT_BUTTON_HEIGHT
private static final int EDIT_BUTTON_HEIGHT- See Also:
-
REMOVE_BUTTON_WIDTH
private static final int REMOVE_BUTTON_WIDTH- See Also:
-
REMOVE_BUTTON_HEIGHT
private static final int REMOVE_BUTTON_HEIGHT- See Also:
-
BUTTON_SPACING_SMALL
private static final int BUTTON_SPACING_SMALL- See Also:
-
BUTTON_SPACING_MEDIUM
private static final int BUTTON_SPACING_MEDIUM- See Also:
-
COMPONENT_INSETS
private static final int COMPONENT_INSETS- See Also:
-
PANEL_INSETS
private static final int PANEL_INSETS- See Also:
-
WRONG_PASSWORD_MESSAGE
- See Also:
-
PASSWORD_DIALOG_TITLE
- See Also:
-
DECODING_ERROR_LOG
- See Also:
-
RAW_DATA_LOG
- See Also:
-
COPY_BUTTON_TEXT
- See Also:
-
QR_BUTTON_TEXT
- See Also:
-
EDIT_BUTTON_TEXT
- See Also:
-
REMOVE_BUTTON_TEXT
- See Also:
-
CONFIRM_REMOVE_MESSAGE
- See Also:
-
CONFIRM_EDIT_MESSAGE
- See Also:
-
WHITE_RECORD_FILTER
- See Also:
-
ADMIN_FILTER
- See Also:
-
QWERTY_FILTER
- See Also:
-
groupFile
File with an encrypted group of passwords -
encodedGroup
private passwordmanager.encoded.IRawData encodedGroupEncrypted password group -
decodedGroup
private passwordmanager.decoded.IStorage decodedGroupDecrypted password group -
groupWindow
Group window object -
windowPanel
Panel with children of the group window -
accountsPanel
Panel with a list of accounts -
passwordSPane
Container with a slider for a list of accounts -
groupPassword
Group password -
recordsCount
private int recordsCountAccount counter -
maxFieldLength
private final int maxFieldLengthThe maximum length of account information, from which the information will be shortened for convenient display- See Also:
-
copyIconPath
Path to copy icon- See Also:
-
showQRPath
Path to show QR- See Also:
-
-
Constructor Details
-
GroupWindow
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
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
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
-
wrapText
Method that wraps text to fit within specified width- Parameters:
text- text to wrapmaxLength- 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
Method that filters the list of accounts- Parameters:
expression- expression expected in records that satisfy the filter
-