微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java.awt.event.ActionEvent的实例源码

项目:smile_1.5.0_java7    文件SammonMappingDemo.java   
@Override
public void actionPerformed(ActionEvent e) {
    if ("startButton".equals(e.getActionCommand())) {
        datasetIndex = datasetBox.getSelectedindex();

        if (dataset[datasetIndex] == null) {
            DelimitedTextParser parser = new DelimitedTextParser();
            parser.setDelimiter("[\t]+");
            parser.setRowNames(true);
            parser.setColumnNames(true);
            if (datasetIndex == 2 || datasetIndex == 3) {
                parser.setRowNames(false);
            }

            try {
                dataset[datasetIndex] = parser.parse(datasetName[datasetIndex],smile.data.parser.IoUtils.getTestDataFile(datasource[datasetIndex]));
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(null,"Failed to load dataset.","ERROR",JOptionPane.ERROR_MESSAGE);
                System.err.println(ex);
            }
        }

        Thread thread = new Thread(this);
        thread.start();
    }
}
项目:jaer    文件ControlPanel.java   
@Override
            public void actionPerformed(ActionEvent e) {
//                    System.out.println(e);
                try {
                    float x = Float.parseFloat(tfx.getText());
                    float y = Float.parseFloat(tfy.getText());
                    point.setLocation(x,y);
                    writeMethod.invoke(filter,point);
                    point = (Point2D.Float) readMethod.invoke(filter); // getString the value from the getter method to constrain it
                    set(point);
                } catch (NumberFormatException fe) {
                    tfx.selectAll();
                    tfy.selectAll();
                } catch (InvocationTargetException ite) {
                    ite.printstacktrace();
                } catch (illegalaccessexception iae) {
                    iae.printstacktrace();
                }
            }
