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 Link icon

    • ACTION_FACES_SELECTED Link icon

      public static final String ACTION_FACES_SELECTED
      See Also:
    • MAX_OPEN_FACES Link icon

      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 Link icon

    • ProjectPanel Link icon

      public ProjectPanel()
      Constructor.
  • Method Details Link icon

    • addActionListener Link icon

      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
    • getProject Link icon

      public Project getProject()
      Returns project instance
      Returns:
      project instance
    • getProjectTable Link icon

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

      public final Project createNewProject()
      Creates new empty project.
      Returns:
      Previous project or null
    • openProject Link icon

      public Project openProject(File dir)
      Opens an exiting project from disk
      Parameters:
      dir - Project's folder
      Returns:
      Previous project or null
    • saveProject Link icon

      public void saveProject()
      Saves project to disk. Sets the state of the project to "unchanged". Therefore, call !project.changed() to check whether the project was saved successfully.
    • openTaskTab Link icon

      protected TaskWindow openTaskTab(FacesProxy taskFaces)
      Creates and/or opens an analytical tab. Its type is selected automatically.
      Parameters:
      taskFaces - Task faces
      Returns:
      new task window, null if the task already exists.
    • closeTaskTab Link icon

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

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

      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 Link icon

      protected void addFaceToTable(int faceIndex)
      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:
      faceIndex - Index of the face from pro project instance to be added into the table
    • focusTaskTab Link icon

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

      protected List<File> getSelectedFaceFiles()