1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
package sagacity;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.WindowConstants;
import frequenceAllelic.ViewTableFrequenceAllelic;
import AllelicResultByGermplasm.ViewTableAllelicResultByGermplasm;
import IndividualAllelicResult.ViewTableIndividualAllelicResult;
public class View extends JFrame {
/* variables de partage */
Controller controller;
ViewTableAllelicResultByGermplasm viewTableAllelicResultByGermplasm = null;
ViewTableFrequenceAllelic viewTableFrequenceAllelic = null;
ViewTableIndividualAllelicResult viewTableIndividualAllelicResult = null;
/* Fin */
/* Les methodes "envoiJTable" des sous model set ses attributs */
JScrollPane jpanelAllelicResultByGermplasm;
JScrollPane jPanelfrequenceAllelic;
JScrollPane jPanelIndividualAllelicResult;
/**/
private JPanel panelPrincipal;
public View(
ViewTableAllelicResultByGermplasm viewTableAllelicResultByGermplasm,
ViewTableFrequenceAllelic viewTableFrequenceAllelic,
ViewTableIndividualAllelicResult viewTableIndividualAllelicResult) {
panelPrincipal = new JPanel();
BorderLayout disposition = new BorderLayout();
panelPrincipal.setLayout(disposition);
setContentPane(panelPrincipal);
setTitle("Sagacity");
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setVisible(true);
}
public void LienThisController(Controller c) {
this.controller = c;
}
/* getters et setters */
public JScrollPane getJpanelAllelicResultByGermplasm() {
return jpanelAllelicResultByGermplasm;
}
public void setJpanelAllelicResultByGermplasm(
JScrollPane jpanelAllelicResultByGermplasm) {
this.jpanelAllelicResultByGermplasm = jpanelAllelicResultByGermplasm;
panelPrincipal.add("North", jpanelAllelicResultByGermplasm);
panelPrincipal.repaint();
pack();
}
public JScrollPane getJPanelfrequenceAllelic() {
return jPanelfrequenceAllelic;
}
public void setJPanelfrequenceAllelic(JScrollPane panelfrequenceAllelic) {
jPanelfrequenceAllelic = panelfrequenceAllelic;
int i = 0;
if (i == 0) {
panelPrincipal.add("East", jPanelfrequenceAllelic);
i++;
}
panelPrincipal.repaint();
repaint();
pack();
}
public JScrollPane getJPanelIndividualAllelicResult() {
return jPanelIndividualAllelicResult;
}
public void setJPanelIndividualAllelicResult(
JScrollPane panelIndividualAllelicResult) {
jPanelIndividualAllelicResult = panelIndividualAllelicResult;
panelPrincipal.add("West", jPanelIndividualAllelicResult);
panelPrincipal.repaint();
pack();
}
} |
Partager