diff --git a/src/ui/ColorManager.java b/src/ui/ColorManager.java index ca6d55ab6a7daef23811af9bcca538e5ae76c7ef..d3139915c1bd5529650354fdede29896e5071e0d 100755 --- a/src/ui/ColorManager.java +++ b/src/ui/ColorManager.java @@ -106,7 +106,9 @@ public class ColorManager { public static final Color MainTabbedPaneBack = new Color(9, 7, 85); public static final Color MainTabbedPaneSelect = new Color(231, 178, 60); - public static final Color InteractiveSimulationBackground = new Color(5, 100, 7, 125); + public static final Color InteractiveSimulationJTABackground = new Color(50, 40, 40); + public static final Color InteractiveSimulationJTAForeground = new Color(255, 166, 38); + public static final Color InteractiveSimulationBackground = new Color(5, 100, 7); public static final Color InteractiveSimulationText = new Color(5, 100, 7); public final static void setColor(Graphics g, int state, int type) { diff --git a/src/ui/GTMLModeling.java b/src/ui/GTMLModeling.java index 21b0be60dfc40e43adc65c9804d1f863bc6afa1a..29e774bb2b2c271cbbd2221366d03cd672b77a76 100755 --- a/src/ui/GTMLModeling.java +++ b/src/ui/GTMLModeling.java @@ -654,6 +654,9 @@ public class GTMLModeling { TMLTask tt1, tt2; TType tt; TMLType tmlt; + + TMLAttribute tmlattr; + TMLType tmltt; System.out.println("*** Adding requests ***"); @@ -732,6 +735,17 @@ public class GTMLModeling { tt1.setRequested(true); tt1.setRequest(request); request.setDestinationTask(tt1); + + // Request attributes + System.out.println("Requests attributes"); + for(int j=0; j<request.getNbOfParams(); j++) { + tmltt = new TMLType(request.getType(j).getType()); + tmlattr = new TMLAttribute("arg" + (j + 1) + "__req", tmltt); + tmlattr.initialValue = tmlattr.getDefaultInitialValue(); + System.out.println("Adding " + tmlattr.getName() + " to " + tt1.getName() + "with value =" + tmlattr.initialValue); + tt1.addAttribute(tmlattr); + } + for(int i=0; i<portstome.size(); i++) { port2 = (TMLCPrimitivePort)(portstome.get(i)); tt2 = tmlm.getTMLTaskByName(port2.getFather().getValue()); diff --git a/src/ui/interactivesimulation/JFrameInteractiveSimulation.java b/src/ui/interactivesimulation/JFrameInteractiveSimulation.java index 2fb0629097b454739726df4d0ca79c281e75417e..0daf8e46090f5f56fa635f479cd351cae4168192 100755 --- a/src/ui/interactivesimulation/JFrameInteractiveSimulation.java +++ b/src/ui/interactivesimulation/JFrameInteractiveSimulation.java @@ -212,17 +212,19 @@ public class JFrameInteractiveSimulation extends JFrame implements ActionListene // Ouput textArea jta = new ScrolledJTextArea(); + jta.setBackground(ColorManager.InteractiveSimulationJTABackground); + jta.setForeground(ColorManager.InteractiveSimulationJTAForeground); jta.setMinimumSize(new Dimension(800, 400)); jta.setRows(15); //jta.setMaximumSize(new Dimension(800, 500)); jta.setEditable(false); jta.setMargin(new Insets(10, 10, 10, 10)); jta.setTabSize(3); - jta.append("Click on start to start the simulator and connect to it\n"); + jta.append("Click on \"Connect\" to start the remote simulator and connect to it\n"); Font f = new Font("Courrier", Font.BOLD, 12); jta.setFont(f); jsp = new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); - jsp.setViewportBorder(BorderFactory.createLineBorder(Color.red)); + jsp.setViewportBorder(BorderFactory.createLineBorder(ColorManager.InteractiveSimulationBackground)); //jsp.setColumnHeaderView(100); //jsp.setRowHeaderView(30); @@ -359,14 +361,14 @@ public class JFrameInteractiveSimulation extends JFrame implements ActionListene jp01.add(new JLabel("Status:"), c01); c01.gridwidth = GridBagConstraints.REMAINDER; //end row status = new JLabel("Unknown"); - status.setForeground(Color.red); + status.setForeground(ColorManager.InteractiveSimulationText); jp01.add(status, c01); jp01.add(new JLabel(" "), c01); c01.gridwidth = 1; jp01.add(new JLabel("Time:"), c01); c01.gridwidth = GridBagConstraints.REMAINDER; //end row time = new JLabel("Unknown"); - time.setForeground(Color.red); + time.setForeground(ColorManager.InteractiveSimulationText); jp01.add(time, c01);