Package javax.swing

Examples of javax.swing.JList


    this.loader = loader;
  }


  public void actionPerformed(ActionEvent e) {
    JList pagesList = panel.getThumbnailList();
        if (e != null && pagesList != null){         
        try{
          if(CLEAR.equals(e.getActionCommand())){
             panel.resetPanel();
          }else if (ADD.equals(e.getActionCommand())){
View Full Code Here


        model.addElement(createTemplate(0.0, 1.0, 1.0, 0.0));
        model.addElement(createTemplate(1.0, 0.0, 0.0, 1.0));
        model.addElement(createTemplate(1.0, 0.0, 1.0, 1.0));
        model.addElement(createTemplate(1.0, 0.0, 1.0, 0.0));

        JList list = new JList(model);
        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        list.setCellRenderer(new TemplateCellRenderer());
        list.addListSelectionListener(new TemplateSelectionHandler());

        JScrollPane pane = new JScrollPane(list);
        pane.getViewport().setPreferredSize(new Dimension(98, 97 * 3));
        return pane;
    }
View Full Code Here

        public void valueChanged(ListSelectionEvent e) {
            if (e.getValueIsAdjusting()) {
                return;
            }

            JList list = (JList) e.getSource();
            Template template = (Template) list.getSelectedValue();
            if (template != null) {
                if (controller != null && controller.isRunning()) {
                    controller.stop();
                }
View Full Code Here

    frame.setTitle("Currency Converter");
        Container contentPane = frame.getContentPane();
        contentPane.setLayout(new GridLayout(5, 2));
        JLabel currencyLabel = new JLabel("Other Currency");
        contentPane.add(currencyLabel);
    list = new JList(new Currency [] {Currency.USD, Currency.EUR});
    list.setSelectedIndex(0);
    list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        contentPane.add(list);
        JLabel amountLabel = new JLabel("Amount");
        contentPane.add(amountLabel);
View Full Code Here

    /**
     * Initializes the GUI.
     */
    private void initGUI() {
      descriptorList= new JList(new DefaultListModel());
      descriptorList.setCellRenderer(new DescriptorListCellRenderer(descriptorType));
      JScrollPane pane = new JScrollPane(descriptorList);
     
      descriptorList.addMouseListener(new MouseAdapter(){
        @Override
View Full Code Here

    // valueChanged() - implemented from list selection listener
    ////////////////////////////////////////////////////////////////////////
  public void valueChanged(ListSelectionEvent e)
  {   
    //get the list who called this guy
    JList list = (JList)e.getSource();
   
    //get the selected feature at this point (only one allowed at a time)
    mSelectedFeature = (FeatureExtractorCheckBox)list.getSelectedValue();
   
    if(mSelectedFeature.getExtractor() instanceof MetaFeatureExtractor)
    {
      mFeatureTitleLbl.setText("Meta Feature:");
    }
View Full Code Here

   *
   * @return javax.swing.JList
   */
  JList getLoadersList() {
    if (loadersList == null) {
      loadersList = new JList();
      loadersList
          .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(
                javax.swing.event.ListSelectionEvent e) {
              loadersList_valueChanged(e);
View Full Code Here

   *
   * @return javax.swing.JList
   */
  JList getCreatorsList() {
    if (creatorsList == null) {
      creatorsList = new JList();
      creatorsList
          .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(
                javax.swing.event.ListSelectionEvent e) {
              creatorsList_valueChanged(e);
View Full Code Here

   *
   * @return javax.swing.JList
   */
  JList getTransformersList() {
    if (transformersList == null) {
      transformersList = new JList();
      transformersList
          .setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      transformersList
          .addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent e) {
View Full Code Here

        panel.add(BorderLayout.CENTER, new JPanel() {
            {
                this.setLayout(new BorderLayout());
                this.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 0));
                this.add(BorderLayout.WEST, new JScrollPane(
                        gauche = new JList()) {
                    public Dimension getMinimumSize()
                    {
                        return new Dimension(200, 200);
                    }

                    public Dimension getPreferredSize()
                    {
                        return getMinimumSize();
                    }
                });
                this.add(BorderLayout.EAST, new JPanel() {
                    {
                        this.setLayout(new BorderLayout());
                        this.add(BorderLayout.CENTER, new JScrollPane(
                                droite = new JList()));
                        JPanel toolbar = new JPanel();
                        toolbar.setLayout(new FlowLayout(FlowLayout.CENTER));
                        toolbar.add(new JButton(monter));
                        toolbar.add(new JButton(descendre));
                        this.add(BorderLayout.SOUTH, toolbar);
View Full Code Here

TOP

Related Classes of javax.swing.JList

Copyright © 2018 www.massapicom. 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.