项目:Ultraino    文件MainForm.java   
private void saveSimMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FirsT:event_saveSimMenuActionPerformed
    String file = FileUtils.selectNonExistingFile(this,".xml.gz");
    if ( file != null){
        try {
            simForm.guiToObj();
            simulation.labelNumberTransducers();
            simulation.setHoloMemory( holoPatternsForm.getHoloMemory() );

            simulation.getMaskObjects().clear();
            scene.gatherMeshEntitiesWithTag( simulation.getMaskObjects(),Entity.TAG_MASK);

            simulation.getSlices().clear();
            scene.gatherMeshEntitiesWithTag( simulation.getSlices(),Entity.TAG_SLICE);

            FileUtils.writeCompressedObject(new File(file),simulation);
        } catch (IOException ex) {
            Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE,null,ex);
        }
    }
}
项目:LivroJavaComoProgramar10Edicao    文件AddressBook.java   
private void queryButtonActionPerformed(ActionEvent e)
{
   // query that returns all contacts
   TypedQuery<Addresses> findByLastname = 
      entityManager.createNamedQuery(
         "Addresses.findByLastname",Addresses.class);

   // configure parameter for query
   findByLastname.setParameter("lastname",queryTextField.getText());
   results = findByLastname.getResultList(); // get all addresses
   numberOfEntries = results.size();

   if (numberOfEntries != 0)
   {
      currentEntryIndex = 0;
      displayRecord();
      nextButton.setEnabled(true);
      prevIoUsButton.setEnabled(true);
   } 
   else
      browseButtonActionPerformed(e);
}
项目:incubator-netbeans    文件TagManager.java   
@Override
public void actionPerformed (ActionEvent e) {
    if (e.getSource() == panel.btnRemove) {
        removeTag(getSelectedTag());
    } else if (e.getSource() == panel.btnUpdate) {
        dialog.setVisible(false);
        EventQueue.invokelater(new Runnable() {
            @Override
            public void run () {
                SystemAction.get(UpdateAction.class).update(repository,getSelectedTag().getRevisionInfo());
            }
        });
    }
}
项目:ramus    文件HTMLPrintable.java   
public void loadPage(String url,final ActionListener listener)
        throws IOException {
    this.url = url;
    pane = new JEditorPane();
    pane.setContentType("text/html");
    pane.addPropertychangelistener("page",new Propertychangelistener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            generate(0);
            if (listener != null)
                listener.actionPerformed(new ActionEvent(
                        HTMLPrintable.this,"PageLoaded"));
        }
    });
    pane.setPage(url);
}
项目:openjdk-jdk10    文件VolatileImageConfigurationTest.java   
@Override
public void actionPerformed(ActionEvent e) {
    /* Button event listener */
    String command = e.getActionCommand();

    if (command.equals("Pass")) {
        /* Test has passed. dispose the frame with success message */
        testComplete = true;
        testResult = true;
        System.out.println("Test Passed.");
    } else if (command.equals("Fail")) {
        /* Test has Failed. dispose the frame and throw exception */
        testComplete = true;
        testResult = false;
    }
}
项目:sbc-qsystem    文件FAdmin.java   
private void butDeleteSpecscedActionPerformed(
    java.awt.event.ActionEvent evt) {//GEN-FirsT:event_butDeleteSpecscedActionPerformed
    if (listSpecsced.getSelectedindex() != -1) {
        if (0 != JOptionPane
            .showConfirmDialog(this,"Do you really want remove the special schedule?","Removing",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)) {
            return;
        }
        QSpecschedule sps = (QSpecschedule) listSpecsced.getSelectedValue();
        if (sps != null) {
            final QCalendar item = (QCalendar) listCalendar.getSelectedValue();
            if (item == null) {
                return;
            }
            item.getSpecschedules().remove(sps);
            listSpecsced.setModel(new DefaultComboBoxModel(item.getSpecschedules().toArray()));
        }
    }
}
项目:rapidminer    文件ExportProcessAction.java   
@Override
public void actionPerformed(ActionEvent e) {
    File file = SwingTools.chooseFile(rapidminerGUI.getMainFrame(),"export_process",false,new String[] {
            rapidminer.PROCESS_FILE_EXTENSION,"xml" },new String[] { "Process File","Process File" });
    if (file == null) {
        return;
    }
    try {
        new FileProcessLocation(file).store(rapidminerGUI.getMainFrame().getProcess(),null);
    } catch (IOException e1) {
        SwingTools.showSimpleErrorMessage("cannot_save_process",e1,rapidminerGUI.getMainFrame().getProcess()
                .getProcessLocation(),e1.getMessage());
    }
}
项目:Neukoelln_SER316    文件TagSearchController.java   
public static void searchByTag_actionPerformed(ActionEvent e) {
    TagSearchController sc = new TagSearchController(App.getFrame(),Local.getString("Search By Tag"));

    Dimension frmSize = App.getFrame().getSize();
       Point loc = App.getFrame().getLocation();
       sc.setLocation((frmSize.width) / 3 + loc.x,(frmSize.height) / 3 + loc.y);
       sc.setVisible(true);
       if (sc.CANCELLED)
           return;
}
项目:rapidminer    文件SimplePlotterPanelDialog.java   
public SimplePlotterPanelDialog(Frame owner,final DataTable dataTable,int width,int height,boolean modal) {
    super(owner,dataTable.getName(),modal);
    setDefaultCloSEOperation(disPOSE_ON_CLOSE);
    PlotterPanel plotterPanel = new PlotterPanel(dataTable,PlotterConfigurationModel.DATA_SET_PLottER_SELECTION);
    getContentPane().add(plotterPanel,BorderLayout.CENTER);

    JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    JButton okButton = new JButton("Ok");
    okButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            ok();
        }
    });
    buttonPanel.add(okButton);

    getContentPane().add(buttonPanel,BorderLayout.soUTH);

    if ((width < 0) || (height < 0)) {
        setSize(600,400);
    } else {
        setSize(width,height);
    }
    setLocationRelativeto(owner);
}
项目:incubator-netbeans    文件RunJarPanel.java   
private void customizeOptionsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FirsT:event_customizeOptionsButtonActionPerformed
    String origin = txtVMOptions.getText();
    try {
        String result = ProjectUISupport.showVMOptionCustomizer(SwingUtilities.getwindowAncestor(this),origin);
        result = splitJVMParams(result,true);
        txtVMOptions.setText(result);
    } catch (Exception e) {
        Logger.getLogger(RunJarPanel.class.getName()).log(Level.WARNING,"Cannot parse vm options.",e); // NOI18N
    }
}
项目:Cognizant-Intelligent-Test-Scripter    文件TestDataComponent.java   
private Action onTestDataRenameAction() {
    return new AbstractAction() {
        @Override
        public void actionPerformed(ActionEvent ae) {
            String newName = getValue("newValue").toString();
            Boolean returnVal = false;
            if (Validator.isValidName(newName)) {
                TestDataTablePanel panel = getSelectedData();
                if (panel != null) {
                    returnVal = panel.rename(getValue("newValue").toString());
                }
            }
            putValue("rename",returnVal);
        }
    };
}
项目:incubator-netbeans    文件ResourceWizardPanel.java   
private void addAllButtonActionPerformed(ActionEvent evt) {
    DataObject resource = selectResource();

    if (resource == null) {
        return;
    }

    // Feed data.
    for (int i = 0; i < resourcesTable.getRowCount(); i++) {
        DataObject dataObject = (DataObject) resourcesTable.getValueAt(i,0);

        sourceMap.put(dataObject,new SourceData(resource));

        tableModel.fireTableCellUpdated(i,1);
    }

    descPanel.fireStateChanged();
}
项目:SER316-Dresden    文件TaskPanel.java   
void parentTask_actionPerformed(ActionEvent e) {
//        String taskId = taskTable.getModel().getValueAt(taskTable.getSelectedRow(),TaskTable.TASK_ID).toString();
//      
//        Task t = CurrentProject.getTaskList().getTask(taskId);
        /*XXX Task t2 = CurrentProject.getTaskList().getTask(taskTable.getCurrentRoottask());

        String parentTaskId = t2.getParent();
        if((parentTaskId == null) || (parentTaskId.equals(""))) {
            parentTaskId = null;
        }
        taskTable.setCurrentRoottask(parentTaskId); 
        taskTable.tableChanged();*/

//      parentPanel.updateIndicators();
//      //taskTable.updateUI();
  }
