DefaultMDIDialogBuilder
class implements the MDIDialogBuilder interface, so all there is a corresponding setter for all the methods allowing to configure the MDIDialogBuilder
:DefaultMDIDialogBuilder
is done through one of the following methods:DefaultMDIDialogBuilder
class implements the MDIDialogBuilder interface, so showing the associated dialog is done exactly as for the MDIDialogBuilder
:DefaultMDIDialogBuilder
classDefaultMDIDialogBuilder
class with the same IDpublic class AnalyzeImageAction extends AbstractMDIAction { public AnalyzeImageAction(MDIApplication appli, String name) { super(appli, name); this.setDescription("Analyze", "Analyze Image"); } @Override public void run() throws Exception { GUIApplication gui = ((GUIApplication) app); BufferedImage image = (BufferedImage) gui.getSelectedProperties().getObject(); DefaultMDIDialogBuilder builder = new DefaultMDIDialogBuilder("Analyze Image"); builder.addVerticalDialogPart("Size", new JLabel("Width: " + image.getWidth()), new JLabel("Height: " + image.getHeight())); gui.showDialog(builder, MDIDialogType.UNIQUE_INSTANCE); } }with the following result:
Copyright 2006-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences