Class SwingMessageTable<D>

Type Parameters:
D - the type of document identifiers
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class SwingMessageTable<D> extends JTable
Multi-line rendering for message text. See e.g. https://coderanch.com/t/341698/java/TableRenderer-multiple-lines-text
"setLineWrap(true)" thanks to https://www.experts-exchange.com/questions/21475798/jtable-line-wrap.html
See Also:
  • Field Details

    • COLNUM_LOCATION

      protected static final int COLNUM_LOCATION
      Number of the message location column
      See Also:
    • COLNUM_TEXT

      protected static final int COLNUM_TEXT
      Number of the message text column
      See Also:
    • standardColor_warn

      public static final Color standardColor_warn
      Background color for warning messages
    • standardColor_error

      public static final Color standardColor_error
      Background color for error messages
    • standardColor_neutral

      public static final Color standardColor_neutral
      Background color for all other messages
    • standardColor_hint

      public static final Color standardColor_hint
      Background color for hint messages
    • colorWarn

      protected Color colorWarn
      Background color for warning messages
    • colorError

      protected Color colorError
      Background color for error messages
    • colorNeutral

      protected Color colorNeutral
      Background color for all other messages
    • colorHint

      protected Color colorHint
      Background color for hint messages
    • translate

      protected Function<? super SimpleMessage<D>,String> translate
      Renders the message text and the arguments. (Kind, Location, Cause, etc. do not need MuLi support)
    • indentString

      protected String indentString
      The string prepended n times before the text to indicate the nesting level
  • Constructor Details

    • SwingMessageTable

      public SwingMessageTable(MessageStore_<SimpleMessage<D>>.TableModel model)
      Only constructor, needs an instance of a table model.
      (Please note that DnD is disabled since no Handler is explicitly set.)
  • Method Details

    • setColorWarn

      public Color setColorWarn(Color nc)
      Evident. @return the overwritten value
    • setColorError

      public Color setColorError(Color nc)
      Evident. @return the overwritten value
    • setColorHint

      public Color setColorHint(Color nc)
      Evident. @return the overwritten value
    • setTranslate

      public void setTranslate(Function<? super SimpleMessage<D>,String> fun)
      Renders the message text and the arguments. (Kind, Location, Cause, etc. do not need MuLi support)
    • setIndentString

      public void setIndentString(String s)
      Evident
    • makePref

      protected String makePref(int i, String s)
      Prepend the prefix i-times to the string.
    • setwidth_minpref

      protected void setwidth_minpref(int colnum, int width)
      Sets minimal und preferred width.