Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1020351 // TextChangingTableCellRenderer

JavaX fragment (include)

sclass TextChangingTableCellRenderer extends DefaultTableCellRenderer {
  O f; // func(S) -> S
  
  *(O *f) {}

  public Component getTableCellRendererComponent(JTable table, O value, boolean isSelected, boolean hasFocus, int row, int column) {
    Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    S s = strOrEmpty(value);
    setText(f == null ? s : str(callF(f, s)));
    ret c;
  }
}

Author comment

Began life as a copy of #1020349

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020351
Snippet name: TextChangingTableCellRenderer
Eternal ID of this version: #1020351/3
Text MD5: aaecca4bfd28df4f134056f3bcd5cd1a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-15 02:35:30
Source code size: 454 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 349 / 846
Version history: 2 change(s)
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)