AbstractFactory

public abstract class AbstractFactory<ProductSetupPanel>

A template for factories that are set up using a JPanel. This template is currently used by the Analyzer and Controller interfaces.

Author:

Marcel Stefko

Parameters:
  • <ProductSetupPanel> – A JPanel for setting up the parameters.

Fields

selected_name

String selected_name

The name of analyzer/controller.

Constructors

AbstractFactory

public AbstractFactory()

Initializes the map which stores different setup panels.

Methods

addSetupPanel

protected void addSetupPanel(String name, ProductSetupPanel panel)

Adds a new setup panel to the list.

Parameters:
  • name – ID of the product belonging to the panel and displayed in the GUI.
  • panel – The JPanel to setup the analyzer/controller.

getProductNameList

public Set<String> getProductNameList()

Returns a list of all possible analyzer/controller names.

Returns:A list of all possible product keys.

getProductSetupPanelCollection

public Collection<ProductSetupPanel> getProductSetupPanelCollection()

Returns a group of all the possible setup panels for the available analyzers/controllers.

Returns:A collection of all possible product setup panels.

getSelectedProductName

public String getSelectedProductName()

Returns the name of the selected analyzer/controller.

Returns:The name of currently selected product.

getSelectedSetupPanel

public ProductSetupPanel getSelectedSetupPanel()

Returns the setup panel of the currently selected analyzer/controller.

Returns:The setup panel of currently selected analyzer/product.

selectProduct

public void selectProduct(String name)

Selects a product from factory.

Parameters:
  • name – The product identifier.