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

22
LINES

< > BotCompany Repo | #1008602 // AbstractLayoutManager - only requires implementing layoutContainer

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

Transpiled version (7503L) is out of date.

1  
abstract sclass AbstractLayoutManager implements LayoutManager {
2  
  settable Dimension preferredSize = new Dimension(100, 100);
3  
  settable Dimension minimumSize = new Dimension(10, 10);
4  
5  
  public void addLayoutComponent(String name, Component comp) {}
6  
  public void removeLayoutComponent(Component comp) {}
7  
  
8  
  selfType preferredSize(int w, int h) {
9  
    ret preferredSize(new Dimension(w, h));
10  
  }
11  
  
12  
  public Dimension preferredLayoutSize(Container parent) {
13  
    layoutContainer(parent);
14  
    //print("preferredSize: " + preferredSize + " (parent size: " + jGetSize(parent) + ")");
15  
    ret preferredSize;
16  
  }
17  
  
18  
  public Dimension minimumLayoutSize(Container parent) {
19  
    //print("minimumLayoutSize");
20  
    ret minimumSize;
21  
  }
22  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008602
Snippet name: AbstractLayoutManager - only requires implementing layoutContainer
Eternal ID of this version: #1008602/8
Text MD5: 7df059d8aa0ea0bf264ae70197b455db
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-17 17:07:29
Source code size: 750 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 605 / 1501
Version history: 7 change(s)
Referenced in: [show references]