<editor-fold defaultstate="collapsed" desc="ActionListener">
195918
@Override
    public void actionPerformed(java.awt.event.ActionEvent event) {
        if (event.getSource().equals(CLOCK_TIMER)) {
            // Seconds
            secondPointerAngle = java.util.Calendar.getInstance().get(java.util.Calendar.SECOND) * ANGLE_STEP + java.util.Calendar.getInstance().get(java.util.Calendar.MILLISECOND) * ANGLE_STEP / 1000;

            // Hours
            hour = java.util.Calendar.getInstance().get(java.util.Calendar.HOUR) - this.timeZoneOffsetHour;
            if (hour > 12) {
                hour -= 12;
            }
            if (hour < 0) {
                hour += 12;
            }

            // Minutes
            minute = java.util.Calendar.getInstance().get(java.util.Calendar.MINUTE) + this.timeZoneOffsetMinute;
            if (minute > 60) {
                minute -= 60;
                hour++;
            }
            if (minute < 0) {
                minute += 60;
                hour--;
            }

            // Calculate angles from current hour and minute values
            hourPointerAngle = hour * ANGLE_STEP * 5 + (0.5) * minute;
            minutePointerAngle = minute * ANGLE_STEP;

            repaint(getInnerBounds());
        }
    }
571809
public static void bindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
        if (actionListeners != null) {
            for (ActionListener actionListener : actionListeners) {
                actionListener.bind(target);
            }
        }
    }
928320
@Nullable
    public Object onActionPressed() {
        View existingForm = getExistingForm();
        if (existingForm == null) {
            return null;
        }

        FormView form = (FormView) existingForm;
        Object ev = form.submitForm();
        if (ev == null || lockWidget.getConfiguration().getExtraSignUpFields().size() <= SignUpFormView.MAX_FEW_CUSTOM_FIELDS) {
            return ev;
        } else if (existingForm == signUpForm) {
            //User has configured some extra SignUp custom fields.
            DatabaseSignUpEvent event = (DatabaseSignUpEvent) ev;
            showCustomFieldsForm(event);
            return null;
        }
        return ev;
    }
5802
private void initializeLandscapeListListener() {
    instructionLayoutText.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View instructionLayoutText) {
        boolean instructionsVisible = instructionListLayout.getVisibility() == VISIBLE;
        if (!instructionsVisible) {
          showInstructionList();
        } else {
          hideInstructionList();
        }
      }
    });
  }
795193
@Override
	public void actionPerformed(ActionEvent event) {

		Object mysource = event.getSource();

		if ( ! (mysource instanceof JComboBox )) {
			super.actionPerformed(event);
			return;
		}

		@SuppressWarnings("unchecked")
		JComboBox<String> source = (JComboBox<String>) event.getSource();
		String value = source.getSelectedItem().toString();
		evalString("save selection; ");

		String selectLigand = "select ligand;wireframe 0.16;spacefill 0.5; color cpk ;";

		if ( value.equals("Cartoon")){
			String script = "hide null; select all;  spacefill off; wireframe off; backbone off;" +
					" cartoon on; " +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if (value.equals("Backbone")){
			String script = "hide null; select all; spacefill off; wireframe off; backbone 0.4;" +
					" cartoon off; " +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if (value.equals("CPK")){
			String script = "hide null; select all; spacefill off; wireframe off; backbone off;" +
					" cartoon off; cpk on;" +
					" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);

		} else if (value.equals("Ligands")){
			this.executeCmd("restrict ligand; cartoon off; wireframe on;  display selected;");
		} else if (value.equals("Ligands and Pocket")){
			this.executeCmd(" select within (6.0,ligand); cartoon off; wireframe on; backbone off; display selected; ");
		} else if ( value.equals("Ball and Stick")){
			String script = "hide null; restrict not water;  wireframe 0.2; spacefill 25%;" +
					" cartoon off; backbone off; " +
					" select ligand; wireframe 0.16; spacefill 0.5; color cpk; " +
					" select *.FE; spacefill 0.7; color cpk ; " +
					" select *.CU; spacefill 0.7; color cpk ; " +
					" select *.ZN; spacefill 0.7; color cpk ; " +
					" select all; ";
			this.executeCmd(script);
		} else if ( value.equals("By Chain")){
			jmolColorByChain();
			String script = "hide null; select all;set defaultColors Jmol; color_by_chain(\"cartoon\"); color_by_chain(\"\"); " + selectLigand + "; select all; ";
			this.executeCmd(script);
		} else if ( value.equals("Rainbow")) {
			this.executeCmd("hide null; select all; set defaultColors Jmol; color group; color cartoon group; " + selectLigand + "; select all; " );
		} else if ( value.equals("Secondary Structure")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color structure; color cartoon structure;" + selectLigand + "; select all; " );

		} else if ( value.equals("By Element")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color cpk; color cartoon cpk; " + selectLigand + "; select all; ");
		} else if ( value.equals("By Amino Acid")){
			this.executeCmd("hide null; select all; set defaultColors Jmol; color amino; color cartoon amino; " + selectLigand + "; select all; " );
		} else if ( value.equals("Hydrophobicity") ){
			this.executeCmd("hide null; set defaultColors Jmol; select hydrophobic; color red; color cartoon red; select not hydrophobic ; color blue ; color cartoon blue; "+ selectLigand+"; select all; ");
		} else if ( value.equals("Suggest Domains")){
			colorByPDP();
		} else if ( value.equals("Show SCOP Domains")){
			colorBySCOP();
		}
		evalString("restore selection; ");
	}
1203462
private void closeCurrent() {
	if (components.size() > 0) {
	  Component component = components.remove(components.size() - 1);
	  getModalPanel().removeAll();
	  fireCloseActionListener(listeners.get(component));
	  listeners.remove(component);

	  if (components.size() > 0) {
		showNextComponent();
	  } else {
		restoreRootPane();
	  }
	}
  }
1052191
public void actionPerformed(ActionEvent e)
    {
        if ((m_button != null) && (e.getSource() == m_button))
        {
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup((Date)this.getControlValue(), m_button);
            popup.addPropertyChangeListener(this);
        }
        else if ((m_buttonTime != null) && (e.getSource() == m_buttonTime))
        {
            JTimePopup popup = JTimePopup.createTimePopup((Date)this.getControlValue(), m_buttonTime);
            popup.addPropertyChangeListener(this);
        }
    }
1127697
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
    {
        new Thread()
        {
            public void run()
            {
                final java.sql.Connection conn = new JDlgDBConnection(containingFrame, false).showAndReturnConnection();
                if (conn != null)
                {
                    javax.swing.SwingUtilities.invokeLater(new Runnable()
                    {
                        public void run()
                        {
                            JIFrmDatabase frm = new JIFrmDatabase(conn);
                            containingFrame.getContentPane().add(frm);
                            frm.setVisible(true);
                        }
                    });
                }
            }
        }.start();
    }
51497
@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTextPane1 = new javax.swing.JTextPane();
        _bar = new javax.swing.JToolBar();
        _update = new javax.swing.JButton();
        _del = new javax.swing.JButton();
        _save = new javax.swing.JButton();

        jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        jScrollPane1.setViewportView(jTextPane1);

        _bar.setFloatable(false);
        _bar.setOrientation(1);
        _bar.setRollover(true);

        _update.setText("Update");
        _update.setToolTipText("Remove R object");
        _update.setFocusable(false);
        _update.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        _update.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        _update.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                _updateActionPerformed(evt);
            }
        });
        _bar.add(_update);

        _del.setText("Clear");
        _del.setToolTipText("Remove R object");
        _del.setFocusable(false);
        _del.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        _del.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        _del.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                _delActionPerformed(evt);
            }
        });
        _bar.add(_del);

        _save.setText("Save");
        _save.setToolTipText("Remove R object");
        _save.setFocusable(false);
        _save.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        _save.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        _save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                _saveActionPerformed(evt);
            }
        });
        _bar.add(_save);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(_bar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
            .addComponent(_bar, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
        );
    }
1164139
@Override
    public void actionPerformed(final ActionEvent EVENT) {
        if (EVENT.getSource().equals(LED_BLINKING_TIMER)) {
            currentLedImage.flush();
            currentLedImage = ledOn == true ? getLedImageOn() : getLedImageOff();
            ledOn ^= true;
            repaint((int) (getInnerBounds().width * getLedPosition().getX() + getInnerBounds().x), (int) (getInnerBounds().height * getLedPosition().getY() + getInnerBounds().y), currentLedImage.getWidth(), currentLedImage.getHeight());
        } else if (EVENT.getSource().equals(USER_LED_BLINKING_TIMER)) {
            currentUserLedImage.flush();
            currentUserLedImage = userLedOn == true ? getUserLedImageOn() : getUserLedImageOff();
            userLedOn ^= true;
            repaint((int) (getInnerBounds().width * getUserLedPosition().getX() + getInnerBounds().x), (int) (getInnerBounds().height * getUserLedPosition().getY() + getInnerBounds().y), currentUserLedImage.getWidth(), currentUserLedImage.getHeight());
        } else if (EVENT.getSource().equals(PEAK_TIMER)) {
            setPeakValueVisible(false);
            PEAK_TIMER.stop();
        } else if (EVENT.getSource().equals(GLOW_PULSE)) {
            glowAlphaCounter += glowAlphaIncrement;
            glowAlpha = (float) Math.cos(glowAlphaCounter);
            if (Float.compare(glowAlpha, 1.0f) >= 0) {
                glowAlpha = 1.0f;
                glowAlphaIncrement = -0.0785398164;
            }
            if (Float.compare(glowAlpha, 0.2f) <= 0) {
                glowAlpha = 0f;
                glowAlphaIncrement = 0.0785398164;
            }
            repaint(getInnerBounds());
        }
    }
1184324
public void actionPerformed(ActionEvent e) {
        if(e.getSource() instanceof JButton){
            if(e.getActionCommand().equals("csv export")){
                BaseFileChooser fileChooser = new BaseFileChooser();
                fileChooser.setAcceptAllFileFilterUsed(true);
                fileChooser.addChoosableFileFilter(new FileExtensionFilter("csv"));
                if(exportFile!=null)
                    fileChooser.setSelectedFile(new File(exportFile));
                if (fileChooser.showSaveDialog(this) == BaseFileChooser.APPROVE_OPTION) {
                    exportFile = fileChooser.getSelectedFile().getPath();
                    visualizer.exportCSV(exportFile);
                }
            }
            if(e.getActionCommand().equals("weka export")){
                visualizer.weka();
            }
        }
    }
1316207
private void setClickListener() {

        m_ok.addClickListener(new Button.ClickListener() {

            private static final long serialVersionUID = 6621475980210242125L;

            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {

                try {
                    CmsResourceFilter filter = getType() == null
                    ? CmsResourceFilter.ALL
                    : CmsResourceFilter.requireType(getType());
                    results.addResult(
                        new CmsResourceTypeStatResult(
                            getType(),
                            (String)m_siteSelect.getValue(),
                            getCmsObject().readResources("/", filter, true).size()));
                    m_results.setVisible(true);
                    results.setVerticalLayout(m_resLayout, false);
                } catch (CmsException e) {
                    LOG.error("Unable to read resource tree", e);
                }
            }
        });
    }
839239
@Override
    public void actionPerformed(ActionEvent event) {
        if (event.getSource().equals(LED_BLINKING_TIMER)) {
            currentLedImage = ledOn == true ? getLedImageOn() : getLedImageOff();
            ledOn ^= true;

            repaint();
        }
    }
574581
@Override
    public void actionPerformed(ActionEvent e) {
        int row = table.convertRowIndexToModel(table.getEditingRow());
        fireEditingStopped();

        //  Invoke the Action
        ActionEvent event = new ActionEvent(
                table,
                ActionEvent.ACTION_PERFORMED,
                Integer.toString(row));
        action.actionPerformed(event);
    }
