Package passwordmanagergui.group
Class MainWindow
java.lang.Object
passwordmanagergui.group.MainWindow
Main window with a list of groups and elements for manipulating password
groups
- Since:
- 2024-01-31
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate JScrollPaneContainer with a slider for a list of groupsprivate JPanelPanel with a list of groupsprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate JFrameMain window objectprivate final intThe maximum length of a group name, from which names will be shortened for convenient displayprivate static final intprivate static final intprivate static final intprivate intGroup counterprivate static final intprivate static final intprivate static final intprivate static final intprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final intprivate static final intprivate JPanelPanel with children of the main window -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPasswordGroupToListGUI(String groupName) Method that dynamically adds a new group to the listvoidcreate()Method that creates a window with a list of password groups and additional controlsvoidfilterPasswordGroups(String expression) Method that filters the list of password groupsvoidA 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 password group to a windowvoidMethod that fills a window with elementsvoidMethod that adds a panel to the window to filter the list of password groupsvoidMethod that adds a button to load a group of passwords to a windowvoidMethod for adding a title to a windowvoidMethod that adds a list to the window in which password groups will be locatedvoidremovePasswordGroupFromList(String groupName) Method that removes a group from the list of displayed password groups (necessary for filtering to work correctly)voidMethod updating the list of groups from a given set (necessary for filtering to work correctly)voidMethod updating the list of groups with all found groups in the standard directoryvoidMethod for starting to create a window
-
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:
-
LOAD_BUTTON_X
private static final int LOAD_BUTTON_X- See Also:
-
LOAD_BUTTON_Y
private static final int LOAD_BUTTON_Y- See Also:
-
LOAD_BUTTON_WIDTH
private static final int LOAD_BUTTON_WIDTH- See Also:
-
LOAD_BUTTON_HEIGHT
private static final int LOAD_BUTTON_HEIGHT- See Also:
-
BUTTON_PREFERRED_WIDTH
private static final int BUTTON_PREFERRED_WIDTH- See Also:
-
BUTTON_PREFERRED_HEIGHT
private static final int 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:
-
GROUPS_PANEL_X
private static final int GROUPS_PANEL_X- See Also:
-
GROUPS_PANEL_Y
private static final int GROUPS_PANEL_Y- See Also:
-
GROUPS_PANEL_WIDTH
private static final int GROUPS_PANEL_WIDTH- See Also:
-
GROUPS_PANEL_HEIGHT
private static final int GROUPS_PANEL_HEIGHT- See Also:
-
GROUPS_SCROLL_PANE_X
private static final int GROUPS_SCROLL_PANE_X- See Also:
-
GROUPS_SCROLL_PANE_Y
private static final int GROUPS_SCROLL_PANE_Y- See Also:
-
GROUPS_SCROLL_PANE_WIDTH
private static final int GROUPS_SCROLL_PANE_WIDTH- See Also:
-
GROUPS_SCROLL_PANE_HEIGHT
private static final int GROUPS_SCROLL_PANE_HEIGHT- See Also:
-
OPEN_BUTTON_WIDTH
private static final int OPEN_BUTTON_WIDTH- See Also:
-
OPEN_BUTTON_HEIGHT
private static final int OPEN_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
private static final int BUTTON_SPACING- See Also:
-
COMPONENT_INSETS
private static final int COMPONENT_INSETS- See Also:
-
PANEL_INSETS
private static final int PANEL_INSETS- See Also:
-
SECRET_CODE_1
- See Also:
-
SECRET_MESSAGE_1
- See Also:
-
SECRET_CODE_2
- See Also:
-
SECRET_MESSAGE_2
- See Also:
-
mainWindow
Main window object -
windowElementsPanel
Panel with children of the main window -
groupsPanel
Panel with a list of groups -
groupSPane
Container with a slider for a list of groups -
recordsCount
private int recordsCountGroup counter -
maxGroupNameLength
private final int maxGroupNameLengthThe maximum length of a group name, from which names will be shortened for convenient display- See Also:
-
-
Constructor Details
-
MainWindow
public MainWindow()
-
-
Method Details
-
create
public void create()Method that creates a window with a list of password groups and additional controls -
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 password group to a window -
generateLoadButton
public void generateLoadButton()Method that adds a button to load a group of passwords to a window -
generateFilterPanel
public void generateFilterPanel()Method that adds a panel to the window to filter the list of password groups -
generatePasswordGroupsList
public void generatePasswordGroupsList()Method that adds a list to the window in which password groups will be located -
addPasswordGroupToListGUI
Method that dynamically adds a new group to the list- Parameters:
groupName- name of the group to add to the list
-
repaintListFromData
public void repaintListFromData()Method updating the list of groups with all found groups in the standard directory -
repaintList
public void repaintList()Method updating the list of groups from a given set (necessary for filtering to work correctly) -
removePasswordGroupFromList
Method that removes a group from the list of displayed password groups (necessary for filtering to work correctly)- Parameters:
groupName- name of the group to be deleted from UI
-
filterPasswordGroups
Method that filters the list of password groups- Parameters:
expression- expression expected in records that satisfy the filter
-