Changeset 10751


Ignore:
Timestamp:
05/03/11 20:46:36 (9 years ago)
Author:
mlg
Message:

Adds an exception management + changes privacy level dialog.

Location:
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/DialogPrivacyLevel.java

    r10750 r10751  
    8585        mapLevels.put(4, 8); 
    8686        checkBoxRemember = new JCheckBox(Messages.getMessage("dialogPrivacy_remember")); 
    87         labelChoice = new JLabel(Messages.getMessage("dialogPrivacy_choosePrivacy")); 
    88         JPanel panelChoice = new JPanel(new FlowLayout()); 
     87        labelChoice = new JLabel(Messages.getMessage("dialogPrivacy_choosePrivacy"), JLabel.CENTER); 
     88        JPanel panelChoice = new JPanel(new FlowLayout(FlowLayout.CENTER)); 
    8989        comboPrivacyLevel = new JComboBox(new privacyLevelModel()); 
    9090        comboPrivacyLevel.setSelectedIndex(0); 
     
    9696        panelButton.add(buttonOk); 
    9797        this.setLayout(new BorderLayout()); 
    98         this.add(panelChoice, BorderLayout.NORTH); 
    99         this.add(panelButton, BorderLayout.CENTER); 
     98        this.add(labelChoice, BorderLayout.NORTH); 
     99        this.add(panelChoice, BorderLayout.CENTER); 
     100        this.add(panelButton, BorderLayout.SOUTH); 
    100101 
    101102        this.pack(); 
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailPanel.java

    r10718 r10751  
    132132     */ 
    133133    public Dimension getPreferredSize() { 
    134         int w = (int) (ImagesManagement.getInstance().getMiniatureBufferedImage(image).getWidth()); 
    135         int h = (int) (ImagesManagement.getInstance().getMiniatureBufferedImage(image).getHeight() + 10); 
    136         return new Dimension(w, h); 
     134        try { 
     135            int w = (int) (ImagesManagement.getInstance().getMiniatureBufferedImage(image).getWidth()); 
     136            int h = (int) (ImagesManagement.getInstance().getMiniatureBufferedImage(image).getHeight() + 10); 
     137            return new Dimension(w, h); 
     138        } catch (NullPointerException e) { 
     139            return new Dimension(100, 100); 
     140        } 
    137141    } 
    138142 
Note: See TracChangeset for help on using the changeset viewer.