Exemple #1
0
 public void syncPanel() {
   panelPat.syncPanel();
   regionAButton.setBorderPainted(dlg.panelMain.mark.getRegion() == Reg.A);
   regionBButton.setBorderPainted(dlg.panelMain.mark.getRegion() == Reg.B);
   regionCButton.setBorderPainted(dlg.panelMain.mark.getRegion() == Reg.C);
   elevBox.setText(dlg.panelMain.mark.getElevation());
   heightBox.setText(dlg.panelMain.mark.getObjectHeight());
   sourceBox.setText(dlg.panelMain.mark.getSource());
   infoBox.setText(dlg.panelMain.mark.getInfo());
   for (Sts sts : statuses.keySet()) {
     int item = statuses.get(sts);
     if (dlg.panelMain.mark.getStatus() == sts) statusBox.setSelectedIndex(item);
   }
   for (Cns cns : constructions.keySet()) {
     int item = constructions.get(cns);
     if (dlg.panelMain.mark.getConstr() == cns) constrBox.setSelectedIndex(item);
   }
   for (Con con : conspicuities.keySet()) {
     int item = conspicuities.get(con);
     if (dlg.panelMain.mark.getConsp() == con) conBox.setSelectedIndex(item);
   }
   for (Con con : reflectivities.keySet()) {
     int item = reflectivities.get(con);
     if (dlg.panelMain.mark.getRefl() == con) reflBox.setSelectedIndex(item);
   }
 }
Exemple #2
0
 private JRadioButton getRegionButton(
     JRadioButton button, int x, int y, int w, int h, String tip) {
   button.setBounds(new Rectangle(x, y, w, h));
   button.setBorder(BorderFactory.createLoweredBevelBorder());
   button.setToolTipText(Messages.getString(tip));
   button.addActionListener(alRegion);
   regionButtons.add(button);
   return button;
 }
Exemple #3
0
 public void actionPerformed(java.awt.event.ActionEvent e) {
   if (regionAButton.isSelected()) {
     dlg.panelMain.mark.setRegion(Reg.A);
     switch (dlg.panelMain.mark.getCategory()) {
       case LAM_PORT:
         dlg.panelMain.mark.setObjColour(Col.RED);
         dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
         break;
       case LAM_PPORT:
         dlg.panelMain.mark.setObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.RED);
         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
         break;
       case LAM_STBD:
         dlg.panelMain.mark.setObjColour(Col.GREEN);
         dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
         break;
       case LAM_PSTBD:
         dlg.panelMain.mark.setObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
         break;
     }
     regionAButton.setBorderPainted(true);
   } else {
     regionAButton.setBorderPainted(false);
   }
   if (regionBButton.isSelected()) {
     dlg.panelMain.mark.setRegion(Reg.B);
     switch (dlg.panelMain.mark.getCategory()) {
       case LAM_PORT:
         dlg.panelMain.mark.setObjColour(Col.GREEN);
         dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
         break;
       case LAM_PPORT:
         dlg.panelMain.mark.setObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
         break;
       case LAM_STBD:
         dlg.panelMain.mark.setObjColour(Col.RED);
         dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
         break;
       case LAM_PSTBD:
         dlg.panelMain.mark.setObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.RED);
         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
         break;
     }
     regionBButton.setBorderPainted(true);
   } else {
     regionBButton.setBorderPainted(false);
   }
   if (regionCButton.isSelected()) {
     dlg.panelMain.mark.setRegion(Reg.C);
     dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
     switch (dlg.panelMain.mark.getCategory()) {
       case LAM_PORT:
         dlg.panelMain.mark.setObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.WHITE);
         dlg.panelMain.mark.addObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.WHITE);
         break;
       case LAM_PPORT:
       case LAM_PSTBD:
         dlg.panelMain.mark.setObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.RED);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         break;
       case LAM_STBD:
         dlg.panelMain.mark.setObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.WHITE);
         dlg.panelMain.mark.addObjColour(Col.GREEN);
         dlg.panelMain.mark.addObjColour(Col.WHITE);
         break;
     }
     regionCButton.setBorderPainted(true);
   } else {
     regionCButton.setBorderPainted(false);
   }
   panelPat.syncPanel();
 }