|
@@ -55,6 +55,8 @@ public class Gallery extends JPanel implements Observer
|
|
|
{
|
|
|
this.setLayout(new GridLayout(0, 1));
|
|
|
}
|
|
|
+
|
|
|
+ this.setBackground(Color.cyan);
|
|
|
|
|
|
this.removeAll();
|
|
|
|
|
@@ -93,18 +95,18 @@ class Item extends JPanel
|
|
|
{
|
|
|
this.data = p;
|
|
|
this.clicklistener = new clickListener();
|
|
|
- this.setLayout(new GridLayout(0, 1));
|
|
|
- this.setPreferredSize(new Dimension(200, 320));
|
|
|
+ this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
|
|
+ this.setPreferredSize(new Dimension(200, 300));
|
|
|
this.picture = new ImageIcon(data.getPic());
|
|
|
this.pic = new JLabel(picture, JLabel.CENTER);
|
|
|
this.pic.addMouseListener(clicklistener);
|
|
|
this.pic.setPreferredSize(new Dimension(200, 200));
|
|
|
this.name = new JLabel(data.getName(), JLabel.CENTER);
|
|
|
- this.name.setPreferredSize(new Dimension(200, 40));
|
|
|
+ this.name.setPreferredSize(new Dimension(200, 25));
|
|
|
this.rating = new JLabel(Integer.toString(data.getRating()), JLabel.CENTER);
|
|
|
- this.rating.setPreferredSize(new Dimension(200, 40));
|
|
|
+ this.rating.setPreferredSize(new Dimension(200, 50));
|
|
|
this.dateSize = new JLabel(Long.toString(data.getLastmod()) + Long.toString(data.getSize()), JLabel.CENTER);
|
|
|
- this.dateSize.setPreferredSize(new Dimension(200, 40));
|
|
|
+ this.dateSize.setPreferredSize(new Dimension(200, 25));
|
|
|
this.add(pic);
|
|
|
this.add(name);
|
|
|
this.add(rating);
|