コード例 #1
0
ファイル: RelPanel.java プロジェクト: gotheforest/pdtb
 public void actionPerformed(ActionEvent e) {
   SpanButton b = (SpanButton) e.getSource();
   /**
    * For the Implicit/EntRel/NoRel case where we do not have a spanlist for the conn, we do
    * not want to do anything when the button is clicked
    */
   // TODO: This is probably the place to calculate the sentence
   // position if the spanbutton is arg2
   String relType = relComponents[LABELS.rel.ordinal()].getAnnValue();
   SpanButton connSpanListButton = (SpanButton) relComponents[LABELS.connSpanList.ordinal()];
   if (relType.equals(RELTYPELABELS.Explicit.toString())
       || relType.equals(RELTYPELABELS.AltLex.toString())
       || b != connSpanListButton) {
     mainFrame.spanAction(b);
     mainFrame.inputAction((JComponent) e.getSource(), spanButtons);
   } else {
     b.setSelected(!b.isSelected());
   }
 }