Commit fab3b832 authored by Claes Sjofors's avatar Claes Sjofors

Java pwg ConPoint on graph level aborted

parent d74de3a8
......@@ -46,6 +46,7 @@ extern_java_sources := \
GrowPolyline.java,\
GrowText.java,\
GrowAnnot.java,\
GrowConPoint.java,\
GrowMenu.java,\
GrowBar.java,\
GrowTrend.java,\
......
......@@ -1564,8 +1564,8 @@ public class Dyn {
else {
if ( !value)
object.setFillColor( color);
else
object.resetFillColor();
else
object.resetFillColor();
dyn.repaintNow = true;
}
oldValue = value;
......@@ -2760,8 +2760,10 @@ public class Dyn {
break;
}
if ( value0 != oldValueF || firstScan) {
sb = cFormat.format( value0, sb);
object.setAnnotation(1, new String(sb));
if ( cFormat != null) {
sb = cFormat.format( value0, sb);
object.setAnnotation(1, new String(sb));
}
dyn.repaintNow = true;
oldValueF = value0;
}
......
......@@ -183,6 +183,12 @@ public class GlowVector {
a.add( c);
break;
}
case Glow.eSave_GrowConPoint: {
GrowConPoint c = new GrowConPoint( cmn);
c.open( reader);
a.add( c);
break;
}
case Glow.eSave_GrowAnnot: {
GrowAnnot c = new GrowAnnot( cmn);
c.open( reader);
......
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
package jpwr.jopg;
import jpwr.rt.*;
import java.io.*;
import java.util.*;
public class GrowConPoint extends GlowConPoint {
GrowCmn cmn;
String n_name;
double x_right;
double x_left;
double y_high;
double y_low;
GlowArc arc;
public GrowConPoint(GrowCmn cmn) {
super(cmn);
this.cmn = cmn;
arc = new GlowArc(cmn);
}
public int type() {
return Glow.eObjectType_GrowConPoint;
}
public void open(BufferedReader reader) {
String line;
StringTokenizer token;
boolean end_found = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = Integer.valueOf(token.nextToken());
if ( cmn.debug) System.out.println( "GrowLine : " + line);
switch ( key) {
case Glow.eSave_GrowConPoint:
break;
case Glow.eSave_GrowConPoint_n_name:
if ( token.hasMoreTokens())
n_name = token.nextToken();
break;
case Glow.eSave_GrowConPoint_x_right:
x_right = new Double(token.nextToken()).doubleValue();
break;
case Glow.eSave_GrowConPoint_x_left:
x_left = new Double(token.nextToken()).doubleValue();
break;
case Glow.eSave_GrowConPoint_y_high:
y_high = new Double(token.nextToken()).doubleValue();
break;
case Glow.eSave_GrowConPoint_y_low:
y_low = new Double(token.nextToken()).doubleValue();
break;
case Glow.eSave_GrowConPoint_conpoint_part:
super.open( reader);
break;
case Glow.eSave_GrowConPoint_arc:
arc.open( reader);
break;
case Glow.eSave_End:
end_found = true;
break;
default:
System.out.println( "Syntax error in GrowConPoint");
break;
}
if ( end_found)
break;
}
} catch ( Exception e) {
System.out.println( "IOException GrowConPoint");
}
}
public int eventHandler( GlowEvent event, double fx, double fy) {
return 0;
}
public void draw() {
}
public void draw(GlowTransform t, int highlight, int hot, Object node, Object colornode) {
}
public String getName() {
return n_name;
}
}
......@@ -47,6 +47,7 @@ local_java_sources := \
GrowPolyline.java,\
GrowText.java,\
GrowAnnot.java,\
GrowConPoint.java,\
GrowMenu.java,\
GrowBar.java,\
GrowTrend.java,\
......
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