Package javax.swing

Examples of javax.swing.ListSelectionModel.clearSelection()


                ListSelectionModel lsm = connectionTable.getSelectionModel();
                rc = lsm.getLeadSelectionIndex();
                if ( rc == 0 ) rc = connections.size();
                Connection conn = (Connection) connections.get( rc-1 );
                if ( rc > 0 ) {
                  lsm.clearSelection();
                  lsm.setSelectionInterval(0,0);
                }
               
                InputStream in = null ;
                in = new ByteArrayInputStream( conn.inputText.getText().getBytes() );
View Full Code Here


                    if(column < 0) {
                        return;
                    }
                    if(!table.isCellSelected(row, column)) {
                        ListSelectionModel selectionModel = table.getSelectionModel();
                        selectionModel.clearSelection();
                        selectionModel.addSelectionInterval(row, row);
                    }
                    JPopupMenu popupMenu = new JPopupMenu();
                    int[] selectedRows = table.getSelectedRows();
                    final QueryDebuggingInfo[] selectedQueryDebuggingInfos = new QueryDebuggingInfo[selectedRows.length];
View Full Code Here

              lsm.removeSelectionInterval ( selectedRow, selectedRow );
          }

          // clear the selection in order to allow new selection events
          // IMPORTANT to allow re-selection events!
          lsm.clearSelection ();
      }
    } catch ( Exception err ) {
      err.printStackTrace();
    }
View Full Code Here

            lsm.setSelectionInterval(bot, bot);
        }

        public void removeAll() {
            ListSelectionModel lsm = connectionTable.getSelectionModel();
            lsm.clearSelection();
            while ( connections.size() > 0 ) {
                ((Connection) connections.get(0)).remove();
            }

            lsm.setSelectionInterval(0, 0);
View Full Code Here

                    rc = connections.size();
                }
                Connection conn = (Connection) connections.get( rc - 1 );

                if ( rc > 0 ) {
                    lsm.clearSelection();
                    lsm.setSelectionInterval(0, 0);
                }

                InputStream in = null ;
                String      text = conn.inputText.getText();
View Full Code Here

              lsm.removeSelectionInterval ( selectedRow, selectedRow );
          }

          // clear the selection in order to allow new selection events
          // IMPORTANT to allow re-selection events!
          lsm.clearSelection ();
      }
    } catch ( Exception err ) {
      err.printStackTrace();
    }
View Full Code Here

            lsm.setSelectionInterval(bot, bot);
        }

        public void removeAll() {
            ListSelectionModel lsm = connectionTable.getSelectionModel();
            lsm.clearSelection();
            while ( connections.size() > 0 ) {
                ((Connection) connections.get(0)).remove();
            }

            lsm.setSelectionInterval(0, 0);
View Full Code Here

                    rc = connections.size();
                }
                Connection conn = (Connection) connections.get( rc - 1 );

                if ( rc > 0 ) {
                    lsm.clearSelection();
                    lsm.setSelectionInterval(0, 0);
                }

                InputStream in = null ;
                String      text = conn.inputText.getText();
View Full Code Here

            return;
        }
        ListSelectionModel selectionModel = getViewSelectionModel();
        // And apply the new selection
        selectionModel.setValueIsAdjusting(true);
        selectionModel.clearSelection();
        for (int i = selection.length - 1; i >= 0; i--) {
            if (selection[i] != -1) {
                selectionModel.addSelectionInterval(selection[i],
                                                    selection[i]);
            }
View Full Code Here

                                    modelLeadIndex, change);
            lastModelSelection = null;
        } else if (modelSelection != null) {
            ListSelectionModel viewSelection = getViewSelectionModel();
            viewSelection.setValueIsAdjusting(true);
            viewSelection.clearSelection();
            int min = modelSelection.getMinSelectionIndex();
            int max = modelSelection.getMaxSelectionIndex();
            int viewIndex;
            for (int modelIndex = min; modelIndex <= max; modelIndex++) {
                if (modelSelection.isSelectedIndex(modelIndex)) {
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.