/** * Returns the row count. * * @return The row count. */ public int getRowCount() { return getBpmnSequenceEdge().getParameterMappings() != null? getBpmnSequenceEdge().getParameterMappings().size() : 0; }
public void actionPerformed(ActionEvent e) { stopEditing(maptable); int[] ind = maptable.getSelectedRows(); Arrays.sort(ind); for (int i = ind.length - 1; i >= 0; --i) { getBpmnSequenceEdge().getParameterMappings().remove(ind[i]); ((MappingsTableModel) maptable.getModel()).fireTableRowsDeleted(ind[i], ind[i]); } } };
/** * Gets the value. * * @param rowIndex The row. * @param columnIndex The column. * @return The value. */ public Object getValueAt(int rowIndex, int columnIndex) { Object ret = null; if(columnIndex == 0) { ret = getBpmnSequenceEdge().getParameterMappings().getKey(rowIndex); } else { ret = ((Tuple2<UnparsedExpression, UnparsedExpression>) getBpmnSequenceEdge().getParameterMappings().get(rowIndex)).getFirstEntity().getValue(); } return ret; }
/** * Sets the value. * * @param value The value. * @param rowIndex The row. * @param columnIndex The column. */ public void setValueAt(Object value, int rowIndex, int columnIndex) { switch (columnIndex) { case 0: Tuple2<UnparsedExpression, UnparsedExpression> rem = getBpmnSequenceEdge().getParameterMappings().remove(rowIndex); getBpmnSequenceEdge().getParameterMappings().add(rowIndex, createFreeName((String)value, new BasePropertyPanel.IndexMapContains(getBpmnSequenceEdge().getParameterMappings())), rem); break; case 1: default: String paramname = (String) getBpmnSequenceEdge().getParameterMappings().getKey(rowIndex); String paramtext = (String) value; UnparsedExpression exp = new UnparsedExpression(paramname, "", paramtext, null); getBpmnSequenceEdge().getParameterMappings().set(rowIndex, new Tuple2<UnparsedExpression, UnparsedExpression>(exp, null)); } fireTableCellUpdated(rowIndex, columnIndex); }
public void actionPerformed(ActionEvent e) { stopEditing(maptable); String name = createFreeName("name", new BasePropertyPanel.IndexMapContains(getBpmnSequenceEdge().getParameterMappings())); int row = maptable.getRowCount(); getBpmnSequenceEdge().addParameterMapping(name, new UnparsedExpression(name, "java.lang.Object", "", null), null); ((MappingsTableModel) maptable.getModel()).fireTableRowsInserted(row, row); } };
IndexMap<String, Tuple2<UnparsedExpression, UnparsedExpression>> mappings = edge.getParameterMappings(); if(mappings != null && mappings.size() > 0)
if(getLastEdge().getParameterMappings()!=null) IndexMap<String, Tuple2<UnparsedExpression, UnparsedExpression>> mappings = getLastEdge().getParameterMappings(); if(mappings!=null)