use of cbit.gui.ImageResizePanel in project vcell by virtualcell.
the class ClientRequestManager method queryImageResize.
public static ImageSizeInfo queryImageResize(final Component requester, final ImageSizeInfo origImageSizeInfo, boolean bFullMode) {
ImageResizePanel imageResizePanel = new ImageResizePanel();
imageResizePanel.init(origImageSizeInfo, bFullMode);
imageResizePanel.setPreferredSize(new Dimension(400, 200));
while (true) {
int flag = DialogUtils.showComponentOKCancelDialog(requester, imageResizePanel, "Optionally convert imported images.");
if (flag != JOptionPane.OK_OPTION) {
throw UserCancelException.CANCEL_GENERIC;
}
try {
ImageSizeInfo imagesizeInfo = imageResizePanel.getNewImageSizeInfo();
return imagesizeInfo;
} catch (Exception e) {
e.printStackTrace();
DialogUtils.showErrorDialog(requester, "Error getting x,y,z: " + e.getMessage());
}
}
}
Aggregations