Class ProjectTable

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class ProjectTable extends JTable
A table-based view of the list of project's faces
See Also:
  • Constructor Details

    • ProjectTable

      public ProjectTable()
      Constructor.
  • Method Details

    • changeSelection

      public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
      Overrides:
      changeSelection in class JTable
    • selectAll

      public void selectAll()
      Overrides:
      selectAll in class JTable
    • removeAllRows

      public void removeAllRows()
      Clears the table
    • getFaceNameAt

      public String getFaceNameAt(int row)
      Returns face name at the given row
      Parameters:
      row - row number
      Returns:
      face name or null
    • getTasksAt

      public JComboBox getTasksAt(int row)
      Returns a combo box with tasks in which the face is open
      Parameters:
      row - row number
      Returns:
      a combo box with tasks in which the face is open, or null
    • isFilteredOut

      public boolean isFilteredOut(int row)
      Determines whether the row is filtered out
      Parameters:
      row - row number
      Returns:
      true if the row is filtered out
    • getProjectTableModel

      public ProjectTableModel getProjectTableModel()
      Returns the underlying table model
      Returns:
      the underlying table model
    • linkFacesWithTask

      public void linkFacesWithTask(FacesProxy taskFaces)
      Find faces (rows) that are included in the given task and links the task with them by adding the task name into to combo-box column.
      Parameters:
      taskFaces - A proxy with faces of a task
    • unlinkFacesFromTask

      public void unlinkFacesFromTask(FacesProxy taskFaces)
      Finds all faces (lines) thar are linked with the given task and removes the task from their combo-box column.
      Parameters:
      taskFaces - A proxy with faces of the task that is to be removed
    • addRow

      public void addRow(FacesProxy faces, int faceIndex, ActionListener taskSelected)
      Adds new row to the table.
      Parameters:
      faces - Proxy with project's faces
      faceIndex - index of the face to be added
      taskSelected - Action listener to be connected with the combo-box with the face open tasks
    • filterRows

      public List<String> filterRows(List<Integer> filteredRows)
      Filters out the given rows.
      Parameters:
      filteredRows - Rows to be filtered out
      Returns:
      Names of faces that was filtered out
    • unfilterRows

      public void unfilterRows(int num)
      Unfilters and moves up given number of last filtered rows.
      Parameters:
      num - The number of last filtered rows to be unfiltered