Class BatchDistanceHeatmapPanel

All Implemented Interfaces:
MouseRowHeaderListener, RemoveFaceFromHeatmapListener, BatchControlPanel, ImageObserver, MenuContainer, Serializable, Accessible

public class BatchDistanceHeatmapPanel extends ControlPanel implements BatchControlPanel, MouseRowHeaderListener, RemoveFaceFromHeatmapListener
A control panel for heatmap for bath (N:N) processing.
See Also:
  • Field Details

  • Constructor Details

    • BatchDistanceHeatmapPanel

      public BatchDistanceHeatmapPanel(ProjectPanel projectPanel, TaskService taskService, ActionListener action, Task task, List<FaceNodeInfo> nodeData)
      Constructor
      Parameters:
      action - Action listener of the panel
      task - Task with faces across multiple batch tabs
  • Method Details

    • getHeatmap

      public Heatmap getHeatmap()
      Gets heatmap
      Returns:
      heatmap
    • getClusteringMethod

      public String getClusteringMethod()
      Gets clustering method
      Returns:
      clustering method
    • setBiggestDistance

      public void setBiggestDistance(double biggestDistance)
      Sets biggest distance
      Parameters:
      biggestDistance - to be set
    • setRootNode

      public void setRootNode(ClusterNode rootNode)
      Sets root node in heatmap
      Parameters:
      rootNode - node to be set as a root
    • setPanelHeightWidth

      public void setPanelHeightWidth()
      Sets the heatmap panel size to be the same as the size of the parent panel
    • removeEverythingFromJPanel7

      public void removeEverythingFromJPanel7()
      Removes all components from jPanel7
    • shift

      public void shift(boolean shift)
      Shifts scale panel
      Parameters:
      shift - true if scale panel should be shifted, false otherwise
    • createColorScaleImage

      public void createColorScaleImage(boolean shift)
      Creates a scale legend for the heatmap
      Parameters:
      shift - true if scale panel should be shifted, false otherwise
    • removeAllDataToReturn

      public void removeAllDataToReturn()
      Removes all recorded rows and cols in the return combo box
    • getFaceToReturn

      public String getFaceToReturn()
      Takes selected value from the return tray returns it
      Returns:
      the name of the selected face
    • enableValuesCheckboxes

      public void enableValuesCheckboxes()
      Enables the checkbox for visuals of cells values
    • returnFaceToHeatmap

      public void returnFaceToHeatmap()
      Returns chosen removed face to the heatmap
    • isValueCheckboxChecked

      public boolean isValueCheckboxChecked()
      Returns if checkbox for values is checked.
      Returns:
      True if checkbox1 is selected, false otherwise
    • removeWarning

      public void removeWarning()
      Removes label that tells user information about computing heatmap
    • getSelectedFace

      public StoredHumanFace getSelectedFace()
      Returns the face selected in a menu.
      Specified by:
      getSelectedFace in interface BatchControlPanel
      Returns:
      The face selected in a menu. This is either some face from the dataset or the average face.
    • getTask

      public Task getTask()
      Returns the face proxy decorator
      Specified by:
      getTask in interface BatchControlPanel
      Returns:
      face proxy decorator
    • disableResetHeatmapButton

      public void disableResetHeatmapButton()
      Disables the button for reset of the heatmap to the defaults
    • enableResetHeatmapButton

      public void enableResetHeatmapButton()
      Enables the button for reset of the heatmap to the default
    • enableClusteringMethodChange

      public void enableClusteringMethodChange()
      Enables buttons for changing and resorting clustering method
    • getStaticIcon

      public static ImageIcon getStaticIcon()
      Static implementation of the getIcon() method.
      Returns:
      Control panel icon
    • scanWholeApp

      public void scanWholeApp()
      Scans the whole app for mouse clicks and mouse movements to remove highlights.
    • getIcon

      public ImageIcon getIcon()
      Description copied from class: ControlPanel
      Returns panel's icon.
      Specified by:
      getIcon in class ControlPanel
      Returns:
      panel's icon
    • mouseDragged

      public void mouseDragged()
      Specified by:
      mouseDragged in interface MouseRowHeaderListener
    • removeRowFace

      public void removeRowFace(int row)
      Description copied from interface: RemoveFaceFromHeatmapListener
      Removes selected row and corresponding column from the heatmap
      Specified by:
      removeRowFace in interface RemoveFaceFromHeatmapListener
      Parameters:
      row - index of the row that shall be removed
    • removeColumnFace

      public void removeColumnFace(int column)
      Description copied from interface: RemoveFaceFromHeatmapListener
      Removes selected column and corresponding row from the heatmap
      Specified by:
      removeColumnFace in interface RemoveFaceFromHeatmapListener
      Parameters:
      column - index of the column that shall be removed