Demos and Usage of javax.swing.JList.setModel(ListModel model)


   1:     new BuButton(SinaviResource.SINAVI.getIcon("ANNULER"), "Annuler");
   2:   private JList lMenuTypeBateau_= new JList();
   3:   private JScrollPane TypeBateauScrollPane_=
   4:         ...
   5:     TypeBateauScrollPane_.setPreferredSize(dimtb_);
   6:     lMenuTypeBateau_.setModel(SinaviImplementation.SINAVIBATEAULISTMODEL);
   7:     lMenuTypeBateau_.setCellRenderer(new SinaviBateauCellRenderer());
   8:     ((JComponent)getContentPane()).setBorder(new EmptyBorder(25, 25, 25, 25));
   9:     getContentPane().setLayout(new BorderLayout());

View Full Code Here
   1:     new BuButton(SinaviResource.SINAVI.getIcon("ANNULER"), "Annuler");
   2:   private JList lGaresCreees_= new JList();
   3:   private IGare gare_;
   4:         ...
   5:     lGaresCreees_.setCellRenderer(new SinaviGareCellRenderer());
   6:     lGaresCreees_.setModel(SinaviImplementation.SINAVIGARELISTMODEL);
   7:      ((JComponent)getContentPane()).setBorder(new EmptyBorder(25, 25, 25, 25));
   8:     getContentPane().setLayout(new BorderLayout());
   9:     pDonnees_.setLayout(new BuGridLayout(2));

