java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.tabs.Tab
com.decs.application.views.ProblemEditor.tabs.IslandsTab
All Implemented Interfaces:
ParamTab, com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.tabs.TabVariant>, com.vaadin.flow.component.shared.HasTooltip, Serializable

public class IslandsTab extends com.vaadin.flow.component.tabs.Tab implements ParamTab
Islands Tab Class

This class implements the problem editor islands parameter tab. It is responsible for all visual components and their behavior.

Version:
1.0
Author:
Bruno Guiomar
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.button.Button
     
    private static final String
    Name of the client islands parameter file this tab will generate
    private com.vaadin.flow.component.button.Button
     
    private com.vaadin.flow.component.select.Select<EnhancedBoolean>
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.shared.Tooltip
     
    private Island
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.textfield.TextField
     
    private static final String
    Name of the regular islands parameter file this tab will generate
    private com.vaadin.flow.component.button.Button
     
    private com.vaadin.flow.component.icon.Icon
     
    private com.vaadin.flow.component.dialog.Dialog
     
    private com.vaadin.flow.component.orderedlayout.VerticalLayout
     
    private com.vaadin.flow.component.grid.Grid<Island>
     
    private com.vaadin.flow.data.provider.DataProvider<Island,Void>
    Data provider for the island list grid
    private com.vaadin.flow.component.textfield.TextField
     
    private ArrayList<Island>
     
    private com.vaadin.flow.component.orderedlayout.VerticalLayout
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.html.Span
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.textfield.IntegerField
     
    private com.vaadin.flow.component.grid.Grid<Island>
     
    private com.vaadin.flow.data.binder.Binder<Island>
     
    private com.vaadin.flow.component.grid.editor.Editor<Island>
     
    private com.vaadin.flow.component.textfield.IntegerField
     
    private com.vaadin.flow.component.textfield.IntegerField
     
    private com.vaadin.flow.component.textfield.IntegerField
     
    private com.vaadin.flow.component.textfield.IntegerField
     
    private ArrayList<ec.util.ParameterDatabase>
     
    private com.vaadin.flow.component.combobox.ComboBox<String>
     
    private ArrayList<Island>
     
     
    private com.vaadin.flow.component.button.Button
     
    private com.vaadin.flow.component.button.Button
     
    private static final String
    Name of the server island parameter file this tab will generate
    private com.vaadin.flow.component.button.Button
     
    private com.vaadin.flow.component.select.Select<EnhancedBoolean>
     
    private com.vaadin.flow.component.orderedlayout.HorizontalLayout
     
    private com.vaadin.flow.component.shared.Tooltip
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    IslandsTab(ObjectListDatabase objectListDatabase)
    Class Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    Builds the island editor components group
    com.vaadin.flow.component.orderedlayout.VerticalLayout
    This method is responsible for building the respective tab global layout
    private void
    Builds the global settings components group
    private void
    Builds the island list components group
    private void
    createNewIsland(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    Creates a new island object
    ec.util.ParameterDatabase[]
    This method is responsible for creating a parameter database with the compilation of all parameters and values in the respective tab
    private void
    Fills the migration destination list with default values
    This method is responsible for retrieving the output parameter file name
    private void
    Refreshes the island list grid component
    private void
    saveIsland(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
    Saves the configuration of the respective island

    Methods inherited from class com.vaadin.flow.component.tabs.Tab

    getFlexGrow, getLabel, isSelected, setFlexGrow, setLabel, setSelected, toString

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasAriaLabel

    getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant

    addThemeVariants, removeThemeVariants

    Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip

    getTooltip, setTooltipText
  • Field Details

    • SERVER_PARAMS_FILENAME

      private static final String SERVER_PARAMS_FILENAME
      Name of the server island parameter file this tab will generate
      See Also:
    • CLIENT_PARAMS_FILENAME

      private static final String CLIENT_PARAMS_FILENAME
      Name of the client islands parameter file this tab will generate
      See Also:
    • ISLAND_PARAMS_FILENAME

      private static final String ISLAND_PARAMS_FILENAME
      Name of the regular islands parameter file this tab will generate
      See Also:
    • islandParamDatabaseList

      private ArrayList<ec.util.ParameterDatabase> islandParamDatabaseList
    • objectListDatabase

      private ObjectListDatabase objectListDatabase
    • islandList

      private ArrayList<Island> islandList
    • currentIsland

      private Island currentIsland
    • migrationDestinationIslandList

      private ArrayList<Island> migrationDestinationIslandList
    • islandEditor

      private com.vaadin.flow.component.dialog.Dialog islandEditor
    • islandEditorLayout

      private com.vaadin.flow.component.orderedlayout.VerticalLayout islandEditorLayout
    • islandIDInput

      private com.vaadin.flow.component.textfield.TextField islandIDInput
    • islandMigrationNumberInput

      private com.vaadin.flow.component.textfield.IntegerField islandMigrationNumberInput
    • islandMigDestGrid

      private com.vaadin.flow.component.grid.Grid<Island> islandMigDestGrid
    • islandMigDestGridEditor

      private com.vaadin.flow.component.grid.editor.Editor<Island> islandMigDestGridEditor
    • islandMigDestGridBinder

      private com.vaadin.flow.data.binder.Binder<Island> islandMigDestGridBinder
    • idField

      private com.vaadin.flow.component.textfield.TextField idField
    • saveButton

      private com.vaadin.flow.component.button.Button saveButton
    • cancelButton

      private com.vaadin.flow.component.button.Button cancelButton
    • actions

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout actions
    • islandListLayoutGroup

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout islandListLayoutGroup
    • islandListLayout

      private com.vaadin.flow.component.orderedlayout.VerticalLayout islandListLayout
    • islandListUpperGroup

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout islandListUpperGroup
    • islandListTitle

      private com.vaadin.flow.component.html.Span islandListTitle
    • islandCreateBtnIcon

      private com.vaadin.flow.component.icon.Icon islandCreateBtnIcon
    • islandCreateBtn

      private com.vaadin.flow.component.button.Button islandCreateBtn
    • islandGrid

      private com.vaadin.flow.component.grid.Grid<Island> islandGrid
    • islandMigrationSizeInput

      private com.vaadin.flow.component.textfield.IntegerField islandMigrationSizeInput
    • islandMigrationStartInput

      private com.vaadin.flow.component.textfield.IntegerField islandMigrationStartInput
    • islandMigrationOffsetInput

      private com.vaadin.flow.component.textfield.IntegerField islandMigrationOffsetInput
    • islandMailboxSizeInput

      private com.vaadin.flow.component.textfield.IntegerField islandMailboxSizeInput
    • islandSeed

      private com.vaadin.flow.component.combobox.ComboBox<String> islandSeed
    • saveBtn

      private com.vaadin.flow.component.button.Button saveBtn
    • globalSettingsLayout

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout globalSettingsLayout
    • syncInputLayout

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout syncInputLayout
    • syncInput

      private com.vaadin.flow.component.select.Select<EnhancedBoolean> syncInput
    • syncTooltip

      private com.vaadin.flow.component.shared.Tooltip syncTooltip
    • syncHelpBtn

      private com.vaadin.flow.component.button.Button syncHelpBtn
    • compressionInputLayout

      private com.vaadin.flow.component.orderedlayout.HorizontalLayout compressionInputLayout
    • compressionInput

      private com.vaadin.flow.component.select.Select<EnhancedBoolean> compressionInput
    • compressionTooltip

      private com.vaadin.flow.component.shared.Tooltip compressionTooltip
    • compressionHelpBtn

      private com.vaadin.flow.component.button.Button compressionHelpBtn
    • islandGridDataProvider

      private com.vaadin.flow.data.provider.DataProvider<Island,Void> islandGridDataProvider
      Data provider for the island list grid
  • Constructor Details

    • IslandsTab

      public IslandsTab(ObjectListDatabase objectListDatabase)
      Class Constructor
      Parameters:
      objectListDatabase - Object list database object
  • Method Details

    • buildLayout

      public com.vaadin.flow.component.orderedlayout.VerticalLayout buildLayout()
      Description copied from interface: ParamTab
      This method is responsible for building the respective tab global layout
      Specified by:
      buildLayout in interface ParamTab
      Returns:
      Output layout object
    • getFileName

      public String[] getFileName()
      Description copied from interface: ParamTab
      This method is responsible for retrieving the output parameter file name
      Specified by:
      getFileName in interface ParamTab
      Returns:
      Output parameter file name
    • createParamDatabase

      public ec.util.ParameterDatabase[] createParamDatabase(ProblemType selectedProblem)
      Description copied from interface: ParamTab
      This method is responsible for creating a parameter database with the compilation of all parameters and values in the respective tab
      Specified by:
      createParamDatabase in interface ParamTab
      Parameters:
      selectedProblem - Type of the problem
      Returns:
      Parameter database object
    • createIslandListGroup

      private void createIslandListGroup()
      Builds the island list components group
    • createGlobalSettingsGroup

      private void createGlobalSettingsGroup()
      Builds the global settings components group
    • refreshIslandList

      private void refreshIslandList()
      Refreshes the island list grid component
    • buildIslandEditor

      private void buildIslandEditor(String islandID)
      Builds the island editor components group
      Parameters:
      islandID - Identification of the selected island
    • createNewIsland

      private void createNewIsland(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
      Creates a new island object
      Parameters:
      event - Source event instance
    • fillMigrationDestinationList

      private void fillMigrationDestinationList(int n, String islandID)
      Fills the migration destination list with default values
      Parameters:
      n - Total number of islands in the list
      islandID - Identification of the selected island
    • saveIsland

      private void saveIsland(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
      Saves the configuration of the respective island
      Parameters:
      event - Source event