package com.vci.client.workflow.task; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import java.awt.GridBagLayout; import javax.swing.JLabel; import java.awt.GridBagConstraints; import javax.swing.JTextField; import java.awt.Insets; import com.vci.client.LogonApplication; import com.vci.client.common.objects.UserObject; import com.vci.client.ui.swing.VCIOptionPane; import com.vci.client.ui.swing.components.VCIJCalendarPanel; import com.vci.client.workflow.delegate.ProcessCustomClientDelegate; import com.vci.client.workflow.template.object.TasksAssignedObject; import com.vci.common.utility.ObjectUtility; import com.vci.corba.common.VCIError; import javax.swing.JRadioButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class TasksAssignedByPlatformDialog extends JDialog { private final JPanel contentPanel = new JPanel(); private JTextField JTextName; private JRadioButton jRadioButTrue; private JRadioButton jRadioButFalse; private JButton choice; private JButton okButton; private JButton cancelButton; private VCIJCalendarPanel txtStartTime; private VCIJCalendarPanel txtEndTime; private JRadioButton hisTodoTaskYes = new JRadioButton("是"); private JRadioButton hisTodoTaskNo = new JRadioButton("否"); private UserObject[] userObject; private boolean isTrue;//是否生效 private boolean saveFlag = false; private JButton closeBtn; public boolean isSaveFlag() { return saveFlag; } public void setSaveFlag(boolean saveFlag) { this.saveFlag = saveFlag; } public boolean getIsTrue() { return isTrue; } public void setIsTrue(boolean isTrue) { this.isTrue = isTrue; } /** * Launch the application. */ public static void main(String[] args) { // try { // TasksAssignedByPlatformDialog dialog = new TasksAssignedByPlatformDialog(); // dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // dialog.setVisible(true); // } catch (Exception e) { // e.printStackTrace(); // } } /** * Create the dialog. */ public TasksAssignedByPlatformDialog() { super(LogonApplication.frame,true); init(); this.setLocationRelativeTo(null); } public TasksAssignedByPlatformDialog(String arg) { } public void initData(){ TasksAssignedObject obj; ProcessCustomClientDelegate processCustomClientDelegate = new ProcessCustomClientDelegate(LogonApplication.getUserEntityObject()); try { obj = processCustomClientDelegate.getTasksAssignedByUserName(""); if(obj.getId() != ""&& obj.getId() != null){ String user = obj.getTasksName(); user.split(","); // userObject = new UserObject(); // userObject.setUserName(obj.getUserName()); // userObject.setTrueName(obj.getTasksTrueName()); // userObject.setId(obj.getTasksId()); // fromUser.setText(obj.getFromUser()); // JTextName.setText(userObject.getTrueName()); JTextName.setText(obj.getTasksName()); txtStartTime.setDate(obj.getStartTime()); txtEndTime.setDate(obj.getEndTime()); if(obj.getIsTrue()){ jRadioButTrue.setSelected(true); }else{ jRadioButFalse.setSelected(true); } if(obj.getTasksName().contains(",")){ String[] userName = obj.getTasksName().split(","); userObject = new UserObject[userName.length]; for(int i = 0;i