Record Class ColumnViewAdapter.ContextMenuArgs<T>

java.lang.Object
java.lang.Record
com.amalgamasimulation.desktop.ui.views.ColumnViewAdapter.ContextMenuArgs<T>
Type Parameters:
T - the type of the table item
Record Components:
menu - the context menu to be displayed
item - the data item of the selected row
column - the column where the context menu was invoked
Enclosing class:
ColumnViewAdapter<T>

public static record ColumnViewAdapter.ContextMenuArgs<T>(org.eclipse.swt.widgets.Menu menu, T item, IColumn<T,?,?> column) extends Record
Context menu event arguments for table operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContextMenuArgs(org.eclipse.swt.widgets.Menu menu, T item, IColumn<T,?,?> column)
    Creates an instance of a ContextMenuArgs record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    IColumn<T,?,?>
    Returns the value of the column record component.
    int
    Returns the original column index.
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the item record component.
    org.eclipse.swt.widgets.Menu
    Returns the value of the menu record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ContextMenuArgs

      public ContextMenuArgs(org.eclipse.swt.widgets.Menu menu, T item, IColumn<T,?,?> column)
      Creates an instance of a ContextMenuArgs record class.
      Parameters:
      menu - the value for the menu record component
      item - the value for the item record component
      column - the value for the column record component
  • Method Details

    • columnIndex

      public int columnIndex()
      Returns the original column index. This index reflects the column's position in the original column order and is not affected by user column reordering.
      Returns:
      the original column index
    • columnName

      public String columnName()
      Returns:
      the column name
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • item

      public T item()
      Returns the value of the item record component.
      Returns:
      the value of the item record component
    • column

      public IColumn<T,?,?> column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component