001 /*
002 * SimuCS - Simulator to use with Classifier Systems
003 * MSc project - Oxford University
004 * by Benoit Isaac - Summer 2005
005 */
006
007 package simuLCS.graphics;
008 import java.awt.BorderLayout;
009 import java.awt.Dimension;
010 import java.awt.FlowLayout;
011 import java.awt.Graphics;
012
013 import javax.swing.BoxLayout;
014
015 /**
016 * Handles the tab "Behaviour"
017 * @author Benoit
018 *
019 */
020 public class G_PanCustTabBehaviour extends G_Panel {
021
022 // protected G_Panel panList;
023
024 protected G_ListButtons panList;
025 private G_PanBehaviour panAgentCustom;
026
027 public G_PanCustTabBehaviour() {
028 super();
029 this.setOpaque(true);
030
031 // panList = new G_Panel();
032 // createListEntities(panList);
033 // panList.setLayout(new FlowLayout());
034
035 panList = new G_ListButtons(false, selectedEntities);
036 panList.createListEntities();
037 panList.setLayout(new FlowLayout());
038
039 // panAgentCustom = createAgentCustomButtons();
040 // panAgentCustom = new G_Panel();
041 panAgentCustom = new G_PanBehaviour();
042 panAgentCustom.createCustomBehaviours();
043 panAgentCustom.setLayout(new BoxLayout(panAgentCustom, BoxLayout.Y_AXIS));
044
045 panAgentCustom.setMinimumSize(new Dimension(this.getWidth(),450));
046 // panAgentCustom.setPreferredSize(new Dimension(this.getWidth(),450));
047 // createAgentCustomButtons(panAgentCustom);
048
049 // G_Panel panListAndButton = new G_Panel();
050
051 // JSplitPane splitPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,panList,panAgentCustom);
052 // splitPanel.setDividerLocation(150);
053 // splitPanel.setDividerSize(1);
054 // this.add(splitPanel);
055 this.setLayout(new BorderLayout());
056 // this.setLayout(new GridLayout(2,1));
057 // this.add(panList);
058 // this.add(panAgentCustom);
059 this.add(panList, BorderLayout.CENTER);
060 this.add(panAgentCustom, BorderLayout.SOUTH);
061
062
063
064
065 }
066
067
068
069 /**
070 * @return
071 */
072 public G_Panel getPanList() {
073 return panList;
074 }
075
076 public void paintComponent(Graphics g) {
077 panList.createListEntities();
078 panAgentCustom.createCustomBehaviours();
079 }
080
081 }