Class ProjectPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ProjectPanel extends JPanel
The left-hand part of the project dashboard consisting of a project toolbar and a table of faces. This panel also handles the list of tasks (analytical tabs).
See Also:
  • Field Details

    • ACTION_FACES_SELECTED

      public static final String ACTION_FACES_SELECTED
      See Also:
    • MAX_OPEN_FACES

      public static final int MAX_OPEN_FACES
      If more that MAX_OPEN_FACES are selected for the single face analysis, a warning dialogue appears informing that multiple tabs are to be opened.
      See Also:
  • Constructor Details

  • Method Details

    • addActionListener

      public void addActionListener(ProjectPanelAction action)
      Setting a ProjectPanelAction is mandatory for the communication between this panel and project's control panels.
      Parameters:
      action - Project panel action listener with the interaction code
    • getProjectTable

      public ProjectTable getProjectTable()
      Returns internal project table with the list of faces
      Returns:
      internal project table with the list of faces
    • openProject

      public Project openProject(Project newProject)
      Opens an existing project from database
      Parameters:
      newProject - Project to be opened
      Returns:
      Previous project or null
    • openTaskTab

      public TaskWindow openTaskTab(Task task)
      Creates and/or opens an analytical tab. Its type is selected automatically.
      Parameters:
      task - Face references for the task
      Returns:
      new task window, null if the task already exists.
    • closeTaskTab

      protected void closeTaskTab(TaskWindow tab)
      Closes task tab.
      Parameters:
      tab - task window to be closed
    • removeSelectedFaces

      protected void removeSelectedFaces()
      Finds selected rows in the table, closes task tabs in which corresponding faces appear and removes rows fro the table.
    • addFacesToProject

      protected void addFacesToProject()
      Pops up a file selection dialogue and then adds selected faces into the project. The project state is set to "changed".
    • addFaceToTable

      protected void addFaceToTable(FaceReference faceReference)
      Adds a single face into the project's table. The face has to be already included in the project.faces proxy. The project state is set to "changed".
      Parameters:
      faceReference - Index of the face from pro project instance to be added into the table
    • focusTaskTab

      protected void focusTaskTab(String taskName)
      Sets active (pops up) a task tab with the given name
      Parameters:
      taskName - Task name
    • getSelectedFaces

      protected List<FaceReference> getSelectedFaces()