Package javax.swing

Examples of javax.swing.JList.clearSelection()


      final int[] selectedEntries = enumEntryList.getSelectedIndices();
      for (int i = selectedEntries.length - 1; i >= 0; i--)
      {
        enumEntryListModel.remove(selectedEntries[i]);
      }
      enumEntryList.clearSelection();
    }
  }

  /**
   * Handles the request to update an enumeration entry to the detail editor.
View Full Code Here


      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      list.clearSelection();
      list.repaint();
    }
    else
    {
      final ReportDocumentContext activeContext = getActiveContext();
View Full Code Here

      final int[] selectedEntries = enumEntryList.getSelectedIndices();
      for (int i = selectedEntries.length - 1; i >= 0; i--)
      {
        enumEntryListModel.remove(selectedEntries[i]);
      }
      enumEntryList.clearSelection();
    }
  }

  /**
   * Handles the request to update an enumeration entry to the detail editor.
View Full Code Here

    JList list = ( JList )e.getSource();
    int row = list.locationToIndex( e.getPoint() );
    if( row == -1 || !list.getCellBounds( row, row ).contains( e.getPoint() ) )
    {
      if( list.getSelectedIndex() != -1 )
        list.clearSelection();

      actions = getDefaultActions();
    }
    else
    {
View Full Code Here

      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      list.clearSelection();
      list.repaint();
    }
    else
    {
      final ReportRenderContext activeContext = getActiveContext();
View Full Code Here

          @Override
          public void keyPressed(KeyEvent e) {
            switch(e.getKeyCode()) {
              case KeyEvent.VK_UP: {
                  if(tableNamesJList.getSelectedIndex() == 0) {
                    tableNamesJList.clearSelection();
                    tableNameFilterTextField.requestFocus();
                  }
                break;
              }
              case KeyEvent.VK_ENTER: {
View Full Code Here

        ActionList actions = null;
        JList list = (JList) e.getSource();
        int row = list.locationToIndex(e.getPoint());
        if (row == -1 || !list.getCellBounds(row, row).contains(e.getPoint())) {
            if (list.getSelectedIndex() != -1) {
                list.clearSelection();
            }

            actions = getDefaultActions();
        } else {
            if (list.getSelectedIndex() != row) {
View Full Code Here

        public void valueChanged(ListSelectionEvent e) {
          if (list.getSelectedValue() != null) {
            JCheckBox c = ((JCheckBox) list.getSelectedValue());
            c.setSelected(!c.isSelected());
          }
          list.clearSelection();
        }
      });
      final Vector<JCheckBox> checkboxes = new Vector<JCheckBox>();
    JPanel topPanel = new JPanel(new BorderLayout());
      JPanel topInner = new JPanel(new GridLayout(2, 1, 5, 5));
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.