private String[] getExcludedPackages() { String[] excludedPackages = new String[myExcludePackagesModel.size()]; for (int i = 0; i < myExcludePackagesModel.size(); i++) { excludedPackages[i] = (String)myExcludePackagesModel.elementAt(i); } Arrays.sort(excludedPackages); return excludedPackages; }
/** * Returns the component at the specified index. Throws an * ArrayIndexOutOfBoundsException if the index is negative or not less than * the size of the list. * * @param index an index into this list * @return the component at the specified index * @throws ArrayIndexOutOfBoundsException */ @Override public Object elementAt(int index) { return ((CheckBoxListItem) super.elementAt(index)).getContent(); }
/** * Gets the name of theitem in the list at the specified index * * @return the name of item or null if there is no item at that index */ public String getNameAtIndex(int index) { if (index != -1) { return (String) (m_Model.elementAt(index)); } return null; }
/** * Gets the name of theitem in the list at the specified index * * @return the name of item or null if there is no item at that index */ public String getNameAtIndex(int index) { if (index != -1) { return (String) (m_Model.elementAt(index)); } return null; }
public String GetFlowComponent(int index) { return (String)flowList_.elementAt(index); } public void RemoveFlowComponent(int index)
/** * Get the name of the currently selected item in the list * * @return the name of the currently selected item or null if no item selected */ public String getSelectedName() { int index = m_List.getSelectedIndex(); if (index != -1) { return (String) (m_Model.elementAt(index)); } return null; }
/** * Get the name of the currently selected item in the list * * @return the name of the currently selected item or null if no item selected */ public String getSelectedName() { int index = m_List.getSelectedIndex(); if (index != -1) { return (String) (m_Model.elementAt(index)); } return null; }
DefaultListModel model = (DefaultListModel) leftList.getModel(); DefaultListModel list2Model = new DefaultListModel(); int[] selected = leftList.getSelectedIndices(); for (int i = 0; i < selected.length; i++) { list2Model.addElement(model.elementAt(i)); } rightList.setModel(list2Model);
/** * Return the list of selected layers * * @return */ public Object[] getSelectedLayers() { Object[] ret = new Object[listModel.size()]; for (int i = 0; i < ret.length; i++) { ret[i] = listModel.elementAt(i); } return ret; }
public void run(int itemIndex) { if (itemIndex < 0) return; run((Action)completionsModel.elementAt(itemIndex)); }
/** * Returns the component at the specified index. Throws an * ArrayIndexOutOfBoundsException if the index is negative or not less than * the size of the list. * * @param index an index into this list * @return the component at the specified index * @throws ArrayIndexOutOfBoundsException */ @Override public Object elementAt(int index) { return ((CheckBoxListItem) super.elementAt(index)).getContent(); }
/** * @return a collection of source paths (String objects) in this view */ public Collection getPaths() { LinkedList list = new LinkedList(); for (int index = 0; index < m_list_model.size(); index++) { list.add(m_list_model.elementAt(index)); } return list; }
void export() { StringBuffer sb = new StringBuffer(5000); for (int i=0; i<completionsModel.size(); i++) { sb.append(i); sb.append("\t"); sb.append(completionsModel.elementAt(i).toString()); sb.append("\n"); } TextWindow tw = new TextWindow("Menu Item Labels", " \tCommand", sb.toString(), 600, 500); }
protected void _save() { StringBuffer buf = new StringBuffer(); for(int i = 0; i < listModel.getSize(); i++) { if(i != 0) buf.append(' '); buf.append(((MenuItem)listModel.elementAt(i)).actionName); } saveContextMenu(buf.toString()); }
/** * updates the classifiers in the experiment */ private void updateExperiment() { Classifier[] cArray = new Classifier[m_AlgorithmListModel.size()]; for (int i = 0; i < cArray.length; i++) { cArray[i] = (Classifier) m_AlgorithmListModel.elementAt(i); } m_Exp.setPropertyArray(cArray); }
/** * updates the classifiers in the experiment */ private void updateExperiment() { Classifier[] cArray = new Classifier[m_AlgorithmListModel.size()]; for (int i = 0; i < cArray.length; i++) { cArray[i] = (Classifier) m_AlgorithmListModel.elementAt(i); } m_Exp.setPropertyArray(cArray); }
/** * Creates a BorderProperty based on this view */ public BorderProperty createBorderProperty() { CompoundBorderProperty prop = new CompoundBorderProperty(); for (int index = 0; index < m_borders_model.size(); index++) { BorderProperty bp = (BorderProperty) m_borders_model.elementAt(index); prop.addBorder(bp); } return prop; }
public void actionPerformed(ActionEvent evt) { String cmd = "-f"; for(int i = 0; i < selectedModel_.size(); i++) { cmd += ":" + selectedModel_.elementAt(i); } LvgGlobal.cmd_.SetFlowComponent(cmd, flowIndex_); // cmd list setVisible(false); } });
public void actionPerformed(ActionEvent evt) { JList list = m_panel.getList(); int index = list.getSelectedIndex(); if (index >= 0) { DefaultListModel model = m_panel.getListModel(); String item = JOptionPane.showInputDialog(I18N.getLocalizedMessage("Enter New Item"), model.elementAt(index)); if (item != null) { model.setElementAt(item, index); } } ensureIndexIsVisible(); } }
/** * @return the bean loader which is responsible for creating beans using the * given classpaths */ BeanLoader getBeanLoader() { if (m_bean_loader == null) { m_bean_loader = new BeanLoader(); for (int index = 0; index < m_paths_model.size(); index++) { m_bean_loader.addUrl((URL) m_paths_model.elementAt(index)); } } return m_bean_loader; }