Class InputOverlayTable

All Implemented Interfaces:
BidirectionalLink, Linkable, LinkSource, LinkTarget, Workspace, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class InputOverlayTable extends GuiTable implements BidirectionalLink
A GuiTable implementation that provides an overlay of locally edited values on top of a server side MutableInputTable
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • updateColumns

      public void updateColumns()
      Description copied from class: GuiTable

      Called when the table changes in order to properly process updates to columns.

      Handles the following column updates:
      - preserve current order
      - keep hidden columns hidden
      - add new columns to the end
      - replace columns that are the "same"
      - remove missing columns
      - fix renderers of the wrong column type

      Subclasses may override this method to add additional updates to columns. It is recommended to call super.updateColumns() before operating on columns.

      Overrides:
      updateColumns in class GuiTable
    • editCellAt

      public boolean editCellAt(int row, int column, EventObject e)
      Overrides:
      editCellAt in class JTable
    • processSingleClick

      protected void processSingleClick(int row, int col, MouseEvent e)
      Description copied from class: GuiTable
      Process a single click. The base method does nothing and may be overridden.
      Overrides:
      processSingleClick in class GuiTable
      Parameters:
      row - The row clicked.
      col - The column clicked.
      e - The details of the click event.
    • processHeaderClick

      protected void processHeaderClick(int col, MouseEvent e)
      Description copied from class: GuiTable
      Process a header single or double click. The base method creates a TableHeaderPopup but may be overridden.
      Overrides:
      processHeaderClick in class GuiTable
      Parameters:
      col - The column clicked.
      e - The details of the click event.
    • processDoubleClick

      public void processDoubleClick(int row, int col, MouseEvent e)
      Description copied from class: GuiTable
      Process a double click. The base method does nothing and may be overridden.
      Overrides:
      processDoubleClick in class GuiTable
      Parameters:
      row - The row clicked.
      col - The column clicked.
      e - The details of the click event.
    • tableChanged

      public void tableChanged(TableModelEvent e)
      Specified by:
      tableChanged in interface TableModelListener
      Overrides:
      tableChanged in class GuiTable
    • getBackColumns

      @NotNull protected Set<String> getBackColumns()
      Overrides:
      getBackColumns in class GuiTable
    • handleUnmentionedColumns

      protected void handleUnmentionedColumns(HiddenColumnModel columnModel, Set<TableColumn> unmentionedColumns, Collection<String> initialHiddenColumns)
      Description copied from class: GuiTable
      Handle any columns that have not been visited by the current column ordering. When this method is invoked all layout hints including atFront() and atBack() have been evaluated. The default implementation simply places them at the end of the current order.
      Overrides:
      handleUnmentionedColumns in class GuiTable
      Parameters:
      columnModel - The model
      unmentionedColumns - The columns that have not yet been inserted into the order
      initialHiddenColumns - The columns which were explicitly hidden
    • addTarget

      public void addTarget(LinkTarget target)
      Description copied from interface: LinkSource
      Add the specified target to this Source's list of links.
      Specified by:
      addTarget in interface LinkSource
      Parameters:
      target - The target to add.
    • removeTarget

      public void removeTarget(LinkTarget target)
      Description copied from interface: LinkSource
      Remove the specified Target from this source's notification list.
      Specified by:
      removeTarget in interface LinkSource
      Parameters:
      target - The target to remove.
    • getTargets

      public Collection<LinkTarget> getTargets()
      Specified by:
      getTargets in interface LinkSource
      Returns:
      A collection of all the targets this source affects.
    • getSourceLinkColumns

      public Set<String> getSourceLinkColumns()
      Specified by:
      getSourceLinkColumns in interface LinkSource
      Returns:
      A set of all the columns for which this source is linked.
    • makeLink

      public void makeLink(LinkSource from, String sourceColumn, String targetColumn, Condition condition)
      Description copied from interface: LinkTarget
      Create a link from sourceColumn on a LinkSource to the targetColumn of this LinkTarget using the specified Condition as a filter condition
      Specified by:
      makeLink in interface LinkTarget
      Parameters:
      from - The source of the filter link.
      sourceColumn - The source column of the filter link
      targetColumn - The column to compare to the sourceColumn
      condition - The condition to apply to the matching
    • removeLink

      public void removeLink(LinkSource from, String srcColumn, String targetColumn, Condition condition)
      Description copied from interface: LinkTarget
      Remove a link between the specified columns and condition between this target and it's source. Note that for a link to be removed all of the specified parameters must match what was added via LinkTarget.makeLink(LinkSource, String, String, Condition).
      Specified by:
      removeLink in interface LinkTarget
      Parameters:
      from - The source to remove a link to
      srcColumn - The column link being removed
      targetColumn - The column being linked to
      condition - The condition of the filter
    • removeAllLinks

      public void removeAllLinks(LinkSource from)
      Description copied from interface: LinkTarget
      Remove all column filter links between this object and the specified source.
      Specified by:
      removeAllLinks in interface LinkTarget
      Parameters:
      from - The source of the links to remove.
    • update

      public void update(LinkEvent event)
      Description copied from interface: LinkTarget
      Notify this LinkTarget of an event from a source.
      Specified by:
      update in interface LinkTarget
      Parameters:
      event - A LinkEvent containing the details of the event.
    • getLinks

      public Map<LinkSource,Collection<LinkDescriptor>> getLinks()
      Specified by:
      getLinks in interface LinkTarget
      Returns:
      A collection of all links attached to this target.
    • getLinks

      public Collection<LinkDescriptor> getLinks(LinkSource source)
      Specified by:
      getLinks in interface LinkTarget
      Parameters:
      source - The source to check links from.
      Returns:
      A collection of all links between the specified source and this target.
    • getClearFiltersBeforeUpdate

      public boolean getClearFiltersBeforeUpdate()
      Description copied from interface: LinkTarget
      Indicates if a Link Target will clear its filters before an update.
      Specified by:
      getClearFiltersBeforeUpdate in interface LinkTarget
      Returns:
      true if it will clear, false otherwise
    • setClearFiltersBeforeUpdate

      public void setClearFiltersBeforeUpdate(boolean shouldClear)
      Description copied from interface: LinkTarget
      Sets if a Link Target should clear its filters before an update.
      Specified by:
      setClearFiltersBeforeUpdate in interface LinkTarget
      Parameters:
      shouldClear - true to clear, false otherwise
    • removeAllLinks

      public void removeAllLinks()
      Description copied from interface: Linkable
      Remove all target links from this source.
      Specified by:
      removeAllLinks in interface Linkable
    • isLinked

      public boolean isLinked()
      Specified by:
      isLinked in interface Linkable
      Returns:
      If this target has any links.
    • readyForLinks

      public boolean readyForLinks()
      Specified by:
      readyForLinks in interface Linkable
      Returns:
      If this linkable can accept links.
    • getLinkableColumns

      @NotNull public List<String> getLinkableColumns()
      Specified by:
      getLinkableColumns in interface Linkable
      Returns:
      A list of columns available to be linked to.
    • getAllowedConditions

      @NotNull public Collection<Condition> getAllowedConditions(String column)
      Specified by:
      getAllowedConditions in interface Linkable
      Returns:
    • getId

      @NotNull public String getId()
      Specified by:
      getId in interface Linkable
      Returns:
      The ID that uniquely identifies this Linkable.
    • getFriendlyName

      @NotNull public String getFriendlyName()
      Specified by:
      getFriendlyName in interface Linkable
      Returns:
      A user friendly name for UI presentation.
    • getComponent

      @Nullable public JComponent getComponent()
      Description copied from interface: Linkable
      Get's the UI component for this Linkable. If this Linkable is not a UI component, implementations may return null.
      Specified by:
      getComponent in interface Linkable
      Returns:
      The component of this Linkable or null if there was none