/** * Displays a dialog showing the detailed properties of a bucket, which will remain until the user * dismisses the dialog. * * @param owner * the Frame over which the dialog will be displayed and centered * @param bucket * the bucket whose details will be displayed * @param applicationProperties * property settings for this application */ public static void showDialog(Frame owner, S3Bucket bucket, Properties applicationProperties) { ItemPropertiesDialog dialog = new ItemPropertiesDialog(owner, "Bucket properties", false, applicationProperties, false); dialog.displayBucketProperties(bucket); dialog.setVisible(true); dialog.dispose(); }
/** * Event handler for this dialog. */ public void actionPerformed(ActionEvent e) { if (e.getSource().equals(nextObjectButton)) { currentObjectIndex++; displayObjectProperties(); } else if (e.getSource().equals(previousObjectButton)) { currentObjectIndex--; displayObjectProperties(); } else if ("OK".equals(e.getActionCommand())) { this.setVisible(false); } }
/** * Displays a dialog showing the detailed properties of an object, which will remain until the user * dismisses the dialog. * * @param owner * the Frame over which the dialog will be displayed and centered * @param objects * the object whose details will be displayed * @param applicationProperties * property settings for this application * @param includeMetadata * display objects' metadata information in dialog. */ public static void showDialog(Frame owner, S3Object[] objects, Properties applicationProperties, boolean includeMetadata) { ItemPropertiesDialog dialog = new ItemPropertiesDialog(owner, "Object properties", true, applicationProperties,includeMetadata); dialog.displayObjectsProperties(objects); dialog.setVisible(true); dialog.dispose(); }
this.setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.getRootPane().setDefaultButton(okButton); this.getContentPane().add(container); this.pack(); if (isObjectBased) { this.setSize(400, (includeMetadata ? 550 : 400)); this.setLocationRelativeTo(this.getOwner());
this.pack(); this.setSize(this.getWidth(), 450); this.setLocationRelativeTo(this.getOwner());
private void displayObjectsProperties(S3Object[] objects) { this.objects = objects; this.currentObjectIndex = 0; displayObjectProperties(); }
/** * Construct a modal dialog displaying details of a bucket or object. * * @param owner * the Frame over which the dialog will be displayed and centered * @param title * a title for the dialog * @param isObjectDialog * if true an object-specific dialog will be displayed, otherwise a bucket-specific dialog. * @param applicationProperties * property settings for this application * @param includeMetadata * display objects' metadata information in dialog. */ protected ItemPropertiesDialog(Frame owner, String title, boolean isObjectDialog, Properties applicationProperties, boolean includeMetadata) { super(owner, title, true); this.applicationProperties = applicationProperties; this.includeMetadata = includeMetadata; this.initGui(isObjectDialog); }
this.setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.getRootPane().setDefaultButton(okButton); this.getContentPane().add(container); this.pack(); if (isObjectBased) { this.setSize(400, (includeMetadata ? 550 : 400)); this.setLocationRelativeTo(this.getOwner());
this.pack(); this.setSize(this.getWidth(), 450); this.setLocationRelativeTo(this.getOwner());
private void displayObjectsProperties(S3Object[] objects) { this.objects = objects; this.currentObjectIndex = 0; displayObjectProperties(); }
/** * Construct a modal dialog displaying details of a bucket or object. * * @param owner * the Frame over which the dialog will be displayed and centered * @param title * a title for the dialog * @param isObjectDialog * if true an object-specific dialog will be displayed, otherwise a bucket-specific dialog. * @param applicationProperties * property settings for this application * @param includeMetadata * display objects' metadata information in dialog. */ protected ItemPropertiesDialog(Frame owner, String title, boolean isObjectDialog, Properties applicationProperties, boolean includeMetadata) { super(owner, title, true); this.applicationProperties = applicationProperties; this.includeMetadata = includeMetadata; this.initGui(isObjectDialog); }
/** * Displays a dialog showing the detailed properties of a bucket, which will remain until the user * dismisses the dialog. * * @param owner * the Frame over which the dialog will be displayed and centered * @param bucket * the bucket whose details will be displayed * @param applicationProperties * property settings for this application */ public static void showDialog(Frame owner, S3Bucket bucket, Properties applicationProperties) { ItemPropertiesDialog dialog = new ItemPropertiesDialog(owner, "Bucket properties", false, applicationProperties, false); dialog.displayBucketProperties(bucket); dialog.setVisible(true); dialog.dispose(); }
/** * Displays a dialog showing the detailed properties of an object, which will remain until the user * dismisses the dialog. * * @param owner * the Frame over which the dialog will be displayed and centered * @param objects * the object whose details will be displayed * @param applicationProperties * property settings for this application * @param includeMetadata * display objects' metadata information in dialog. */ public static void showDialog(Frame owner, S3Object[] objects, Properties applicationProperties, boolean includeMetadata) { ItemPropertiesDialog dialog = new ItemPropertiesDialog(owner, "Object properties", true, applicationProperties,includeMetadata); dialog.displayObjectsProperties(objects); dialog.setVisible(true); dialog.dispose(); }
/** * Event handler for this dialog. */ public void actionPerformed(ActionEvent e) { if (e.getSource().equals(nextObjectButton)) { currentObjectIndex++; displayObjectProperties(); } else if (e.getSource().equals(previousObjectButton)) { currentObjectIndex--; displayObjectProperties(); } else if ("OK".equals(e.getActionCommand())) { this.setVisible(false); } }