Class DefaultTableFields

java.lang.Object
com.caplin.motif.fx.trading.posttradehistory.DefaultTableFields

public class DefaultTableFields extends Object
Static builder methods to build standard Tables
  • Method Details

    • addPostTradeHistoryHeaders

      public static Table addPostTradeHistoryHeaders(Table table)
      Adds default post trade history headers to your table configuration
      Parameters:
      table - The Table to add the headers to
    • addPostTradeHistoryRow

      public static Table addPostTradeHistoryRow(Table table, LocalDate date, FormattedAmount amount, LocalDate settlementDate, @Nullable String settlementTenor, FormattedAmount remainingAmount, PostTradeHistoryAction postTradeHistoryAction)
      Adds a post trade history row to your table configuration
      Parameters:
      table - The Table to add the row to
      date - The date the post trade history event occurred
      amount - The amount of the new trade
      settlementDate - The settlement date of the new trade
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      remainingAmount - The remaining amount of the parent trade after the new trade has been executed
      postTradeHistoryAction - The action to perform on click of the button
    • createDateCell

      public static TableCell createDateCell(LocalDate date)
      Creates a date cell to add to your post trade history table row
      Parameters:
      date - The date the post trade history event occurred
    • createRemainingAmountCell

      public static TableCell createRemainingAmountCell(FormattedAmount amount)
      Creates a remaining amount cell to add to your post trade history table row
      Parameters:
      amount - The remaining amount of the parent trade after the post trade event occurred
    • createAmountCell

      public static TableCell createAmountCell(FormattedAmount amount)
      Creates an amount cell to add to your post trade history table row
      Parameters:
      amount - The amount of the new trade
    • createSettlementDateCell

      public static TableCell createSettlementDateCell(LocalDate settlementDate, @Nullable String tenor)
      Creates a settlement date cell to add to your post trade history table row
      Parameters:
      settlementDate - The settlement date of the new trade created
      tenor - Optional tenor, to be displayed in brackets after the settlement date
    • createActionCell

      public static TableCell createActionCell(PostTradeHistoryAction postTradeHistoryAction)
      Creates an action cell to add to your post trade history table row
      Parameters:
      postTradeHistoryAction - The action to perform on click of the button
    • createPostTradeHistoryTable

      public static Table createPostTradeHistoryTable()
      Creates an post trade history table with no rows