Package javax.swing

Examples of javax.swing.JList.addMouseListener()


            list.setName("OptionPane.list");
            list.setVisibleRowCount(10);
            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            if(inputValue != null)
              list.setSelectedValue(inputValue, true);
            list.addMouseListener(getHandler());
            toAdd = sp;
            inputComponent = list;
          }

        } else {
View Full Code Here


            list.setName("OptionPane.list");
            list.setVisibleRowCount(10);
            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            if(inputValue != null)
              list.setSelectedValue(inputValue, true);
            list.addMouseListener(getHandler());
            toAdd = sp;
            inputComponent = list;
          }

        } else {
View Full Code Here

            list.setName("OptionPane.list");
            list.setVisibleRowCount(10);
            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            if(inputValue != null)
              list.setSelectedValue(inputValue, true);
            list.addMouseListener(getHandler());
            toAdd = sp;
            inputComponent = list;
          }

        } else {
View Full Code Here

      }

      final JList jlFathers = new JList(fatherNodeArray);
      JScrollPane jscJlOFathers = new JScrollPane(jlFathers);

      jlFathers.addMouseListener(new MouseAdapter() {

        public void mousePressed(MouseEvent e) {

          if ((e.getModifiers() == MouseEvent.BUTTON1_MASK) && (e.getClickCount() == 2)){
            int selectedIndex = jlFathers.getSelectedIndex();
View Full Code Here

      final JList jlOVariable = new JList(oVariableArray);
      JScrollPane jscJlOVariable = new JScrollPane(jlOVariable);

      add(jscJlOVariable, BorderLayout.CENTER);

      jlOVariable.addMouseListener(new MouseAdapter() {

        public void mousePressed(MouseEvent e) {

          if ((e.getModifiers() == MouseEvent.BUTTON1_MASK) && (e.getClickCount() == 2)){
            int selectedIndex = jlOVariable.getSelectedIndex();
View Full Code Here

      jlStates = new JList(statesArray);
      jscJlStates = new JScrollPane(jlStates);

      add(jscJlStates, BorderLayout.CENTER);

      jlStates.addMouseListener(new MouseAdapter() {

        public void mousePressed(MouseEvent e) {

          if ((e.getModifiers() == MouseEvent.BUTTON1_MASK) && (e.getClickCount() == 2)){
            int selectedIndex = jlStates.getSelectedIndex();
View Full Code Here

                    } catch (BadLocationException e) {
                        e.printStackTrace();
                    }
                }
            });
            jList.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    if(e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
                        editorTextArea.replaceRange(((CompletionCandidate)jList.getSelectedValue()).toString(), getWordStart(), editorTextArea.getCaretPosition());
                        w.setVisible(false);
View Full Code Here

  private void addEditorTab(final DatabaseDescriptor databaseDescriptor) {
    JPanel editorsPane = new JPanel(new BorderLayout());
        final String[] tableNames = getTableNames(databaseDescriptor);
        final JList tableNamesJList = new JList(tableNames);
        tableNamesJList.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                if(e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
                    Object[] values = tableNamesJList.getSelectedValues();
                    if(values.length == 1) {
View Full Code Here

                    mTestDesign.newModel();
                }
            }
        };

        examples.addMouseListener(mouseListener);

        mSplash.pack();

        mSplash.setLocationRelativeTo(null);
View Full Code Here

        detailList.setCellRenderer(new SchemaElementsRenderer());
        masterList.setCellRenderer(new QNameRenderer());

        final CommandGroup group = getWindowCommandManager().createCommandGroup("typeListCommandGroup", new Object[] { typeHierarchyCommand, typeInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        final JPopupMenu popup = group.createPopupMenu();
        detailList.addMouseListener(new PopupMenuMouseListener(popup));

        // build master view
        final GridBagLayoutBuilder masterPanelBuilder = new GridBagLayoutBuilder();
        final ComponentFactory cf = getComponentFactory();
        masterPanelBuilder.append(cf.createLabel("sameNameDifferentTypesView.nameList.label", new ValueModel[] { numNames})).nextLine();
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.