Class ControlPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
BatchCuttingPlanesPanel, BatchDistancePanel, BatchRegistrationPanel, CurvaturePanel, CuttingPlanesPanel, DistancePanel, FaceInfoControlPanel, FaceOverviewPanel, FeaturePointsPanel, FilterPanel, InteractiveMaskPanel, RegistrationPanel, SymmetryPanel

public abstract class ControlPanel extends JPanel
An abstract class for control panels that can be docked in the TaskControlPane.
See Also:
  • Field Details

    • CONTROL_PANEL_WIDTH

      public static final int CONTROL_PANEL_WIDTH
      Horizontal space for right-hand side control panels of the project and analytical windows. The wider, the less space is allocated (dynamically) to 3D canvas.
      See Also:
  • Constructor Details

    • ControlPanel

      public ControlPanel(ActionListener action)
      Constructor.
      Parameters:
      action - action listener (controller) which is invoked when an extrinsic state of the control panel is changed.
      Throws:
      IllegalArgumentException - if the action is missing
  • Method Details

    • getIcon

      public abstract ImageIcon getIcon()
      Returns panel's icon.
      Returns:
      panel's icon
    • getActionListener

      public ActionListener getActionListener()
    • createListener

      protected final ActionListener createListener(ActionListener action, String command)
      Creates and returns action listener that can be connected with a low-level GUI element (e.g., a button). Action event of the low-level element is then re-directed to the given ControlPanelAction as given command.
      Parameters:
      action - An instance of the ControlPanelAction
      command - Control panel command
      Returns:
      Action listener
    • createListener

      protected final ActionListener createListener(ActionListener action, String command, Object data)
      Creates and returns action listener that can be connected with a low-level GUI element (e.g., a button). Action event of the low-level element is then re-directed to the given ControlPanelAction as given command. The listener may also carry additional data as a payload.
      Parameters:
      action - An instance of the ControlPanelAction
      command - Control panel command
      data - Payload data of the action listener
      Returns:
      Action listener