コード例 #1
0
 public void itemStateChanged(ItemEvent evt) {
   if (evt.getSource() instanceof JOAJRadioButton) {
     JOAJRadioButton rb = (JOAJRadioButton) evt.getSource();
     if (rb == b1 && evt.getStateChange() == ItemEvent.SELECTED) {
       mOffset = JOAConstants.PROFSEQUENCE;
       setXRangeToSequence();
     } else if (rb == b2 && evt.getStateChange() == ItemEvent.SELECTED) {
       mOffset = JOAConstants.PROFDISTANCE;
       setXRangeToDistance();
     } else if (rb == b3 && evt.getStateChange() == ItemEvent.SELECTED) {
       mOffset = JOAConstants.PROFTIME;
       setXRangeToTime();
     }
   } else if (evt.getSource() instanceof JOAJCheckBox) {
   } else if (evt.getSource() instanceof JOAJComboBox) {
     JOAJComboBox cb = (JOAJComboBox) evt.getSource();
     if (cb == presetColorSchemes) {
       int colorScheme = cb.getSelectedIndex();
       if (colorScheme == 0) {
         // default bg
         plotBg.setColor(JOAConstants.DEFAULT_CONTENTS_COLOR);
         axesColor.setColor(Color.black);
       } else if (colorScheme == 1) {
         // white bg
         plotBg.setColor(Color.white);
         axesColor.setColor(Color.black);
       } else {
         // color bg
         plotBg.setColor(Color.black);
         axesColor.setColor(Color.white);
       }
     } else if (cb == mSymbolPopup) {
       mCurrSymbol = cb.getSelectedIndex() + 1;
     }
   }
   generatePlotName();
 }
コード例 #2
0
 public void itemStateChanged(ItemEvent e) {
   Object obj = e.getSource();
   if (obj == choice) {
     graph.newStat = true;
     if (choice.getSelectedItem().equals("Show Sequences")) {
       if (graph.originX * graph.originX + graph.originY * graph.originY < 9) {
         graph.originX = 40.0;
         graph.originY = 2 * Math.PI;
         graph.setZoom(15);
       }
     } else {
       if (graph.originX * graph.originX + graph.originY * graph.originY > 9) {
         graph.originX = 0.0;
         graph.originY = 0.0;
         graph.setZoom(11);
       }
     }
     graph.repaint();
   }
 }
コード例 #3
0
 // Implementation of stateChanged
 public void itemStateChanged(ItemEvent e) {
   if (e.getSource() == allfieldcheckbox) {
     update();
   }
 }
コード例 #4
0
ファイル: CopyWindow.java プロジェクト: schneehund/synchros
 @Override
 public void itemStateChanged(ItemEvent e) {
   if (e.getSource() instanceof JRadioButton) checkUeberSchreib();
 }