1114218
public void actionPerformed(ActionEvent ev) {

        if (ev.getSource() instanceof TextField) {
            saveTable();

            return;
        }

        String   s = ev.getActionCommand();
        MenuItem i = new MenuItem();

        if (s == null) {
            if (ev.getSource() instanceof MenuItem) {
                i = (MenuItem) ev.getSource();
                s = i.getLabel();
            }
        }

        if (s == null) {}

        if (s.equals("Start Transfer") || s.equals("ReStart Transfer")) {
            bStart.setLabel("ReStart Transfer");
            bStart.invalidate();

            CurrentTransfer = 0;
            CurrentAlter    = 0;

            transfer();
        } else if (s.equals("Continue Transfer")) {
            transfer();
        } else if (s.equals("Start Dump") || s.equals("Start Restore")) {
            CurrentTransfer = 0;
            CurrentAlter    = 0;

            transfer();
        } else if (s.equals("Quit")) {
            exit();
        } else if (s.indexOf("Select Schema") >= 0) {
            String[] selection = lTable.getSelectedItems();

            if ((selection == null) || (selection.length == 0)) {
                return;
            }

            if (iSelectionStep == Transfer.SELECT_SOURCE_SCHEMA) {
                sSourceSchemas = selection;
            } else {
                sDestSchema = selection[0];
            }

            if (iTransferMode == TRFM_DUMP) {
                iSelectionStep = Transfer.SELECT_SOURCE_TABLES;
            } else {
                iSelectionStep++;
            }

            ProcessNextStep();
        } else if (s.indexOf("Select Catalog") >= 0) {
            String selection = lTable.getSelectedItem();

            if ((selection == null) || (selection.equals(""))) {
                return;
            }

            if (iSelectionStep == Transfer.SELECT_SOURCE_CATALOG) {
                sSourceCatalog = selection;
                sSourceSchemas = null;
            } else {
                sDestCatalog = selection;
                sDestSchema  = null;

                try {
                    targetDb.setCatalog(sDestCatalog);
                } catch (Exception ex) {
                    trace("Catalog " + sDestCatalog
                          + " could not be selected in the target database");

                    sDestCatalog = null;
                }
            }

            iSelectionStep++;

            ProcessNextStep();
        } else if (s.equals("Insert 10 rows only")) {
            iMaxRows = 10;
        } else if (s.equals("Insert 1000 rows only")) {
            iMaxRows = 1000;
        } else if (s.equals("Insert all rows")) {
            iMaxRows = 0;
        } else if (s.equals("Load Settings...")) {
            FileDialog f = new FileDialog(fMain, "Load Settings",
                                          FileDialog.LOAD);

            f.show();

            String file = f.getDirectory() + f.getFile();

            if (file != null) {
                LoadPrefs(file);
                displayTable(tCurrent);
            }
        } else if (s.equals("Save Settings...")) {
            FileDialog f = new FileDialog(fMain, "Save Settings",
                                          FileDialog.SAVE);

            f.show();

            String file = f.getDirectory() + f.getFile();

            if (file != null) {
                SavePrefs(file);
            }
        } else if (s.equals("Exit")) {
            windowClosing(null);
        }
    }
170910
public void actionPerformed(ActionEvent ae) {

		Object source = ae.getSource();

		if (source == cancel_button)
			onCancel();
		else if (source == add_button || source == direct_text)
			onAdd();
		else if (source == remove_button)
			onRemove();
		else if (source == dismiss_button)
			onDismiss();
		else if (source == ok_button || source instanceof TextField)
			onOK();
	}
916255
public void actionPerformed(ActionEvent e)
    {
        if (e.getSource() == this)
        {
            Container container = this.getParent();
            if (container instanceof JCalendarDualField)
                container = container.getParent();
            if (container instanceof JTable)
            {   // Always
                JTable jtable = (JTable)container;
                int iRow = jtable.getSelectedRow();
                Object value = jtable.getValueAt(iRow, m_iColumn);
                this.setControlValue(value);    // Make sure I have the right value
            }
            //Date dateTarget = this.getTargetDate();
            
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup(this.getDateParam(), this.getTargetDate(), this, this.getLanguage());
            popup.setTransferFocus(false);
            popup.addPropertyChangeListener(this);
        }
    }