Commit 4d37acc0 authored by Guillaume Chomat's avatar Guillaume Chomat
Browse files

make a release

parent ad37af58
/**
* $Id: ApplyProcessCell.java,v 1.5 2002-06-13 14:18:50 gchomat Exp $
* $Id: ApplyProcessCell.java,v 1.6 2002-07-05 08:07:15 gchomat Exp $
*
* Transmorpher
*
......@@ -40,14 +40,22 @@ import java.util.Observable;
public class ApplyProcessCell extends FCGraphCell{
//the process graph referenced by the ApplyProcess.
ProcessGraph ref = null;
public ApplyProcessCell() {
this(null,null);
}
public ApplyProcessCell(Object userObject,ProcessGraph process) {
super(userObject,process);
public ApplyProcessCell(Object userObject,ProcessGraph owner) {
this(userObject,owner,null);
}
public ApplyProcessCell(Object userObject,ProcessGraph owner,ProcessGraph ref){
super(userObject,owner);
this.ref = ref;
}
public void update(Observable o, Object arg){
super.update(o,arg);
}
......
/**
* $Id: FCGraphCell.java,v 1.7 2002-07-01 13:11:18 gchomat Exp $
* $Id: FCGraphCell.java,v 1.8 2002-07-05 08:07:15 gchomat Exp $
*
* Transmorpher
*
......@@ -125,10 +125,21 @@ public class FCGraphCell extends DefaultGraphCell implements Observer{
case TmAction.ADD :
if(action.getTarget() instanceof Port)
if(process != null)
{
createPort(((TmAction)arg).getTarget());
}
{
if(process != null)
{
createPort(((TmAction)arg).getTarget());
}
Object source = action.getSource();
/*if(source instanceof ApplyProcess)
{
}*/
}
break;
case TmAction.REMOVE :
......
/**
*
*$Id: FCGraphUI.java,v 1.11 2002-07-03 16:35:22 gchomat Exp $
*$Id: FCGraphUI.java,v 1.12 2002-07-05 08:07:15 gchomat Exp $
*
* Transmorpher
*
......@@ -65,6 +65,8 @@ import com.jgraph.plaf.GraphUI;
import java.io.Serializable;
import com.jgraph.plaf.basic.BasicGraphUI;
import fr.fluxmedia.transmorpher.Graph.Call;
public class FCGraphUI extends BasicGraphUI{
......@@ -160,6 +162,59 @@ public class FCGraphUI extends BasicGraphUI{
}
/**
* Stops the editing session. If messageStop is true the editor
* is messaged with stopEditing, if messageCancel is true the
* editor is messaged with cancelEditing. If messageGraph is true
* the graphModel is messaged with valueForCellChanged.
*/
protected void completeEditing(boolean messageStop,
boolean messageCancel,
boolean messageGraph) {
if(stopEditingInCompleteEditing && editingComponent != null) {
Component oldComponent = editingComponent;
Object oldCell = editingCell;
GraphCellEditor oldEditor = cellEditor;
Object newValue = oldEditor.getCellEditorValue();
Rectangle editingBounds = graph.getCellBounds(editingCell);
boolean requestFocus = (graph != null &&
(graph.hasFocus() || editingComponent.hasFocus()));
editingCell = null;
editingComponent = null;
if(messageStop)
oldEditor.stopCellEditing();
else if(messageCancel)
oldEditor.cancelCellEditing();
graph.remove(oldComponent);
if(requestFocus)
graph.requestFocus();
if (messageGraph) {
Map map = GraphConstants.createMap();
//****************************
//System.out.println("newValue "+newValue);
if(oldCell instanceof DefaultGraphCell)
{
if(newValue instanceof String)
((Call)((DefaultGraphCell)oldCell).getUserObject()).setId((String)newValue);
}
//***************************
//GraphConstants.setValue(map, newValue);
Map insert = new Hashtable();
insert.put(oldCell, map);
graphModel.edit(null, insert, null, null);
}
updateSize();
// Remove Editor Listener
if(oldEditor != null && cellEditorListener != null)
oldEditor.removeCellEditorListener(cellEditorListener);
cellEditor = null;
}
}
......@@ -173,10 +228,10 @@ public class FCGraphUI extends BasicGraphUI{
* Invoked when a mouse button has been pressed on a component.
*/
public void mousePressed(MouseEvent e) {
// System.out.println("e "+e.getButton());
if(e.isPopupTrigger())
{
if(e.isPopupTrigger())
{
if (marquee!= null)
marquee.mousePressed(e);
super.mousePressed(e);
......
/**
* $Id: FCMarqueeHandler.java,v 1.46 2002-07-04 09:14:26 frederic Exp $
* $Id: FCMarqueeHandler.java,v 1.47 2002-07-05 08:07:15 gchomat Exp $
*
* Transmorpher
......@@ -160,7 +160,7 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
if (e.isPopupTrigger()){
if (!e.isConsumed() && marquee.isSelected()) {
flowcomposer.showPopup(e,currentProcess.snap(e.getPoint()));
e.consume();
return;
}
}
......@@ -220,17 +220,17 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
}
public void mouseReleased(MouseEvent event) {
ProcessGraph currentProcess = flowcomposer.getCurrentProcess();
if (event.isPopupTrigger()){
if (!event.isConsumed() && marquee.isSelected()) {
flowcomposer.showPopup(event,currentProcess.snap(event.getPoint()));
return;
}
ProcessGraph currentProcess = flowcomposer.getCurrentProcess();
if (event.isPopupTrigger()){
if (!event.isConsumed() && marquee.isSelected()) {
flowcomposer.showPopup(event,currentProcess.snap(event.getPoint()));
return;
}
}
Call call;
Process currentTransformation = (Process)currentProcess.getUserObject();
Process currentTransformation = (Process)currentProcess.getUserObject();
current = currentProcess.snap(event.getPoint());
String tmpName,name;
......
......@@ -44,12 +44,26 @@ public class ParserRDF extends DefaultHandler {
protected int x = -1;
protected int y = -1;
public Vector process = new Vector();
protected FCProcessFactory processFactory;
protected ProcessGraph currentProcess;
protected FCGraphCell currentCall;
protected Object currentChannel ;
protected int debug_mode;
/**
* Get the value of debug_mode.
* @return value of debug_mode.
*/
public int getDebug_mode() {return debug_mode;}
/**
* Set the value of debug_mode.
* @param v Value to assign to debug_mode.
*/
public void setDebug_mode(int v) {this.debug_mode = v;}
public FCProcessFactory processFactory;
public ProcessGraph currentProcess;
public FCGraphCell currentCall;
public Object currentChannel ;
/** XML Parser */
......@@ -59,10 +73,11 @@ public class ParserRDF extends DefaultHandler {
/*------------------------------------------ CONSTRUCTOR -----------------------------*/
/** The constructor, build the XML Parser but not parse the document */
public ParserRDF(FCProcessFactory factory) {
public ParserRDF(FCProcessFactory factory,int debug_mode) {
processFactory = factory;
this.debug_mode=debug_mode;
try {
javax.xml.parsers.SAXParserFactory iParserFactory = javax.xml.parsers.SAXParserFactory.newInstance();
......@@ -96,7 +111,8 @@ public class ParserRDF extends DefaultHandler {
/** Call by the XML parser at the begining of an element */
public final void startElement(String namespaceURI, String localName, String qname, Attributes atts) {
System.out.println("startElement "+localName);
if(debug_mode > 0)
System.out.println("startElement "+localName);
if (namespaceURI.equals("http://www.w3.org/1999/02/22-rdf-syntax-ns"))
{
if (localName.equals("Description")) {
......@@ -155,7 +171,8 @@ public class ParserRDF extends DefaultHandler {
/** Call by the XML parser at the end of an element */
public final void endElement(String namespaceURI,String pName, String qName ) {
System.out.println("endElement "+pName);
if(debug_mode > 0)
System.out.println("endElement "+pName);
if(pName.equals("hasProcess"))
{
mode = DEFAULT;
......
/**
* $Id: ProcessGraph.java,v 1.45 2002-07-03 16:15:15 gchomat Exp $
* $Id: ProcessGraph.java,v 1.46 2002-07-05 08:07:15 gchomat Exp $
*
* Transmorpher
*
......@@ -67,6 +67,8 @@ public class ProcessGraph extends JGraph implements Comparator, Observer{
Object userObject;
protected ApplyProcessCell[] caller;
// Undo Manager
protected GraphUndoManager undo;
......@@ -80,12 +82,12 @@ public class ProcessGraph extends JGraph implements Comparator, Observer{
static Dimension boundsPort = new Dimension(10,10);
static Dimension boundsPortCell = new Dimension(30,30);
/** boundsRect define the dimension of a rectangle form composant such as ApplyProcess, Serialize,...
* ie: this composant are included in rectangle boxe
*/
static Dimension boundsRect = new Dimension(70,60);
/**Default width of the app*/
public static final int PREFERRED_WIDTH =640;
......@@ -165,7 +167,6 @@ public class ProcessGraph extends JGraph implements Comparator, Observer{
}
return "";
}
//
// Cell View Factory
//
......@@ -603,8 +604,7 @@ public class ProcessGraph extends JGraph implements Comparator, Observer{
}
return result.toArray();
}
public boolean isSingleId(String name){
Object[] roots = getAll();
......
......@@ -2,7 +2,7 @@
<!DOCTYPE transmorpher SYSTEM "http://transmorpher.inrialpes.fr/dtd/transmorpher.dtd">
<transmorpher name="xslt"
version="1.0"
optimized="true"
optimized="false"
xmlns="http://transmorpher.fluxmedia.fr/1.0"
xmlns:regexp="xalan://fr.fluxmedia.transmorpher.regexp.RegularExpression">
......
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