Warning: session_start(): open(/var/lib/php/sessions/sess_i5qrrdsoeoffuh9865updepvt0, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass G22GalleryPanel is Swingable {
settable transient G22Utils g22utils;
transient new JGallery_v2 gallery;
transient ImageSurface selectedImageSurface;
transient new G22AnalysisPanel analysisPanel;
void selectImage(GalleryImage img) {
if (img != null) gallery.selectFile(img.path);
}
cachedVisualize {
var selectedImageSurface = g22utils.stdImageSurface();
gallery.onAdaptingButton(button -> {
if (!g22utils.devMode()) ret;
componentPopupMenuItem(button, "Upload image...",
rThread { uploadImageFileDialog(button.imageFile()) });
});
new AWTOnConceptChangesByClass(g22utils.concepts(), GalleryImage, gallery.visualize(), -> {
print("Updating gallery");
var files = sortFilesAlphaNumIC(
map(list(g22utils.concepts(), GalleryImage), i -> i.path));
gallery.setImageFiles(files);
updateEnclosingTabTitleWithCount(gallery.visualize(), l(files));
}).install();
analysisPanel.g22utils(g22utils).imageSurface(selectedImageSurface);
/*analysisPanel.editAnalyzer = l1 editAnalyzer;
ownResource(analysisPanel);
main onChange(analysisPanel, me());*/
gallery.onFileClicked(imageFile -> {
var img = loadImage2(imageFile);
selectedImageSurface.setImage(img);
analysisPanel?.setImage(img);
});
ret withBottomMargin(
//jvsplit(0.75,
jhsplit(0.25,
jCenteredSection("All Images", gallery.visualize()),
jRaisedCenteredSection("Selected Image",
withRightAlignedButtons(selectedImageSurface.visualize(),
"Gallery CRUD" := r { g22utils.showUIURL("Gallery CRUD") }
)
)
),
//analysisPanel.visualize()
/*)*/);
}
}