项目:incubator-netbeans    文件AsynchronousTest.java   
public void testExecutionCanBeForcedToBeSynchronous() throws Exception {
    DoesOverrideAndReturnsTrue action = (DoesOverrideAndReturnsTrue)DoesOverrideAndReturnsTrue.get(DoesOverrideAndReturnsTrue.class);

    synchronized (action) {
        action.actionPerformed(new ActionEvent(this,"waitFinished"));
        assertTrue("When asked for synchronous the action is finished immediatelly",action.finished);
    }

    if (err.toString().indexOf(DoesOverrideAndReturnsTrue.class.getName()) >= 0) {
        fail("No warning about the class: " + err);
    }
}
项目:CodeGenerate    文件ErrorDialog.java   
public ErrorDialog(String errorInfo) {
    setContentPane(contentPane);
    setTitle("Error Info");
    getRootPane().setDefaultButton(okButton);
    this.setAlwaysOnTop(true);
    editTP.setText(errorInfo);
    okButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            dispose();
        }
    });
    editTP.setCaretPosition(0);

}
项目:Equella    文件InheritedEditorPanel.java   
@Override
public void actionPerformed(ActionEvent e)
{
    if( e.getSource() == showAll )
    {
        GlassSwingWorker<JComponent> worker = new GlassSwingWorker<JComponent>()
        {
            @Override
            public JComponent construct() throws Exception
            {
                return new OverrideDefaultAclViewer(aclManager,userService,domainObj,privilege);
            }

            @Override
            public void finished()
            {
                showAll.setEnabled(false);

                InheritedEditorPanel.this.add(get(),BorderLayout.CENTER);
                InheritedEditorPanel.this.updateUI();
            }

            @Override
            public void exception()
            {
                getException().printstacktrace();
            }
        };
        worker.setComponent(this);
        worker.start();
    }
}
项目:sbc-qsystem    文件FWelcome.java   
private void buttonAdvanceActionPerformed(
    java.awt.event.ActionEvent evt) {//GEN-FirsT:event_buttonAdvanceActionPerformed
    setAdvanceRegim(!isAdvanceRegim());
    if (isMed && !isAdvanceRegim()) {
        showMed();
    }
    showButtons(root,panelMain);
}
项目:rapidminer    文件AttributeFileValueCellEditor.java   
public AttributeFileValueCellEditor(ParameterTypeAttributeFile type) {
    super(type);
    JButton button = new JButton(new ResourceAction(true,"edit_attributefile") {

        private static final long serialVersionUID = 1L;

        @Override
        public void actionPerformed(ActionEvent e) {
            buttonpressed();
        }
    });
    button.setMargin(new Insets(0,0));
    button.setToolTipText("Edit or create attribute description files and data (XML).");
    addButton(button,GridBagConstraints.RELATIVE);

    addButton(createFileChooserButton(),GridBagConstraints.REMAINDER);
}
项目:cuttlefish    文件TikzDialog.java   
private void exportButtonActionPerformed(java.awt.event.ActionEvent evt) {
    tikzExporter.setFixedSize(sizefixedRButton.isSelected());

    if(sizefixedRButton.isSelected()) {
        int width,height;
        width = Integer.parseInt(widthTextField.getText());
        height = Integer.parseInt(heightTextField.getText());
        tikzExporter.setSize(width,height);

    } else if(sizeScaledRButton.isSelected()) {
        double node,edge,coord;
        node = Double.parseDouble(nodeTextField.getText());
        edge = Double.parseDouble(edgeTextField.getText());
        coord = Double.parseDouble(coordTextField.getText());
        tikzExporter.setScalingFactors(node,coord);

    } else if(sizeDefaultRButton.isSelected()) {
        // Select default scaling factors
        tikzExporter.setDefaultFactors();
        getScalingFactors();
        calculateHeightAndWidth();

    }

    if(style3DRButton.isSelected()) {
        tikzExporter.setNodeStyle("ball");
    } else {
        tikzExporter.setNodeStyle("circle");
    }

    tikzExporter.setoutputFile(new File(fileTextField.getText()));
    tikzExporter.exportToTikz(networkPanel.getNetworkLayout());
    this.setVisible(false);
}
项目:Hotel-Properties-Management-System    文件NewReservationWindow.java   
private ActionListener privateItemListener() {
    ActionListener listener = new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            final String roomNumber = roomNumCmbBox.getSelectedItem().toString();
            if(!roomNumber.isEmpty()) {
                Room theRoom = roomDaoImpl.getRoomByRoomNumber(roomNumber);
                roomTypeCmbBox.setSelectedItem(theRoom.getType());
                priceField.setValue(theRoom.getPrice());
                currencyCmbBox.setSelectedItem(theRoom.getCurrency());
            }
            repaint();

        }
    };
    return listener;
}
项目:Dahlem_SER316    文件HTMLEditor.java   
public void jAlignActionB_actionPerformed(ActionEvent e) {
    HTMLEditorKit.AlignmentAction aa =
        new HTMLEditorKit.AlignmentAction(
            "justifyAlign",StyleConstants.ALIGN_JUSTIFIED);
    aa.actionPerformed(e);
}
项目:incubator-netbeans    文件JFXDeploymentPanel.java   
private void buttonCustomJSMessageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FirsT:event_buttonCustomJSMessageActionPerformed
    final JFXJavaScriptCallbacksPanel rc = new JFXJavaScriptCallbacksPanel(jfxProps);
    final DialogDescriptor dd = new DialogDescriptor(rc,NbBundle.getMessage(JFXDeploymentPanel.class,"TXT_JSCallbacks"),// NOI18N
            true,DialogDescriptor.OK_CANCEL_OPTION,DialogDescriptor.OK_OPTION,null);
    if (Dialogdisplayer.getDefault().notify(dd) == DialogDescriptor.OK_OPTION) {
        jfxProps.setJSCallbacks(rc.getResources());
        jfxProps.setJSCallbacksChanged(true);
        refreshCustomJSLabel();
    }
}
项目:incubator-netbeans    文件PanelOptionsVisual.java   
private void cbSharableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FirsT:event_cbSharableActionPerformed
        txtLibFolder.setEnabled(cbSharable.isSelected());
        btnLibFolder.setEnabled(cbSharable.isSelected());
        lblHint.setEnabled(cbSharable.isSelected());
        lblLibFolder.setEnabled(cbSharable.isSelected());
        if (cbSharable.isSelected()) {
            txtLibFolder.setText(currentLibrariesLocation);
        } else {
            txtLibFolder.setText(""); //NOi18N
        }
}
项目:SER316-Ingolstadt    文件HTMLEditor.java   
public void actionPerformed(ActionEvent e){
    JEditorPane editor = getEditor(e);
    if (editor != null) {
        javax.swing.text.DefaultHighlighter.DefaultHighlightPainter highlightPainter =
                   new javax.swing.text.DefaultHighlighter.DefaultHighlightPainter(Color.YELLOW);
        //editor.getHighlighter().addHighlight(p0,p1,highlightPainter);
    }
}
项目:incubator-netbeans    文件TreeModelNode.java   
@Override
public Action getPreferredAction () {
    return new AbstractAction () {
        public void actionPerformed (ActionEvent e) {
            try {
                model.performDefaultAction (object);
            } catch (UnkNownTypeException ex) {
                // NodeActionsprovider is voluntary
            }
        }
    };
}
项目:JITRAX    文件ListeneRSSetter.java   
@Override
public void actionPerformed(ActionEvent e) {
    if (e.getSource() == getMainWindow().getBarMenu().getRaCodeHighLighting()) {
        if (((JCheckBoxMenuItem) e.getSource()).isSelected()) {
            getMainWindow().getWorkspace().enableSyntaxEditingRaEditor();
        } else {
            getMainWindow().getWorkspace().disableSyntaxEditingRaEditor();
        }
    }

    else if (e.getSource() == getMainWindow().getBarMenu().getsqlCodeHighLighting()) {
        if (((JCheckBoxMenuItem) e.getSource()).isSelected()) {
            getMainWindow().getWorkspace().enableSyntaxEditingsqlEditor();
        } else {
            getMainWindow().getWorkspace().disableSyntaxEditingsqlEditor();
        }
    }
}
项目:AgentWorkbench    文件ThreadMonitorProtocolTableTab.java   
@Override
public void actionPerformed(ActionEvent ae) {

    @SuppressWarnings("unchecked")
    tablerowsorter<TableModel>sorter = (tablerowsorter<TableModel>) getJTableThreadProtocolVector().getRowSorter();

    if (ae.getSource()==this.getJRadioButtonNoFilter()) {
        // --- Remove Filter ----------------
        sorter.setRowFilter(null);

    } else if (ae.getSource()==this.getJRadioButtonFilteragents()) {
        // --- Set Filter -------------------       
        RowFilter<Object,Object> agentFilter = new RowFilter<Object,Object>() {

              public boolean include(Entry<? extends Object,? extends Object> entry) {

                  // --- get column with ThreadDetail-Instance (ThreadName) ---
                  if(entry.getValue(1) instanceof ThreadDetail) {
                      ThreadDetail tt = (ThreadDetail)entry.getValue(1);    
                      if(tt.isAgent() == true) {
                          return true;
                      }
                  }
                  return false;
             }
        };
        sorter.setRowFilter(agentFilter);
    }
}
项目:etomica    文件UnitGraphics.java   
public void actionPerformed(ActionEvent e) {

            /*
             * Create a string containing the current action command and display
             * it in the top panel's label.
             */
            String actionCommand = e.getActionCommand();
            label.setText("Action: " + actionCommand);

            if (actionCommand.equals("comboBoxChanged") && (switching == false)) {
                comboWasChanged(e);
            }

            if (actionCommand.equals("<") || actionCommand.equals(">")) {
                unitButtonpressed(e);
                checkUnitvstarget(targetDimension);
            }
            if (actionCommand.equals("^") || actionCommand.equals("v")) {
                exponentButtonpressed(e);
                checkUnitvstarget(targetDimension);
            }

            if (actionCommand.equals("Submit")) {
                int usize = unitsvector.size();
                Unit[] allUnits = new Unit[usize];
                double[] allExponents = new double[usize];
                for (int i = 0; i < usize; i++) {
                    allUnits[i] = UnitFilter.stringToUnit(unitsvector
                            .elementAt(i).toString());
                    allExponents[i] = Double.parseDouble((exponentVector
                            .elementAt(i).toString()));
                }
                currentCompoundUnit = new CompoundUnit(allUnits,allExponents);
                System.exit(0);
            }

        }
