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

39
LINES

< > BotCompany Repo | #1035971 // G22POIPanel

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

Transpiled version (68619L) is out of date.

1  
srecord noeq G22POIPanel(G22PointOfInterest poi) is Swingable {
2  
  G22Utils g22utils;
3  
  G22GalleryImage img;
4  
  G22DataWrangler wrangler;
5  
  
6  
  cachedVisualize {
7  
    g22utils = g22utils(poi);
8  
    img = poi.galleryImage();
9  
    new L<JComponent> parts;
10  
    
11  
    if (img == null)
12  
      ret jCenteredLabel("Image not found: " + poi.imageMD5);
13  
      
14  
    // Original image
15  
    
16  
    var is1 = g22utils.stdImageSurface(img);
17  
    g22markPointAnimation(is1, poi.pt);
18  
    parts.add(jCenteredSection("Original image", g22utils.wrap(is1)));
19  
    
20  
    // Blurred & Posterized
21  
    
22  
    wrangler = poi.wrangler();
23  
    wrangler.stepUntilStage(wrangler.regionsStage);
24  
25  
    var is2 = g22utils.stdImageSurface(wrangler.posterizedImage);
26  
    g22markPointAnimation(is2, poi.pt);
27  
    parts.add(jCenteredSection("Blurred & Posterized", g22utils.wrap(is2)));
28  
    
29  
    // Regions
30  
31  
    IImageRegion region = poi.regionAroundPoint(wrangler);
32  
33  
    parts.add(jCenteredSection("Region around point",
34  
      new G22RegionPanel(region).g22utils(g22utils)
35  
        .originalImage(wrangler.inputImage));
36  
    
37  
    ret hgridWithSpacing(map jMinWidth0(parts));
38  
  }
39  
}

Author comment

Began life as a copy of #1035958

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035971
Snippet name: G22POIPanel
Eternal ID of this version: #1035971/12
Text MD5: ea5171699b30ed28c537c9dca9bdf329
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-20 22:55:03
Source code size: 1161 bytes / 39 lines
Pitched / IR pitched: No / No
Views / Downloads: 75 / 126
Version history: 11 change(s)
Referenced in: [show references]