Java JComboBox Model generateInsertWhereComboBoxModel(String label)

Here you can find the source of generateInsertWhereComboBoxModel(String label)

Description

generate Insert Where Combo Box Model

License

Open Source License

Declaration

public static DefaultComboBoxModel generateInsertWhereComboBoxModel(String label) 

Method Source Code

//package com.java2s;
/**/*from   ww w .  jav a2s. co  m*/
 * Archivists' Toolkit(TM) Copyright ? 2005-2007 Regents of the University of California, New York University, & Five Colleges, Inc.
 * All rights reserved.
 *
 * This software is free. You can redistribute it and / or modify it under the terms of the Educational Community License (ECL)
 * version 1.0 (http://www.opensource.org/licenses/ecl1.php)
 *
 * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ECL license for more details about permissions and limitations.
 *
 *
 * Archivists' Toolkit(TM)
 * http://www.archiviststoolkit.org
 * info@archiviststoolkit.org
 *
 * @author Lee Mandell
 * Date: Jun 22, 2006
 * Time: 10:26:02 AM
 */

import javax.swing.*;
import java.util.Vector;

public class Main {
    public static final String ADD_AT_BEGINING = "At begining";
    public static final String ADD_ABOVE_SELECTION = "Before selection";
    public static final String ADD_BELOW_SELECTION = "After selection";
    public static final String ADD_AT_END = "At End";

    public static DefaultComboBoxModel generateInsertWhereComboBoxModel(String label) {
        Vector<String> values = new Vector<String>();
        values.add(label);
        values.add(ADD_AT_BEGINING);
        values.add(ADD_ABOVE_SELECTION);
        values.add(ADD_BELOW_SELECTION);
        values.add(ADD_AT_END);
        return new DefaultComboBoxModel(values);
    }
}

Related

  1. addItem(DefaultComboBoxModel model, String elem)
  2. addItems(DefaultComboBoxModel comboBox, Iterable items)
  3. comboBoxContains(DefaultComboBoxModel model, Object obj)
  4. convertDefaultComboBoxModelToVector( DefaultComboBoxModel model)
  5. generateComboModel(Object[] values)
  6. getComboModelList(ComboBoxModel model)
  7. getNewDefaultComboBoxModel(ArrayList itemsToStream)
  8. getSelectedItemfromModel(Object combo)
  9. hasDataChanged(List newDatasets, ComboBoxModel currentModel)