View Full Code Here
   1: JPanel topPanel;
   2: JList list;
   3: JScrollPane scroller;
   4:         ...
   5:     list = new BrowserTooltipList();
   6:     list.setModel(bl.bm);
   7:     scroller = new JScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
   8:         ...
   9: 
  10: class BrowserTooltipList extends JList
  11: {

View Full Code Here
   1: import javax.swing.JButton;
   2: import javax.swing.JList;
   3: import javax.swing.JOptionPane;
   4:         ...
   5: 
   6:     private JList errorList;
   7: 
   8:         ...
   9:         errorListModel = ErrorListModel.load();
  10:         errorList = new JList();
  11:         ...
  12:         errorList.setModel(errorListModel);

View Full Code Here
   1: 
   2:     JList compList,managerList,reportList;    
   3:     VectorListModel compListModel,managerListModel,reportListModel;
   4:         ...
   5: 
   6:     public void addJList(JList list) {
   7:         lists.add(list);
   8:         ...
   9: 
  10:         JList list,thisList=(JList) e.getSource();
  11:         ListIterator i=lists.listIterator();
  12:         ...
  13:         reportListModel=new VectorListModel(p.rClassControl.classes);
  14:         compList.setModel(compListModel);

View Full Code Here
   1:     new BuRadioButton("Gares s´┐Żlectionn´┐Żes");
   2:   private JList lBiefsCrees_= new JList();
   3:   private JScrollPane BiefsCreesScrollPane_=
   4:         ...
   5:       ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
   6:   private JList lEclusesCreees_= new JList();
   7:   private JScrollPane EclusesCreeesScrollPane_=
   8:         ...
   9:     lBiefsCrees_.setCellRenderer(new SinaviBiefCellRenderer());
  10:     lBiefsCrees_.setModel(SinaviImplementation.SINAVIBIEFLISTMODEL);
  11:     EclusesCreeesScrollPane_.setPreferredSize(dimliste_);
  12:         ...
  13:     lEclusesCreees_.setCellRenderer(new SinaviEcluseCellRenderer());
  14:     lEclusesCreees_.setModel(SinaviImplementation.SINAVIECLUSELISTMODEL);

View Full Code Here
   1:   private BuCheckBox cbTrematageAutorise_= new BuCheckBox("Trematage autorise");
   2:   private JList lBiefsCrees_= new JList();
   3:   private BuButton bValiderBief_=
   4:         ...
   5:     lBiefsCrees_.setCellRenderer(new SinaviBiefCellRenderer());
   6:     lBiefsCrees_.setModel(SinaviImplementation.SINAVIBIEFLISTMODEL);
   7:     if (_mode_edition) {
   8:       placeComposant(lm_, new BuLabel(""), c_);
   9:     } else {

View Full Code Here
   1:     new BuRadioButton("Un graphique par Element");
   2:   private JList lElementsCrees_= new JList();
   3:   private JScrollPane ElementsCreesScrollPane_=
   4:         ...
   5:       ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
   6:   private JList lResultatsPossibles_= new JList();
   7:   private JScrollPane ResultatsPossiblesScrollPane_=
   8:         ...
   9:     lElementsCrees_.setCellRenderer(new SinaviElementsCellRenderer());
  10:     lElementsCrees_.setModel(SinaviImplementation.SINAVIELEMENTLISTMODEL);
  11:     ResultatsPossiblesScrollPane_.setPreferredSize(new Dimension(340, 200));

View Full Code Here
   1:   private BuComboBox cbChoixMenuBateaux_= new BuComboBox();
   2:   private JList lBateauxCrees_= new JList();
   3:   private BuTextField tfBateauChoisi_= new BuTextField();
   4:         ...
   5:   private BuTextField tfVitesseBateau_= BuTextField.createDoubleField();
   6:   private JList lCategorie_= new JList();
   7:   private JScrollPane CategorieScrollPane_=
   8:         ...
   9:     lCategorie_.setListData(categorieplaisancier_);
  10:     lBateauxCrees_.setModel(SinaviImplementation.SINAVIBATEAULISTMODEL);
  11:     lBateauxCrees_.setCellRenderer(new SinaviBateauCellRenderer());

View Full Code Here
   1:   private BuPanel pCreerAnnuler_= new BuPanel();
   2:   private JList lEclusesCreees_= new JList();
   3:   private BuButton bValiderEcluse_=
   4:         ...
   5:     lEclusesCreees_.setCellRenderer(new SinaviEcluseCellRenderer());
   6:     lEclusesCreees_.setModel(SinaviImplementation.SINAVIECLUSELISTMODEL);
   7:     DureeESScrollPane_.setPreferredSize(dimtdes_);
   8:     bCreerDureesManoeuvres_.setPreferredSize(new Dimension(495, 20));
   9:     bSupprimerDureesManoeuvres_.setPreferredSize(new Dimension(150, 20));

View Full Code Here
   1:   private BuTextField tfNomGare_= new BuTextField();
   2:   private JList lGaresCreees_= new JList();
   3:   private JScrollPane GaresCreeesScrollPane_=
   4:         ...
   5:       ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
   6:   private JList lMenuTypeBateaux_= new JList();
   7:   private JScrollPane MenuTypeBateauxScrollPane_=
   8:         ...
   9:     lGaresCreees_.setCellRenderer(new SinaviGareCellRenderer());
  10:     lGaresCreees_.setModel(SinaviImplementation.SINAVIGARELISTMODEL);
  11:     MenuTypeBateauxScrollPane_.setPreferredSize(dimtypemenubateau_);
  12:         ...
  13:     lMenuTypeBateaux_.setCellRenderer(new SinaviBateauCellRenderer());
  14:     lMenuTypeBateaux_.setModel(SinaviImplementation.SINAVIBATEAULISTMODEL);

View Full Code Here
   1: import javax.swing.JLabel;
   2: import javax.swing.JList;
   3: import javax.swing.JPanel;
   4:         ...
   5:     
   6:     protected final JList LIST;
   7:     
   8:         ...
   9:         TITLE_PANEL = createTitlePanel(TITLE, CONTROLS);
  10:         LIST = new JList();
  11:         LIST.setTransferHandler(DNDUtils.DEFAULT_TRANSFER_HANDLER);
  12:         ...
  13:         LIST.addListSelectionListener(MOVER);
  14:         LIST.setModel(DELEGATOR);

View Full Code Here
   1:         jScrollPane1 = new javax.swing.JScrollPane();
   2:         lstMolecules = new javax.swing.JList();
   3:         pnlMoleculeButtons = new javax.swing.JPanel();
   4:         ...
   5:             pc.removeMacro((MacroMolecule) lstMolecules.getSelectedValue());
   6:             lstMolecules.setModel(pc.getMacroListModel(pc.getMacroVector()));
   7:             cboMolecule.setSelectedIndex(0);
   8:         ...
   9:                 pc.addMacro((MacroMolecule) cboMolecule.getSelectedItem());
  10:                 lstMolecules.setModel(pc.getMacroListModel(pc.getMacroVector()));
  11:                 cboMolecule.setSelectedIndex(0);
  12:         ...
  13:     private javax.swing.JLabel lblTitle;
  14:     private javax.swing.JList lstMolecules;

View Full Code Here
   1: 
   2:     public static void bind(JList list, SelectionInList selectionInList) {
   3:         if (selectionInList == null) 
   4:         ...
   5: 
   6:         list.setModel(selectionInList);
   7:         list.setSelectionModel(
   8:                 new SingleListSelectionAdapter(
   9:                         selectionInList.getSelectionIndexHolder()));

View Full Code Here