项目:Tarski    文件EditorActions.java   
/**
 * 
 */
public void actionPerformed(ActionEvent e)
{
    if (e.getSource() instanceof mxGraphComponent)
    {
        mxGraphComponent graphComponent = (mxGraphComponent) e
                .getSource();
        double scale = this.scale;

        if (scale == 0)
        {
            String value = (String) JOptionPane.showInputDialog(
                    graphComponent,mxResources.get("value"),mxResources.get("scale") + " (%)",JOptionPane.PLAIN_MESSAGE,"");

            if (value != null)
            {
                scale = Double.parseDouble(value.replace("%","")) / 100;
            }
        }

        if (scale > 0)
        {
            graphComponent.zoomTo(scale,graphComponent.isCenterZoom());
        }
    }
}
项目:Openjsharp    文件XSheet.java   
/**
 * Action listener: handles actions in panel buttons
 */
// Call on EDT
public void actionPerformed(ActionEvent e) {
    if (e.getSource() instanceof JButton) {
        JButton button = (JButton) e.getSource();
        // Refresh button
        if (button == refreshButton) {
            refreshAttributes();
            return;
        }
        // Clear button
        if (button == clearButton) {
            clearCurrentNotifications();
            return;
        }
        // Subscribe button
        if (button == subscribeButton) {
            registerListener();
            return;
        }
        // Unsubscribe button
        if (button == unsubscribeButton) {
            unregisterListener();
            return;
        }
    }
}
项目:Course-Management-System    文件tableModelTeach.java   
@Override
public Object getValueAt(int row,int col) {
    // Todo Auto-generated method stub
    switch(col){
        case COURSE_NAME:return list.get(row);
        case COURSE_BUTTON:final JButton jbtn = new JButton("Go to Course Page");
                            jbtn.setActionCommand(list.get(row));
                            jbtn.addActionListener(new ActionListener(){
                                @Override
                                public void actionPerformed(ActionEvent arg0) {

                                    String course=jbtn.getActionCommand();
                                    System.out.println(course+"   on button press");
                                    //System.out.println("   on button press");
                                    String path=cmdao.getDirectoryPathForProf(course,user);
                                    pf.csp.curr_subject=course;
                                    System.out.println(path);
                                    try {
                                        pf.csp.resetPanes(pdao.getProfByUsername(user),path);
                                    } catch (Exception e) {
                                        // Todo Auto-generated catch block
                                        e.printstacktrace();
                                    }

                                    cardlayout card=(cardlayout)pf.panel.getLayout();
                                    pf.btnBack.setEnabled(true);
                                    card.show(pf.panel,"CourseSpecificPanel");
                                }
                            });
                            return jbtn;
    }
    return null;
}
项目:powertext    文件RTextAreaEditorKit.java   
@Override
public void actionPerformedImpl(ActionEvent e,RTextArea textArea) {
    Gutter gutter = RSyntaxUtilities.getGutter(textArea);
    if (gutter!=null) {
        int line = textArea.getCaretLineNumber();
        try {
            gutter.toggleBookmark(line);
        } catch (BadLocationException ble) { // Never happens
            UIManager.getLookAndFeel().
                        provideErrorFeedback(textArea);
            ble.printstacktrace();
        }
    }
}
项目:jdk8u-jdk    文件DefaultEditorKit.java   
/**
 * The operation to perform when this action is triggered.
 *
 * @param e the action event
 */
public void actionPerformed(ActionEvent e) {
    JTextComponent target = getTextComponent(e);
    if (target != null) {
        if ((! target.isEditable()) || (! target.isEnabled())) {
            UIManager.getLookAndFeel().provideErrorFeedback(target);
            return;
        }
        target.replaceSelection("\n");
    }
}
项目:imagetozxspec    文件FileReadyListener.java   
@Override
public void actionPerformed(ActionEvent e) {
    if (ImagetoZxSpec.getInFiles() == null || ImagetoZxSpec.getInFiles().length == 0) {
        JOptionPane.showMessageDialog(null,getCaption("dialog_choose_input_first"),getCaption("dialog_files_not_selected"),JOptionPane.@R_995_4045@ION_MESSAGE);
    }
    if (ImagetoZxSpec.getoutFolder() == null) {
        JOptionPane.showMessageDialog(null,getCaption("dialog_choose_folder_first"),getCaption("dialog_folder_not_selected"),JOptionPane.@R_995_4045@ION_MESSAGE);
    }
    if (operationFinishedListener != null) {
        operationFinishedListener.operationFinished(ImagetoZxSpec.getInFiles() != null 
                && ImagetoZxSpec.getInFiles().length >0 && ImagetoZxSpec.getoutFolder() != null);
    }
}
项目:incubator-netbeans    文件ReferencesbrowserControllerUI.java   
private void addMenuItemListener(final JCheckBoxMenuItem menuItem) {
    final boolean[] internalChange = new boolean[1];
    menuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
            if (internalChange[0]) return;
            final int column = Integer.parseInt(e.getActionCommand());
            if (column == 5 && !fieldsListTableModel.isRealColumnVisible(column)) {
                browserUtils.performTask(new Runnable() {
                    public void run() {
                        final int retainedSizesstate = referencesbrowserController.getReferencesControllerHandler().
                                getHeapFragmentWalker().computeRetainedSizes(false,true);
                        SwingUtilities.invokelater(new Runnable() {
                            public void run() {
                                if (retainedSizesstate != HeapFragmentWalker.RETAINED_SIZES_COmpuTED) {
                                    internalChange[0] = true;
                                    menuItem.setSelected(!menuItem.isSelected());
                                    internalChange[0] = false;
                                } else {
                                    fieldsListTableModel.setRealColumnVisibility(column,!fieldsListTableModel.isRealColumnVisible(column));
                                    fieldsListTable.createDefaultColumnsFromModel();
                                    fieldsListTable.updateTreeTableHeader();
                                    setColumnsData();
                                }
                            }
                        });
                    }
                });
            } else {
                fieldsListTableModel.setRealColumnVisibility(column,!fieldsListTableModel.isRealColumnVisible(column));
                fieldsListTable.createDefaultColumnsFromModel();
                fieldsListTable.updateTreeTableHeader();
                setColumnsData();
            }
        }
    });
}
项目:jmt    文件BlockingStationPanel.java   
/**
 * Invoked when an action occurs.
 */
