protected void addEdit(Record record) { Object val = null; if (record != null) val = record.getAttributeAsObject("_obj"); int[] hw = getWindowHW(); new CommonDialog(getCommonSavePanel(this, val, record), true, hw[0], hw[1], getWindowTitle()) .show(); }
private List<TransitLPActivity> getActivities() { ArrayList<TransitLPActivity> activities = new ArrayList<TransitLPActivity>(); for (Record record : view.getProjectActivities()) { TransitLPActivity transit = (TransitLPActivity) record.getAttributeAsObject("transit"); activities.add(transit); } return activities; }
private List<TransitLPActivityUnit> getActivityUnits() { ArrayList<TransitLPActivityUnit> activityUnit = new ArrayList<TransitLPActivityUnit>(); System.out.println("Size : " + view.getUnitChoices().size()); for (List<Record> unitRecord : view.getUnitChoices()) { TransitLPActivityUnit unit = new TransitLPActivityUnit(); unit.setCategory(transitCategory.getId()); for (Record record : unitRecord) { System.out.println( "CHOICe activity to be added : " + ((TransitLPActivity) record.getAttributeAsObject("transit")).getName()); unit.addActivity(((TransitLPActivity) record.getAttributeAsObject("transit")).getId()); } activityUnit.add(unit); } return activityUnit; }