Package javax.swing

Examples of javax.swing.Action.actionPerformed()


            Legend legend = getGraphPane().getLegendAtPoint(e.getPoint());
            Node node=getGraphPane().getNodeAtPoint(e.getPoint());
            if (legend != null){
                Action a = legend.getActionAtPoint(e.getPoint());
                if (a != null){
                    a.actionPerformed(new ActionEvent("Selection Source", 0, "do Action")); // null was e.getSource()
                }
            }
            else if (node != null) {
                if (isSelectEvent(e) && !m_nodeSelectionModel.isNodeSelected(node) && shouldSelectNode(node)){
                    m_nodeSelectionModel.addNode(node);
View Full Code Here


        public void hyperlinkUpdate(HyperlinkEvent e) {
          if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
            if (e.getDescription().equals("StartTutorial")) {
              startTutorial.actionPerformed(null);
            } else if (e.getDescription().equals("StopTutorial")) {
              stopTutorial.actionPerformed(null);
            } else {
              try {
                tutorialArea.setPage(e.getURL());
              } catch (IOException e1) {
                MessageCenter.getInstance().getLogger().error(
View Full Code Here

    public void actionPerformed( ActionEvent e )
    {
      Action defaultAction = actionList.getDefaultAction();
      if( defaultAction != null )
        defaultAction.actionPerformed( e );
    }
  };

  public static JPopupMenu insertActions( ActionList actions, JPopupMenu popup, int index )
  {
View Full Code Here

        if( acc == null )
          continue;

        if( acc.equals( KeyStroke.getKeyStrokeForEvent( e ) ) )
        {
          action.actionPerformed( new ActionEvent( e.getSource(), 0, null ) );
          e.consume();
          return;
        }
      }
    }
View Full Code Here

        return;

      Action closeView = (Action) graphicalEditorActionMap
          .getInterface("closeView");

      closeView.actionPerformed(null);
      String viewName = (String) closeView
          .getValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.VIEW_NAME);
      closeView
          .putValue(
              de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.VIEW_NAME,
View Full Code Here

              JOptionPane.INFORMATION_MESSAGE);

      if (result != JOptionPane.OK_OPTION)
        return;

      removeView.actionPerformed(null);
      String viewName = (String) removeView
          .getValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.VIEW_NAME);
      removeView
          .putValue(
              de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.VIEW_NAME,
View Full Code Here

      changeViewName
          .putValue(
              de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.NEW_VIEW_NAME,
              newName);
      changeViewName.actionPerformed(null);
      String resultNewViewName = (String) changeViewName
          .getValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.NEW_VIEW_NAME);
      String resultOldViewName = (String) changeViewName
          .getValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.OLD_VIEW_NAME);
View Full Code Here

                    "more");
            action
                .putValue(
                    de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.UI_FRAME,
                    uiJPanel);
            action.actionPerformed(null);
            ((JFileChooser) e.getSource())
                .removePropertyChangeListener(
                    JFileChooser.FILE_FILTER_CHANGED_PROPERTY,
                    this);
          }
View Full Code Here

              selectedFilter.getSuffix());
      action
          .putValue(
              de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.UI_FRAME,
              uiJPanel);
      action.actionPerformed(null);
    }
  }

  abstract class ProjectAction extends AbstractAction {
    public void firePropertyChange(String propertyName, Object oldValue,
View Full Code Here

      if (result == JOptionPane.YES_OPTION) {
        // TODO ����Ҫ���浽 ���ݿ���, ������ܺ����ټӽ���.
        Action saveAction = (Action) data
            .get(ConstantDefinition.SAVE_PROJECT_ACTION);
        if ((saveAction != null) && (saveAction.isEnabled())) {
          saveAction.actionPerformed(e);
        } else {
          int rst = JOptionPane.showConfirmDialog(uiJPanel,
              "�޷�������Ŀ�洢ģ�飬�Ƿ�����ر���Ŀ�IJ�����/n����������ϴδ��̺���޸Ľ��޷�������",
              "���洰��", JOptionPane.YES_NO_OPTION,
              JOptionPane.WARNING_MESSAGE);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.