Class NexusTable

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

    public class NexusTable
    extends JTable
    Some notes on the implementation of columns with fully interactive editors. It is strongly recommended to create the editor on a JCellBackgroundPanel object, it will handle coloring and selection. MOUSE HANDLING: In case that you develop mouse handlers to intercept mouse events on your interactive panel, it is strongly recommended to use the DispatchingMouseAdapter and dispatch captured mousePressed events to the JCellBackgroundPanel object of the cell (NOT TO THE JTABLE, THIS CAN CAUSE StackOverflows because the JTable may redispatch events to the editor). The JCellBackgroundPanel will interpret the mousePressed events and adjust selection accordingly! For an example see the editor used in StructureCalculatedPropertiesColumn!! REPAINTING: It seems, that setting components inside custom editors to: setOpaque(false) helps with correct rendering and manual painting of backgrounds (in paintComponent). Also calling repaint manually inside the custom editors can help with updating.
    See Also:
    Serialized Form
    • Method Detail

      • updateColumns

        public void updateColumns()
      • setMouseOverHighlightingEventColor

        public void setMouseOverHighlightingEventColor​(boolean useMouseOverHighlighting,
                                                       Color col)
      • setListSelectionColor

        public void setListSelectionColor​(Color col)
      • createInteractiveEditorInfrastructure

        public NexusTable.NexusInteractiveEditorInfrastructure createInteractiveEditorInfrastructure​(int row)
        For creating interactive editors it is necessary to dispatch MousePressed events also to the supplied function dispatchMousePressedEvent(..)!!
        Returns: