<editor-fold defaultstate="collapsed" desc="ActionListener method">
964926
@Override
    public void actionPerformed(final ActionEvent EVENT) {
        super.actionPerformed(EVENT);

        if (EVENT.getSource().equals(LCD_BLINKING_TIMER)) {
            lcdTextVisible ^= true;
            repaint(getInnerBounds());
        }
    }
442537
public void actionPerformed(ActionEvent e)
    {
        if (e.getSource() == this)
        {
            Date dateTarget = this.getTargetDate();
            JTimePopup popup = JTimePopup.createTimePopup(this.getTimeParam(), dateTarget, this, languageString);
            popup.addPropertyChangeListener(this);
        }
    }
1220090
private void setupComponents() {
		cancelButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});

		finishButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				JOptionPane.showMessageDialog(getContentPane(), "Wizard finished!");
				dispose();
			}
		});

		cancelButton.setMnemonic(KeyEvent.VK_C);
		previousButton.setMnemonic(KeyEvent.VK_P);
		nextButton.setMnemonic(KeyEvent.VK_N);
		finishButton.setMnemonic(KeyEvent.VK_F);

		wizardPageContainer.addContainerListener(new MinimumSizeAdjuster());
	}
1195487
public void setCancelAction(Action.OnActionListener listener) {
        setCancelAction(listener, null, null, null, null);
    }
969868
public void actionPerformed(ActionEvent e) {
		JButton button = (JButton) e.getSource();
		String buttonText = button.getText();
		int day = new Integer(buttonText).intValue();
		setDay(day);
	}
