Class SelectBoxService
java.lang.Object
cz.fidentis.analyst.gui.task.batch.SelectBoxService
In contrast to the
FacesProxy
, which deals with faces that are the subject of batch processing,
this class add handling of the (optionally computed) average face.
While the faces can be temporarily dumped, the average face is always in the memory.
It is assumed that the average face is added as the first item of a menu (combo box), whenever is computed.
This class provides methods for such menu (combo box) management and synchronization.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FaceReference
getSelectedFace
(Task task, JComboBox<String> cbox) Returns the face selected in a menu.static void
syncSelectionMenu
(Task task, boolean selectNewAvgFace, JComboBox<String> cbox) Fill the menu (combo box) with names of faces stored in the face proxy, plus the optional average face.static void
syncSelectionMenu
(Task task, FaceReference avgFace, boolean selectNewAvgFace, JComboBox<String> cbox) Fill the menu (combo box) with names of faces, including the average face, if provided as input parameter.
-
Constructor Details
-
SelectBoxService
public SelectBoxService()
-
-
Method Details
-
syncSelectionMenu
public static void syncSelectionMenu(Task task, FaceReference avgFace, boolean selectNewAvgFace, JComboBox<String> cbox) Fill the menu (combo box) with names of faces, including the average face, if provided as input parameter. The average face is stored. An action event is triggered automatically by thecbox
with with the originally selected item or the newly added average face.- Parameters:
avgFace
- The average face, can benull
selectNewAvgFace
- Iftrue
and a new average is added, then the average face is automatically selected. If theavgFace
isnull
, then this parameter has no effect.cbox
- A combo box (menu)
-
syncSelectionMenu
Fill the menu (combo box) with names of faces stored in the face proxy, plus the optional average face. An action event is triggered automatically by thecbox
with the originally selected item or the newly added average face.- Parameters:
selectNewAvgFace
- Iftrue
and a new average is added, then the average face is automatically selected.cbox
- A combo box (menu)
-
getSelectedFace
Returns the face selected in a menu.- Parameters:
cbox
- A combo box (menu)- Returns:
- The face selected in a menu. This is either some face from the dataset, or the average face.
-