/** * DOCUMENT ME! * * @param kassenzeichennummern DOCUMENT ME! */ private void setKassenzeichenNummern(final Set<Integer> kassenzeichennummern) { final DefaultListModel kassenzeichenListModel = (DefaultListModel) lstKassenzeichen.getModel(); kassenzeichenListModel.removeAllElements(); if (kassenzeichennummern != null) { for (final Integer kassenzeichennummer : kassenzeichennummern) { kassenzeichenListModel.addElement(kassenzeichennummer); } } }
/** * This method set the focus on a specific component. * * <p>For this kind of datasource otherInfo must be: [0] = Fixed to COMPONENT_CATEGORY_SERIES_LIST * (used for future extensions) [1] = Integer, the category series to edit [2] = The expression id * in the category window to focus on [3] = The expression in the hyperlink... [4] = The hyperlink * parameter [5] = The expression of the hyperlink parameter */ public void setFocusedExpression(Object[] expressionInfo) { if (expressionInfo == null) return; int expID = ((Integer) expressionInfo[0]).intValue(); switch (expID) { case COMPONENT_CATEGORY_SERIES_LIST: int index = ((Integer) expressionInfo[1]).intValue(); if (index >= 0 && jList1.getModel().getSize() > index) { jList1.setSelectedIndex(index); newInfo = new Object[expressionInfo.length - 2]; for (int i = 2; i < expressionInfo.length; ++i) newInfo[i - 2] = expressionInfo[i]; break; } } }
public void selectAll() { list.setSelectionInterval(0, list.getModel().getSize() - 1); }