/** * Create a string representation of this activity. * @return A string representation of this activity. */ public String toString() { StringBuffer buf = new StringBuffer(); buf.append(SReflect.getInnerClassName(this.getClass())); buf.append("(name="); buf.append(getName()); buf.append(", activityType="); buf.append(getActivityType()); buf.append(")"); return buf.toString(); }
/** * Get a string to identify this activity in a tool such as the debugger. * @return A unique but nicely readable name. */ public String getBreakpointId() { String name = getName(); if(name==null) name = getActivityType()+"("+getId()+")"; return name; }
public Object getValueAt(int row, int column) { Object ret = null; if(column==1) { MActivity act = (MActivity)activities.get(row); ret = act.getName(); if(ret!=null) { // ret = ret + " (type = " + act.getActivityType() + ", id = " + act.getId() + ")"; ret = ret + " (type = " + act.getActivityType() + ")"; } else { ret = act.getActivityType() + " (id = " + act.getId() + ")"; } } return ret; } public boolean isCellEditable(int row, int column)
public Object getValueAt(int row, int column) { Object ret = null; if(column==1) { MActivity act = (MActivity)activities.get(row); ret = act.getName(); if(ret!=null) { // ret = ret + " (type = " + act.getActivityType() + ", id = " + act.getId() + ")"; ret = ret + " (type = " + act.getActivityType() + ")"; } else { ret = act.getActivityType() + " (id = " + act.getId() + ")"; } } return ret; } public boolean isCellEditable(int row, int column)
message.add(new JLabel("Please enter values for task "+task.getName()), new GridBagConstraints(0, 0, GridBagConstraints.REMAINDER, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.BOTH, insets, 0, 0)); message = new JLabel("Please perform task "+task.getName()); pane = new JOptionPane(message, JOptionPane.INFORMATION_MESSAGE, JOptionPane.OK_CANCEL_OPTION); pane.setValue(JOptionPane.UNINITIALIZED_VALUE); dialog = new JDialog((JFrame)null, task.getName()); dialog.getContentPane().setLayout(new BorderLayout()); dialog.getContentPane().add(pane, BorderLayout.CENTER);
/** * Create an activity event (start, end). */ public IMonitoringEvent createActivityEvent(String type, ProcessThread thread, MActivity activity) { // return new ComponentChangeEvent(type, TYPE_ACTIVITY, activity.getName(), // thread.getId(), getComponentIdentifier(), getComponentDescription().getCreationTime(), createProcessThreadInfo(thread)); MonitoringEvent event = new MonitoringEvent(getComponentIdentifier(), getComponentDescription().getCreationTime(), type+"."+TYPE_ACTIVITY, System.currentTimeMillis(), PublishEventLevel.FINE); event.setProperty("thread_id", thread.getId()); event.setProperty("activity", activity.getName()); event.setProperty("details", createProcessThreadInfo(thread)); return event; }
method = context.getActivity().getName();
method = context.getActivity().getName();