Class GanttView.GanttViewSelection<R,B>

java.lang.Object
overit.geocallapp.utilities.ux.ui.container.gantt.view.GanttView.GanttViewSelection<R,B>
Direct Known Subclasses:
DataCollectionTemplateGanttView.DataCollectionGanttViewSelection, ForecastActivityDetailGanttView.ForecastActivityDetailGanttViewSelection, MultistageGroupGanttView.MultistageGanttViewSelection
Enclosing class:
GanttView<R,B>

public static class GanttView.GanttViewSelection<R,B> extends Object
Support object to manage the blocks selection
  • Field Details

  • Constructor Details

  • Method Details

    • notifyListeners

      protected void notifyListeners()
    • clear

      public void clear()
      Clear the selection of the whole Gantt rows
    • clear

      public void clear(String rowId)
      Clear the selection of the given row
      Parameters:
      rowId - the row to clear
    • clear

      protected void clear(String rowId, boolean silent)
    • selectRowBlocks

      public void selectRowBlocks(String rowPath, boolean deep)
      Select the required block in the required row, without alter the selection of the other blocks
      Parameters:
      rowPath - the path of the row in which look for the block
    • selectRowBlocks

      protected void selectRowBlocks(String rowPath, boolean silent, boolean deep)
    • selectBlock

      public void selectBlock(String rowId, String blockId)
      Select the required block in the required row, without alter the selection of the other blocks
      Parameters:
      rowId - the id of the row in which look for the block
      blockId - the block id to select
    • selectBlock

      protected void selectBlock(String rowId, String blockId, boolean silent)
    • unselectBlock

      public void unselectBlock(String rowId, String blockId)
      Unselect the required block in the required row, without alter the selection of the other blocks
      Parameters:
      rowId - the id of the row in which look for the block
      blockId - the block id to unselect
    • unselectRowBlocks

      public void unselectRowBlocks(String rowPath)
      Unselect the required row's blocks,
      Parameters:
      rowPath - the id of the row in which look for the block
    • isBlockSelected

      public boolean isBlockSelected(String rowId, String blockId)
      Parameters:
      rowId - the id of the row in which look for the block
      blockId - the block id to esaminate
      Returns:
      true if is the block is selected, false otherwise
    • toggleBlockSelection

      public void toggleBlockSelection(String rowId, String blockId)
      Switch the selection of the required block from true to false, and viceversa.
      Parameters:
      rowId - the id of the row in which look for the block
      blockId - the block id to toggle
    • selectTo

      public void selectTo(String rowId, String blockId)
      Expand the selection until the required block is reached with the following assumptions: x is selected - is not selected
      
         assume that the row 1 have this situation
         01234567
         --------
         
         selectTo(1, 2) will modify the selection to
         
         01234567
         --x-----
         
         and from this situation, selectTo(1, 6) will modify the selection to
         
         01234567
         --xxxxx-
         
         and from this situation, selectTo(1, 0) will modify the selection to
         
         01234567
         xxxxxxx-
         
         and from this situation, selectTo(1, 4) will modify the selection to
         
         01234567
         xxxxx---
         (close the current selection with the 4th element)
         
       
      Parameters:
      rowId - the id of the row in which look for the block
      blockId - the block id to reach with the selection
    • selectFromMinToNew

      protected void selectFromMinToNew(GanttRow<R,B> row, GanttBlock<B> block, Date minSelection)
    • selectFromMaxToNew

      protected void selectFromMaxToNew(GanttRow<R,B> row, GanttBlock<B> block, Date maxSelection)
    • selectFromNewToMin

      protected void selectFromNewToMin(GanttRow<R,B> row, GanttBlock<B> block, Date minSelection)
    • rowSingleSelect

      public void rowSingleSelect(String rowId, String blockId)
      Clear the selection of the given row, and select only the required block.
      Parameters:
      rowId - the id of the row in which look for the block
      blockId - the block id to reach with the selection
    • getSelectedBlocks

      public Collection<String> getSelectedBlocks()
      Returns:
      a Collection with the id of the selected blocks