1 package org.catacomb.druid.gui.base; 2 3 import javax.swing.JPanel; 4 5 import org.catacomb.druid.swing.DBorderLayout; 6 7 8 9 10 public class DruBorderPanel extends DruPanel { 11 static final long serialVersionUID = 1001; 12 13 public DruBorderPanel() { 14 super(); 15 16 setBorderLayout(0, 0); 17 18 } 19 20 public DruBorderPanel(int xspace, int yspace) { 21 super(); 22 setBorderLayout(xspace, yspace); 23 24 } 25 26 27 public DruBorderPanel(int props, int xspace, int yspace) { 28 super(props); 29 setBorderLayout(xspace, yspace); 30 31 } 32 33 34 public void addNorth(DruPanel dp) { 35 addPanel(dp, DBorderLayout.NORTH); 36 } 37 38 public void addSouth(DruPanel dp) { 39 addPanel(dp, DBorderLayout.SOUTH); 40 } 41 42 public void addEast(DruPanel dp) { 43 addPanel(dp, DBorderLayout.EAST); 44 } 45 46 public void addWest(DruPanel dp) { 47 addPanel(dp, DBorderLayout.WEST); 48 } 49 50 public void addCenter(DruPanel dp) { 51 addPanel(dp, DBorderLayout.CENTER); 52 } 53 54 55 56 public void addNorth(DruLabel dp) { 57 setColors(dp); 58 addDComponent(dp.getGUIPeer(), DBorderLayout.NORTH); 59 } 60 61 public void addSouth(DruLabel dp) { 62 setColors(dp); 63 addDComponent(dp.getGUIPeer(), DBorderLayout.SOUTH); 64 } 65 66 public void addEast(DruLabel dp) { 67 setColors(dp); 68 addDComponent(dp.getGUIPeer(), DBorderLayout.EAST); 69 } 70 71 public void addWest(DruLabel dp) { 72 setColors(dp); 73 addDComponent(dp.getGUIPeer(), DBorderLayout.WEST); 74 } 75 76 public void addCenter(DruLabel dp) { 77 setColors(dp); 78 addDComponent(dp.getGUIPeer(), DBorderLayout.CENTER); 79 } 80 81 82 public static Object getCenterConstraints() { 83 return DBorderLayout.CENTER; 84 } 85 86 public void addRaw(JPanel panel) { 87 addRaw(panel, DBorderLayout.CENTER); 88 } 89 90 91 92 93 }