public void actionPerformed(ActionEvent e) {
    int index = stationTable.getSelectedRow();
    if (index >= 0 && index < stationTable.getRowCount()) {
        Object key = stations.get(index);
        stations.remove(key);
        bd.removeRegionStation(regionKey,key);
        BlockingStationPanel.this.update();
    }
}
项目:incubator-netbeans    文件TemplatesPanel.java   
private void newFolderButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FirsT:event_newFolderButtonActionPerformed

        final Node [] nodes = manager.getSelectednodes ();
        rp.post(new Runnable() {
            @Override public void run() {
                DataFolder df = doNewFolder (nodes);
                assert df != null : "New DataFolder can not be created under "+Arrays.toString(nodes);

                // invoke inplace editing
                Node targerNode;
                if (nodes == null || nodes.length == 0) {
                    targerNode = manager.getRootContext ();
                } else {
                    targerNode = nodes [0].isLeaf () ? nodes [0].getParentNode () : nodes [0];
                }

                final Node newSubfolder = findChild (targerNode,df.getName (),3);
                assert newSubfolder != null : "Node for subfolder found in nodes: " + Arrays.asList (targerNode.getChildren ().getNodes ());
                if (newSubfolder != null) {
                    SwingUtilities.invokelater(new Runnable() {
                        @Override public void run() {
                            try {
                                manager.setSelectednodes (new Node [] { newSubfolder });
                            } catch (PropertyVetoException pve) {
                                Logger.getLogger(TemplatesPanel.class.getName()).log(Level.WARNING,pve);
                            }
                            view.invokeInplaceEditing ();
                        }
                    });
                }
            }
        });
    }
项目:rapidminer    文件PerspectiveController.java   
@Override
public void actionPerformed(final ActionEvent e) {
    if (!getModel().getSelectedPerspective().isUserDefined()) {
        getModel().restoreDefault(getModel().getSelectedPerspective().getName());
        getModel().getSelectedPerspective().apply(context);
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。