Commit cbf4d312 authored by Guillaume Chomat's avatar Guillaume Chomat
Browse files

continue the editing graph

parent bf8568db
/**
* $Id: FCConstants.java,v 1.1 2002-05-28 13:10:05 gchomat Exp $
* $Id: FCConstants.java,v 1.2 2002-05-28 16:08:17 gchomat Exp $
*
* Transmorpher
*
......@@ -40,5 +40,13 @@ public interface FCConstants{
public static final int APPLYPROCESS =5;
public static final int APPLYRULESET =6;
public static final int APPLYQUERY =7;
public static final Object[] mergeType = new Object[]{"concat"};
public static final Object[] dispatchType = new Object[]{"broadcast"};
public static final Object[] serialyseType = new Object[]{"writeFile"};
public static final Object[] generateType = new Object[]{"readFile"};
public static final Object[] applyqueryType = new Object[]{"tmq"};
public static final Object[] applyexternalType= new Object[]{"xslt"};
}
/**
* $Id: FCMarqueeHandler.java,v 1.12 2002-05-28 12:58:36 gchomat Exp $
* $Id: FCMarqueeHandler.java,v 1.13 2002-05-28 16:08:17 gchomat Exp $
*
* Transmorpher
*
......@@ -387,7 +387,7 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
protected JFrame frame;
protected Call call;
protected GridLayout layout;
protected BoxLayout layout;
protected boolean editMode;
protected int type;
......@@ -407,7 +407,8 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
editMode = (call == null);
//this.setResizable(false);
this.setResizable(false);
buildDialog();
}
......@@ -418,88 +419,141 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
*/
public void buildDialog(){
getContentPane().setLayout(new BoxLayout(getContentPane(),BoxLayout.Y_AXIS));
//id
JPanel idPane = new JPanel();
JPanel typePane;
idJLabel = new JLabel(idLabel);
idPane.add(idJLabel);
switch(type)
{
case FCConstants.MERGE :
setTitle("New Merge Properties");
layout = new GridLayout(3,2,HORIZONTAL_GAP,VERTICAL_GAP);
getContentPane().setLayout(layout);
//type
typePane = new JPanel();
typeJLabel = new JLabel(typeLabel);
typePane.add(typeJLabel);
if(call!=null){
setTitle(call.getId()+" Properties");
idJLabel = new JLabel(idLabel);
idJLabel.setMaximumSize(new Dimension(idLabel.length(),20));
getContentPane().add(idJLabel);
idText= new JTextField(call.getId(),20);
idJLabel.setLabelFor(idText);
getContentPane().add(idText);
typeJLabel = new JLabel(typeLabel);
getContentPane().add(typeJLabel);
typeChooser = new JComboBox(new Object[]{"concat"});
typeJLabel.setLabelFor(typeChooser);
getContentPane().add(typeChooser);
// id
idText= new JTextField(call.getId(),20);
//type
typeChooser = new JComboBox(FCConstants.mergeType);
}
else{
setTitle("New Merge Properties");
idJLabel = new JLabel(idLabel);
idJLabel.setMaximumSize(new Dimension(idLabel.length(),20));
getContentPane().add(idJLabel);
idText= new JTextField("titi",20);
idJLabel.setLabelFor(idText);
getContentPane().add(idText);
typeJLabel = new JLabel(typeLabel);
getContentPane().add(typeJLabel);
typeChooser = new JComboBox(new Object[]{"concat"});
typeJLabel.setLabelFor(typeChooser);
getContentPane().add(typeChooser);
// id
idText= new JTextField("Merge"+start.x,20);
//type
typeChooser = new JComboBox(FCConstants.mergeType);
}
JPanel panelButton = new JPanel();
ok = new JButton(okTitle);
ok.addActionListener(this);
cancel = new JButton(cancelTitle);
cancel.addActionListener(this);
panelButton.add(ok);
panelButton.add(cancel);
getContentPane().add(panelButton);
//id
idJLabel.setLabelFor(idText);
idPane.add(idText);
getContentPane().add(idPane);
//type
typeJLabel.setLabelFor(typeChooser);
typePane.add(typeChooser);
getContentPane().add(typePane);
break;
case FCConstants.DISPATCH :
//type
typePane = new JPanel();
typeJLabel = new JLabel(typeLabel);
typePane.add(typeJLabel);
if(call!=null){
System.out.println("not yet implemented");
setTitle(call.getId()+" Properties");
// id
idText= new JTextField(call.getId(),20);
//type
typeChooser = new JComboBox(FCConstants.dispatchType);
}
else{
System.out.println("not yet implemented");
setTitle("New Dispatch Properties");
// id
idText= new JTextField("Dispatch"+start.x,20);
//type
typeChooser = new JComboBox(FCConstants.dispatchType);
}
//id
idJLabel.setLabelFor(idText);
idPane.add(idText);
getContentPane().add(idPane);
//type
typeJLabel.setLabelFor(typeChooser);
typePane.add(typeChooser);
getContentPane().add(typePane);
break;
case FCConstants.SERIALYSE :
if(call!=null){
System.out.println("not yet implemented");
}
else{
System.out.println("not yet implemented");
//type
typePane = new JPanel();
JPanel filePane = new JPanel();
}
break;
case FCConstants.APPLYEXTERNAL :
typeJLabel = new JLabel(typeLabel);
typePane.add(typeJLabel);
if(call!=null){
System.out.println("not yet implemented");
setTitle(call.getId()+" Properties");
// id
idText= new JTextField(call.getId(),20);
//type
typeChooser = new JComboBox(FCConstants.serialyseType);
//file
}
else{
System.out.println("not yet implemented");
setTitle("New Serialyse Properties");
// id
idText= new JTextField("Serialyse" + start.x ,20);
//type
typeChooser = new JComboBox(FCConstants.serialyseType);
//file
fileJLabel = new JLabel(fileLabel);
filePane.add(fileJLabel);
}
//id
idJLabel.setLabelFor(idText);
idPane.add(idText);
getContentPane().add(idPane);
//type
typeJLabel.setLabelFor(typeChooser);
typePane.add(typeChooser);
getContentPane().add(typePane);
break;
case FCConstants.APPLYEXTERNAL :
//type
typePane = new JPanel();
typeJLabel = new JLabel(typeLabel);
typePane.add(typeJLabel);
if(call!=null){
setTitle(call.getId()+" Properties");
// id
idText= new JTextField(call.getId(),20);
//type
typeChooser = new JComboBox(FCConstants.serialyseType);
//file
}
else{
}
break;
case FCConstants.APPLYPROCESS:
if(call!=null){
System.out.println("not yet implemented");
......@@ -542,7 +596,17 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
break;
}
JPanel panelButton = new JPanel();
ok = new JButton(okTitle);
ok.addActionListener(this);
cancel = new JButton(cancelTitle);
cancel.addActionListener(this);
panelButton.add(ok);
panelButton.add(cancel);
getContentPane().add(panelButton);
this.pack();
this.setLocationRelativeTo(frame);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment