Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ModuleCell.java

00001 /*
00002  * ModuleCell.java
00003  *
00004  * Created on 18 June 2003, 13:57
00005  */
00006 
00007 package DisplayGUI;
00008 import java.awt.Polygon;
00009 
00014 public class ModuleCell extends Polygon {
00015     
00016     
00017     private int MUR,modulePosition,sctComponent,row;
00018     private String serialNo;
00019     private int moduleGroup;
00020     private Double data;
00021     private java.awt.Color color;
00022 //    boolean selected;
00023     
00025     public ModuleCell(String serialNo, int sctComponent,  int row, int modulePosition,int MUR, int moduleGroup, int[] xPoints, int[] yPoints, int nPoints) {
00026         super(xPoints,yPoints,nPoints);
00027         this.serialNo=serialNo;
00028         this.modulePosition=modulePosition;
00029         this.MUR=MUR;
00030         this.sctComponent=sctComponent;
00031         this.row=row;
00032         this.moduleGroup=moduleGroup;
00033         data=null;
00034         color = java.awt.Color.white;
00035 //        selected=false;
00036     }
00037 
00038 //   public void setSelected(boolean selected) {
00039 //        this.selected=selected;
00040 //        }
00041 
00042     public void setData(Double value, java.awt.Color color) {
00043         this.data=value;
00044         this.color=color;
00045         }
00046     public Double getData() {
00047         return data;
00048         }
00049     public java.awt.Color getColor() {
00050         return color;
00051         }
00052 
00053     public String getSerialNo() {
00054         return serialNo;
00055     }
00056     public int getMUR() {
00057         return MUR;
00058     }
00059     public int getModulePosition() {
00060         return modulePosition;
00061     }
00062     public String getEndCapPosition() {
00063 //    CHANGED BY PJD & JV 15/02/05
00064 //    Added 1 to the modulePosition so now we count from 1 to 13
00065         if(modulePosition<13) return "O"+Integer.toString(modulePosition+1);
00066         else if(modulePosition>=13 && modulePosition<23) return "M"+Integer.toString(modulePosition-12);
00067         else return "I"+Integer.toString(modulePosition-22);
00068         }
00069     public void setModuleGroup(int group) {
00070         moduleGroup=group;
00071     }
00072     public int getModuleGroup() {
00073         return moduleGroup;
00074     }
00075     public boolean isSelected() {
00076         return (moduleGroup>=0);
00077     }
00078     public int getSctComponent() {
00079         return sctComponent;
00080         }
00081     public int getRow() {
00082         // this is the quadrant number for an endcap disk
00083         return row;
00084         }
00085     public String getQuadrant() {
00086         switch(row) {
00087            case 0:
00088               return "TR";
00089            case 1:
00090               return "BR";
00091            case 2:
00092               return "BL";
00093            case 3:
00094            default:
00095               return "TL";
00096            }
00097         }
00098     public int getPosition() {
00099         return modulePosition;
00100         }      
00101 }

Generated on Fri Sep 16 18:05:58 2005 for SCT DAQ/DCS Software - Java by doxygen 1.3.5