コード例 #1
0
ファイル: DsInConfigPanel.java プロジェクト: marcora/biomart
 private void initGui() {
   this.setLayout(new GridBagLayout());
   this.setBorder(
       new TitledBorder(new EtchedBorder(), dsElement.getAttributeValue(Resources.get("NAME"))));
   // find all partition tables in this dataset
   List<Element> ptList = dsElement.getChildren(Resources.get("PARTITIONTABLE"));
   for (Element ptElement : ptList) {
     List<ArrayList<String>> ptTable = JDomUtils.ptElement2Table(ptElement);
     ptTableMap.put(ptElement.getAttributeValue(Resources.get("NAME")), ptTable);
     // default 0
     ptCurrentIndex.put(ptElement.getAttributeValue(Resources.get("NAME")), 0);
   }
   // find the one has the same user and gui
   HashMap<String, String> conditions = new HashMap<String, String>();
   List<Element> myContainers =
       JDomUtils.findChildElements(dsElement, Resources.get("CONTAINER"), conditions);
   Set<String> ftSet = this.getFlattenPTableName();
   GridBagConstraints c = new GridBagConstraints();
   c.gridy = 0;
   c.gridx = 0;
   c.anchor = GridBagConstraints.FIRST_LINE_START;
   for (Element container : myContainers) {
     if (JDomUtils.isElementHiden(container)) continue;
     // if container is empty, don't add it
     if (!this.isContainerEmpty(container)) {
       this.add(createContainerPanel(container, dsElement, ftSet, false), c);
       c.gridx = c.gridx + 1;
     }
   }
 }