Package adams.flow.core
Class InteractionDisplayLocationHelper
- java.lang.Object
-
- adams.flow.core.InteractionDisplayLocationHelper
-
public class InteractionDisplayLocationHelper extends Object
Helper class for displaying panels in the notification area.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description InteractionDisplayLocationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
display(Actor context, GUIHelper.DialogCommunication comm, GUIHelper.InputPanelWithButtons panel)
Displays the panel in the notification area.static String
display(Actor context, GUIHelper.DialogCommunication comm, GUIHelper.InputPanelWithComboBox panel, int btnJustification)
Displays the panel in the notification area.static String
display(Actor context, GUIHelper.DialogCommunication comm, GUIHelper.InputPanelWithTextArea panel, int btnJustification)
Displays the panel in the notification area.static Boolean
display(Actor context, GUIHelper.DialogCommunication comm, JPanel panel, int btnJustification)
Displays the panel in the notification area.static Boolean
display(Actor context, GUIHelper.DialogCommunication comm, JPanel panel, int btnJustification, String icon)
Displays the panel in the notification area.static FlowWorkerHandler
getFlowWorkerHandler(Actor context)
Retrieves the FlowWorkerHandler from the context.
-
-
-
Method Detail
-
getFlowWorkerHandler
public static FlowWorkerHandler getFlowWorkerHandler(Actor context)
Retrieves the FlowWorkerHandler from the context.- Parameters:
context
- the context to use- Returns:
- the handler
- Throws:
IllegalStateException
- if no context or not aFlowWorkerHandler
-
display
public static String display(Actor context, GUIHelper.DialogCommunication comm, GUIHelper.InputPanelWithButtons panel)
Displays the panel in the notification area.- Parameters:
context
- the flow context to usecomm
- the interaction communicationpanel
- the panel to display- Returns:
- the selected button, null if stopped
-
display
public static String display(Actor context, GUIHelper.DialogCommunication comm, GUIHelper.InputPanelWithComboBox panel, int btnJustification)
Displays the panel in the notification area.- Parameters:
context
- the flow context to usecomm
- the interaction communicationpanel
- the panel to displaybtnJustification
- the justification of the OK/Cancel buttons (seeFlowLayout
)- Returns:
- the selected button, null if stopped
-
display
public static String display(Actor context, GUIHelper.DialogCommunication comm, GUIHelper.InputPanelWithTextArea panel, int btnJustification)
Displays the panel in the notification area.- Parameters:
context
- the flow context to usecomm
- the interaction communicationpanel
- the panel to displaybtnJustification
- the justification of the OK/Cancel buttons (seeFlowLayout
)- Returns:
- the selected button, null if stopped
-
display
public static Boolean display(Actor context, GUIHelper.DialogCommunication comm, JPanel panel, int btnJustification)
Displays the panel in the notification area.- Parameters:
context
- the flow context to usecomm
- the interaction communicationpanel
- the panel to displaybtnJustification
- the justification of the OK/Cancel buttons (seeFlowLayout
)- Returns:
- whether OK (true) or Cancel (false) was selected, null if stopped
-
display
public static Boolean display(Actor context, GUIHelper.DialogCommunication comm, JPanel panel, int btnJustification, String icon)
Displays the panel in the notification area.- Parameters:
context
- the flow context to usecomm
- the interaction communicationpanel
- the panel to displaybtnJustification
- the justification of the OK/Cancel buttons (seeFlowLayout
)icon
- the icon to display, null for none- Returns:
- whether OK (true) or Cancel (false) was selected, null if stopped
-
-