/************************************************************/ /* PlatzMatrixPanel.java Version 2003/03/28 */ /* */ /* Tom Fellmann, Christoph Weißenborn */ /* */ /************************************************************/ import java.awt.*; import javax.swing.*; /********************************************************************/ /* Klasse KantenMatrixPanel */ /********************************************************************/ class PlatzMatrixPanel extends JPanel{ private Platz[] plaetze; private myJLabel[][] jlabels; private JPanel internesPanel; private myJLabel titel; /***************************************************/ /* Konstruktor */ /***************************************************/ public PlatzMatrixPanel(boolean isVisible) { super( new BorderLayout()); try{ plaetze = new Platz[0]; init( isVisible); } catch(Exception e) {} }//PlatzMatrixPanel-Konstruktor /***************************************************/ /* Initialisierung */ /***************************************************/ private void init(boolean isVisible) throws Exception { setVisible( isVisible); setEnabled( false); add( titel = new myJLabel("Platz-Matrix"), BorderLayout.NORTH); add( internesPanel = new JPanel(), BorderLayout.CENTER); this.setBackground( Netz.HINTERGRUNDFARBE_NETZ); this.setForeground( Netz.HINTERGRUNDFARBE_NETZ); }//init /***************************************************/ /* Darstellungs-Teil */ /***************************************************/ public void paintComponent(Graphics g) { } /***************************************************/ /* struktureller Teil */ /***************************************************/ protected void einfuegePlatz(Platz ePlatz) { if( ePlatz.getID() >= plaetze.length ){ Platz[] alt = plaetze; plaetze = new Platz[ePlatz.getID()+1]; for( int i=0; i