Class ProjectPanelAction<T extends ControlPanel>

java.lang.Object
javax.swing.AbstractAction
cz.fidentis.analyst.gui.project.ProjectPanelAction<T>
Type Parameters:
T - the type of control panel
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
FacesInfoAction, ProjectFilteringAction

public abstract class ProjectPanelAction<T extends ControlPanel> extends AbstractAction
Default action listener (controller) used to connect specific control panel of the project window with the project itself.
See Also:
  • Constructor Details

    • ProjectPanelAction

      public ProjectPanelAction(ProjectPanel projectPanel, JTabbedPane topControlPane)
      Constructor.
      Parameters:
      projectPanel - Project panel
      topControlPane - A top component when a new control panel is placed
      Throws:
      IllegalArgumentException - if some param is missing
  • Method Details

    • actionPerformed

      public abstract void actionPerformed(ActionEvent ae)
    • popup

      public void popup()
      Popups (shows) this control panel.
    • getProjectPanel

      protected ProjectPanel getProjectPanel()
      Returns the project panel, i.e., the left-hand side of the window.
      Returns:
      the project panel
    • setControlPanel

      protected void setControlPanel(T controlPanel)
      Sets (replaces) the control panel.
      Parameters:
      controlPanel - a control panel
    • getControlPanel

      protected T getControlPanel()
    • setShowHideCode

      protected void setShowHideCode(Runnable visible, Runnable hidden)
      Provide a code that is run when the control panel is focused (popped up, shown) and unfocused (closed or hidden by another control panel)
      Parameters:
      visible - A code to be run when the control panel is focused
      hidden - A code to be run when the control panel hides
    • hideShowPanelActionPerformed

      protected void hideShowPanelActionPerformed(ActionEvent ae, ControlPanel controlPanel)
      The generic code for showing/hiding the control panel
      Parameters:
      ae - Action event