775645
@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dataLabel = new java.awt.Label();
        dataInputArea = new java.awt.TextArea();
        fromFileButton = new javax.swing.JButton();
        resetButton = new javax.swing.JButton();
        cancelButton = new javax.swing.JButton();
        okButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Input Data");
        setResizable(false);

        dataLabel.setName("dataLabel"); // NOI18N
        dataLabel.setText("Data");

        dataInputArea.setName("dataField"); // NOI18N

        fromFileButton.setText("From File...");
        fromFileButton.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fromFileButtonActionPerformed(evt);
            }
        });

        resetButton.setText("Reset");
        resetButton.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resetButtonActionPerformed(evt);
            }
        });

        cancelButton.setText("Cancel");
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });

        okButton.setText("OK");
        okButton.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(dataLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(resetButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fromFileButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(okButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cancelButton))
                    .addComponent(dataInputArea, javax.swing.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(dataLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(dataInputArea, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(resetButton)
                    .addComponent(okButton)
                    .addComponent(cancelButton)
                    .addComponent(fromFileButton))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }
844780
public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        int returnValue = -1;
        if (cmd.equals("Cut") || cmd.equals("Copy") || cmd.equals("Paste")) {
            JInternalFrame f = getSelectedFrame();
            if (f != null && f instanceof ActionListener) {
                ((ActionListener)f).actionPerformed(e);
            }
        } else if (cmd.equals("Step Over")) {
            returnValue = Dim.STEP_OVER;
        } else if (cmd.equals("Step Into")) {
            returnValue = Dim.STEP_INTO;
        } else if (cmd.equals("Step Out")) {
            returnValue = Dim.STEP_OUT;
        } else if (cmd.equals("Go")) {
            returnValue = Dim.GO;
        } else if (cmd.equals("Break")) {
            dim.setBreak();
        } else if (cmd.equals("Exit")) {
            exit();
        } else if (cmd.equals("Open")) {
            String fileName = chooseFile("Select a file to compile");
            if (fileName != null) {
                String text = readFile(fileName);
                if (text != null) {
                    RunProxy proxy = new RunProxy(this, RunProxy.OPEN_FILE);
                    proxy.fileName = fileName;
                    proxy.text = text;
                    new Thread(proxy).start();
                }
            }
        } else if (cmd.equals("Load")) {
            String fileName = chooseFile("Select a file to execute");
            if (fileName != null) {
                String text = readFile(fileName);
                if (text != null) {
                    RunProxy proxy = new RunProxy(this, RunProxy.LOAD_FILE);
                    proxy.fileName = fileName;
                    proxy.text = text;
                    new Thread(proxy).start();
                }
            }
        } else if (cmd.equals("More Windows...")) {
            MoreWindows dlg = new MoreWindows(this, fileWindows,
                                              "Window", "Files");
            dlg.showDialog(this);
        } else if (cmd.equals("Console")) {
            if (console.isIcon()) {
                desk.getDesktopManager().deiconifyFrame(console);
            }
            console.show();
            desk.getDesktopManager().activateFrame(console);
            console.consoleTextArea.requestFocus();
        } else if (cmd.equals("Cut")) {
        } else if (cmd.equals("Copy")) {
        } else if (cmd.equals("Paste")) {
        } else if (cmd.equals("Go to function...")) {
            FindFunction dlg = new FindFunction(this, "Go to function",
                                                "Function");
            dlg.showDialog(this);
        } else if (cmd.equals("Go to line...")) {
            final String s = (String) JOptionPane.showInputDialog(
                    this,
                    "Line number",
                    "Go to line...",
                    JOptionPane.QUESTION_MESSAGE,
                    null,
                    null,
                    null);
            if (s == null || s.trim().length() == 0) {
                return;
            }
            try {
                final int line = Integer.parseInt(s);
                showFileWindow(null, line);
            }
            catch (final NumberFormatException nfe) {
                // ignore
            }
        } else if (cmd.equals("Tile")) {
            JInternalFrame[] frames = desk.getAllFrames();
            int count = frames.length;
            int rows, cols;
            rows = cols = (int)Math.sqrt(count);
            if (rows*cols < count) {
                cols++;
                if (rows * cols < count) {
                    rows++;
                }
            }
            Dimension size = desk.getSize();
            int w = size.width/cols;
            int h = size.height/rows;
            int x = 0;
            int y = 0;
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < cols; j++) {
                    int index = (i*cols) + j;
                    if (index >= frames.length) {
                        break;
                    }
                    JInternalFrame f = frames[index];
                    try {
                        f.setIcon(false);
                        f.setMaximum(false);
                    } catch (Exception exc) {
                    }
                    desk.getDesktopManager().setBoundsForFrame(f, x, y,
                                                               w, h);
                    x += w;
                }
                y += h;
                x = 0;
            }
        } else if (cmd.equals("Cascade")) {
            JInternalFrame[] frames = desk.getAllFrames();
            int count = frames.length;
            int x, y, w, h;
            x = y = 0;
            h = desk.getHeight();
            int d = h / count;
            if (d > 30) d = 30;
            for (int i = count -1; i >= 0; i--, x += d, y += d) {
                JInternalFrame f = frames[i];
                try {
                    f.setIcon(false);
                    f.setMaximum(false);
                } catch (Exception exc) {
                }
                Dimension dimen = f.getPreferredSize();
                w = dimen.width;
                h = dimen.height;
                desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h);
            }
        } else {
            Object obj = getFileWindow(cmd);
            if (obj != null) {
                FileWindow w = (FileWindow)obj;
                try {
                    if (w.isIcon()) {
                        w.setIcon(false);
                    }
                    w.setVisible(true);
                    w.moveToFront();
                    w.setSelected(true);
                } catch (Exception exc) {
                }
            }
        }
        if (returnValue != -1) {
            updateEnabled(false);
            dim.setReturnValue(returnValue);
        }
    }
519101
protected void _notifyActionComponentsNow()
  {
    for( Iterator iter = _mapItems.keySet().iterator(); iter.hasNext(); )
    {
      JComponent item = (JComponent)iter.next();
//      if( !item.isShowing() )
//      {
//        continue;
//      }

      Action action = (Action)item.getClientProperty( GenericAction.ACTION_PROPERTY );
      if( action == null )
      {
        if( item instanceof AbstractButton )
        {
          action = ((AbstractButton)item).getAction();
        }

        if( action == null )
        {
          continue;
        }
      }

      boolean bEnabled = action.isEnabled();

//      long lTime = System.currentTime();
//      boolean bEnabled = action.isEnabled();
//      long diff = System.currentTime() - lTime;
//      if( diff > 50 )
//      {
//        //!! Uncomment following line and set a break point there to debug poor performing isEnabled() impl.
//        //action.isEnabled();
//
//        ConditionalActionHandler cah = null;
//        if( action instanceof GenericAction )
//        {
//          cah = ((GenericAction)action).getConditionalActionHandler();
//        }
//        System.out.println( "!!!!!!!!!!!!!!!!!!!!!!!\n" +
//                            "An action.isEnabled() impl needs to be optimized.\nIt took " + diff + "ms to complete.\n" +
//                            (cah == null ? "" : "ConditionalActionHandler: " + cah.getClass().getName() + "\n") +
//                            "Debug UpdateNotifier.notifyActionComponentsNow() to find the naughty code." +
//                            "\n!!!!!!!!!!!!!!!!!!!!!!!" );
//      }

      if( item.isEnabled() != bEnabled )
      {
        item.setEnabled( bEnabled );
      }


      // Also handle "selected" state for togglable :) items

      if( action instanceof GenericAction )
      {
        boolean bSelected = ((GenericAction)action).isSelected();
        if( item instanceof JToggleButton )
        {
          JToggleButton tb = (JToggleButton)item;
          if( tb.isSelected() != bSelected )
          {
            tb.setSelected( bSelected );
          }
        }
        else if( item instanceof JCheckBoxMenuItem )
        {
          JCheckBoxMenuItem tb = (JCheckBoxMenuItem)item;
          if( tb.getState() != bSelected )
          {
            tb.setState( bSelected );
          }
        }
      }
    }
  }
1279410
@Override
    public void doAction(Action action) {
        switch (action) {
            case REMOVE:
                close();
                break;
            
            case HIDE:
                setVisible(false);
                break;
            
            case SHOW:
                setVisible(true);
                break;
            
            case COLLAPSE:
                setSize(Size.MINIMIZED);
                break;
            
            case EXPAND:
                setSize(Size.NORMAL);
                break;
            
            case TOP:
                moveToTop();
                break;
        }
    }
814548
@Override
    public void in() throws Exception {
        if (data == null) {
            throw new ComponentException("Not connected: " + toString());
        }
        Object val = data.getFieldValue();
        // fire only if there is a listener
        if (ens.shouldFire()) {
            DataflowEvent e = new DataflowEvent(ens.getController(), this, val);
////            DataflowEvent e = new DataflowEvent(ens.getController(), this, access.toObject());
            ens.fireIn(e);
//            // the value might be altered
            val = e.getValue();
        }

//        access.pass((Access) val);
        fa.setFieldValue(val);
    }
138617
protected void fireAction(ActionListener action) {
        int      modifiers    = 0;
        AWTEvent currentEvent = EventQueue.getCurrentEvent();

        if (currentEvent instanceof InputEvent) {
            modifiers = ((InputEvent) currentEvent).getModifiers();
        } else if (currentEvent instanceof ActionEvent) {
            modifiers = ((ActionEvent) currentEvent).getModifiers();
        }

        ActionEvent e = new ActionEvent(getComponent(), ActionEvent.ACTION_PERFORMED, getComponent().getText(),
                                        EventQueue.getMostRecentEventTime(), modifiers);

        action.actionPerformed(e);
    }
1205427
@Action(invokeOn = InvokeOn.OBJECT_AND_COLLECTION)
    @ActionLayout(
            describedAs = "Toggle, for testing (direct) bulk actions"
    )
    public void toggleForBulkActions() {
        boolean flag = getFlag() != null? getFlag(): false;
        setFlag(!flag);
    }
975079
@Nullable
    public Object onActionPressed() {
        View existingForm = getChildAt(getChildCount() == 1 ? 0 : 2);
        if (existingForm != null) {
            FormView form = (FormView) existingForm;
            return form.submitForm();
        }
        return null;
    }
348034
public static ActionListener getListener(BaseComponent component, String eventName) {
        return (ActionListener) component.getAttribute(ActionListener.getAttrName(eventName));
    }
822688
public void actionPerformed(ActionEvent ev) {

        String s = ev.getActionCommand();

        //  System.out.println("Action performed " + s);
        if (s.equals("ConnectOk")) {
            finishCreate();
        } else if (s.equals("ConnectCancel")) {
            dispose();
        }
    }
1101079
public static void unbindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
        if (actionListeners != null) {
            for (ActionListener listener : actionListeners) {
                listener.unbind(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;
    }