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

20
LINES

< > BotCompany Repo | #1015895 // jLiveValueSection - jSection + LiveValue

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5221L/29K).

1  
import javax.swing.border.*;
2  
3  
sclass jLiveValueSection_class extends SingleComponentPanel {
4  
  LiveValue<?> liveValue;
5  
  
6  
  S getTitle() { ret strOrEmpty(liveValue!); }
7  
  
8  
  *(LiveValue<?> lv, Component c) {
9  
    super(c);
10  
    bindLiveValueListenerToComponent(this, liveValue = lv, r-awt {
11  
      setBorder(BorderFactory.createTitledBorder(
12  
        BorderFactory.createBevelBorder(BevelBorder.LOWERED), getTitle()));
13  
      revalidate();
14  
    });
15  
  }
16  
}
17  
18  
static JPanel jLiveValueSection(LiveValue<?> lv, Component c) {
19  
  ret swingNu(jLiveValueSection_class, lv, c);
20  
}

Author comment

Began life as a copy of #1006228

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015895
Snippet name: jLiveValueSection - jSection + LiveValue
Eternal ID of this version: #1015895/11
Text MD5: c5ec35871828c584341bba96eabc6343
Transpilation MD5: aedb5824a5879bc078ddf4234454ce7a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-14 09:12:18
Source code size: 580 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 430 / 521
Version history: 10 change(s)
Referenced in: [show references]