Commit 9f9b6e9f authored by Guillaume Chomat's avatar Guillaume Chomat
Browse files

fix bug with isPoputrigger method

parent e12263c4
/**
*
*$Id: FCGraphUI.java,v 1.10 2002-07-03 16:15:15 gchomat Exp $
*$Id: FCGraphUI.java,v 1.11 2002-07-03 16:35:22 gchomat Exp $
*
* Transmorpher
*
......@@ -181,13 +181,7 @@ public class FCGraphUI extends BasicGraphUI{
marquee.mousePressed(e);
super.mousePressed(e);
}
/*if(e.getButton() == MouseEvent.BUTTON3 ){
//System.out.println("marquee "+marquee);
if (marquee!= null)
marquee.mousePressed(e);
super.mousePressed(e);
}*/
else
else
super.mousePressed(e);
}
......@@ -230,28 +224,40 @@ public class FCGraphUI extends BasicGraphUI{
public void mouseReleased(MouseEvent e) {
try {
if (!e.isConsumed()) {
if (handler == marquee)
marquee.mouseReleased(e);
else if (handler == handle && handle != null)
handle.mouseReleased(e);
if (isDescendant(cell, focus) && e.getModifiers() != 0) {
if (!e.isConsumed()) {
if(e.isPopupTrigger())
{
if (marquee!= null)
marquee.mouseReleased(e);
super.mouseReleased(e);
}
else
{
if (handler == marquee)
marquee.mouseReleased(e);
else if (handler == handle && handle != null)
handle.mouseReleased(e);
if (isDescendant(cell, focus) && e.getModifiers() != 0) {
// Do not switch to parent if Special Selection
cell = focus;
}
if (!e.isConsumed() && cell != null) {
Object tmp = cell.getCell();
boolean wasSelected = graph.isCellSelected(tmp);
selectCellForEvent(tmp, e);
focus = cell;
if (wasSelected && graph.isCellSelected(tmp))
{
Object root = ((DefaultMutableTreeNode) tmp).getRoot();
selectCellForEvent(root, e);
focus = graphView.getMapping(root, false);
}
}
}
cell = focus;
}
if (!e.isConsumed() && cell != null) {
Object tmp = cell.getCell();
boolean wasSelected = graph.isCellSelected(tmp);
selectCellForEvent(tmp, e);
focus = cell;
if (wasSelected && graph.isCellSelected(tmp))
{
Object root = ((DefaultMutableTreeNode) tmp).getRoot();
selectCellForEvent(root, e);
focus = graphView.getMapping(root, false);
}
}
}
}
} finally {
insertionLocation = null;
handler = null;
......
/**
* $Id: FCMarqueeHandler.java,v 1.44 2002-07-03 16:31:07 frederic Exp $
* $Id: FCMarqueeHandler.java,v 1.45 2002-07-03 16:35:22 gchomat Exp $
*
* Transmorpher
......@@ -164,9 +164,6 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
}
}
else{
if(currentProcess != null){
if (!e.isConsumed() && !marquee.isSelected()) {
......@@ -231,6 +228,13 @@ public class FCMarqueeHandler extends BasicMarqueeHandler {
current = currentProcess.snap(event.getPoint());
String tmpName,name;
if (event.isPopupTrigger()){
if (!event.isConsumed() && marquee.isSelected()) {
flowcomposer.showPopup(event,flowcomposer.getCurrentProcess().snap(event.getPoint()));
return;
}
}
if(currentProcess != null){
//endCell= currentProcess.getFirstCellForLocation(event.getX(), event.getY());
......
......@@ -2,7 +2,7 @@
<!DOCTYPE transmorpher SYSTEM "http://transmorpher.inrialpes.fr/dtd/transmorpher.dtd">
<transmorpher name="xslt"
version="1.0"
optimized="false"
optimized="true"
xmlns="http://transmorpher.fluxmedia.fr/1.0"
xmlns:regexp="xalan://fr.fluxmedia.transmorpher.regexp.RegularExpression">
......@@ -16,12 +16,8 @@
<apply-external id="AE-2" type="xslt" in="CAE-2-3" out="CS-1-5">
<with-param name="file">/local_home/gchomat/flowcomposer/test/xslt/cvtoxhtml.xsl</with-param>
</apply-external>
<generate id="G-1" type="readfile" out="CAR-0-0">
<with-param name="file"></with-param>
</generate>
<serialize id="S-0" type="writefile" in="CS-0-1">
<with-param name="file"></with-param>
</serialize>
<generate id="G-1" type="readfile" out="CAR-0-0"/>
<serialize id="S-0" type="writefile" in="CS-0-1"/>
<apply-ruleset id="AR-0" ref="" strategy="one-pass/top-down/apply-once" in="CAR-0-0" out="CS-0-1"/>
</main>
......
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