Commit 03583387 authored by Claes Sjofors's avatar Claes Sjofors

Web, open graph from pwg-files as default, methods for pwg-graphs added

parent 5099a6fc
......@@ -2083,6 +2083,9 @@ System.out.println("MainActivity TimerTask " + currentCmn.type());
return gdh.isAuthorized(access);
}
public void openPopupMenu( String object, double x, double y) {
}
public void invalidateView() {
view.invalidate();
}
......
......@@ -147,7 +147,7 @@ public class FlowFrame extends JFrame implements JopUtilityIfc, GdhApplIfc {
URL fileURL = new URL( filename);
InputStream in = fileURL.openStream();
// in = new BufferedInputStream(in);
InputStreamReader r2 = new InputStreamReader(in);
InputStreamReader r2 = new InputStreamReader(in, "ISO-8859-1");
reader = new BufferedReader( r2);
}
catch ( Exception e) {
......
......@@ -283,14 +283,14 @@ public class JopMethods {
CdhrString actionRet = gdh.getObjectInfoString( attr);
if ( actionRet.evenSts()) return;
int idx = actionRet.str.lastIndexOf( '.');
String action;
if ( idx != -1)
action = actionRet.str.substring(0,1).toUpperCase() +
actionRet.str.substring(1, idx);
else
action = actionRet.str.substring(0,1).toUpperCase() +
actionRet.str.substring(1);
if ( actionRet.str.endsWith(".class")) {
int idx = actionRet.str.lastIndexOf( '.');
action = actionRet.str.substring(0,1).toUpperCase() + actionRet.str.substring(1, idx);
}
else {
action = actionRet.str;
}
String instance = null;
attr = xttgraph.str + ".Object";
......
......@@ -38,12 +38,12 @@ public class JopOp {
if ( args.length > 0)
System.out.println("Arg: " + args[0]);
try {
// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
// UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
// UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
System.out.println("setLookAndFeel exception");
// e.printStackTrace();
}
new JopOp();
byte[] buff = new byte[100];
......
......@@ -76,6 +76,9 @@ public class JopSpider {
public void frameClosed( Object utility) {
session.removeUtility( utility);
}
public void openPopupMenu( String object, Object invoker, int x, int y) {
JopSpider.openPopupMenu( session, object, invoker, x, y);
}
}
public JopSpider( int op_qcom_qix) {
......@@ -97,16 +100,12 @@ public class JopSpider {
// Send qcom qix to jop
String set_cmd = "set jop_queid " + qcom_qix;
System.out.println( "qcom put");
PwrtStatus sts = qcom.put( op_qcom_qix, op_qcom_nid, set_cmd);
System.out.println( "qcom put finished");
if ( sts.evenSts())
System.out.println( "Qcom put error: " + sts.getSts());
new JopSpiderCmd( session);
// loadFrame("Frame");
// loadFrame("Frame");
}
static public void setSystemName( String systemName) {
......@@ -116,6 +115,11 @@ System.out.println( "qcom put finished");
return systemName;
}
static void openPopupMenu( JopSession session, String object, Object invoker, int x, int y) {
new JopMethodsMenu( session, object, JopUtility.GRAPH, (Component)invoker, x, y);
}
static CliTable[] cliTable = new CliTable[] {
new CliTable( "OPEN", new String[] {"cli_arg1", "cli_arg2", "/NAME",
"/FILE", "/SCROLLBAR", "/WIDTH", "/HEIGHT", "/MENU", "/NAVIGATOR",
......@@ -202,6 +206,7 @@ System.out.println( "qcom put finished");
boolean scrollbar = cli.qualifierFound("/SCROLLBAR");
if ( cli.qualifierFound("/OBJECT")) {
// XttGraph object
String objectValue = cli.getQualValue("/OBJECT");
String objectName;
String appletName;
......@@ -257,7 +262,7 @@ System.out.println( "qcom put finished");
local_cmd = true;
}
else {
if ( true /* session.isOpWindowApplet() */) {
// No XttGraph
String frameName = null;
String instanceValue = null;
boolean classGraph = false;
......@@ -278,54 +283,25 @@ System.out.println( "qcom put finished");
System.out.println("Syntax error");
return 0;
}
frameName = cli.getQualValue("cli_arg2").toLowerCase();
frameName = frameName.substring(0,1).toUpperCase() +
frameName.substring(1);
System.out.println( "Open frame " + frameName);
}
session.openGraphFrame( frameName, instanceValue, scrollbar, classGraph);
}
/*************
else {
String frameName = null;
if ( ! cli.qualifierFound("cli_arg2")) {
System.out.println("Syntax error");
return 0;
}
frameName = cli.getQualValue("cli_arg2").toLowerCase();
frameName = cli.getQualValue("cli_arg2");
if ( cli.qualifierFound("/INSTANCE")) {
String instanceValue =
cli.getQualValue("/INSTANCE").toLowerCase();
if ( Character.isUpperCase(frameName.charAt(0))) {
// If first char is upper, open as java class
frameName = frameName.toLowerCase();
boolean parent = cli.qualifierFound("/PARENT");
if ( parent) {
int idx = instanceValue.lastIndexOf( '.');
if ( idx != -1 && idx != 0)
instanceValue = instanceValue.substring( 0, idx);
System.out.println( "open graph /parent: " + instanceValue);
}
frameName = frameName.substring(0,1).toUpperCase() +
frameName.substring(1);
String tempFile = frameName + "_" +
instanceValue.replace('','a').replace('','a').replace('','o');
PwrtStatus psts =
gdh.createInstanceFile(
"$pwrp_websrv/"+frameName+".html",
tempFile+".html", instanceValue);
if ( psts.evenSts()) {
System.out.println("createInstanceFile error");
return 0;
}
frameName = tempFile;
else {
// If first char is lower, open as pwg-file
if ( frameName.indexOf(".pwg") == -1)
frameName = frameName + ".pwg";
}
System.out.println( "Loading applet \"" + frameName + "\"");
openURL( session, frameName, newFrame, null, null);
local_cmd = true;
System.out.println( "Open frame " + frameName);
}
***/
session.openGraphFrame( frameName, instanceValue, scrollbar, classGraph);
}
}
else {
......@@ -348,6 +324,7 @@ System.out.println( "qcom put finished");
}
}
if ( cli.qualifierFound("/OBJECT")) {
// XttGraph object
String objectValue = cli.getQualValue("/OBJECT");
String objectName;
String appletName;
......@@ -401,10 +378,20 @@ System.out.println( "qcom put finished");
frameName = frameName + ".pwg";
}
else if ( cli.qualifierFound("cli_arg2")) {
frameName = cli.getQualValue("cli_arg2").toLowerCase();
frameName = cli.getQualValue("cli_arg2");
if ( Character.isUpperCase(frameName.charAt(0))) {
// If first char is upper, open as java class
frameName = frameName.toLowerCase();
frameName = frameName.substring(0,1).toUpperCase() +
frameName.substring(1);
}
else {
// If first char is lower, open as pwg-file
if ( frameName.indexOf(".pwg") == -1)
frameName = frameName + ".pwg";
}
}
else {
System.out.println("Syntax error");
......
......@@ -591,7 +591,7 @@ public class Dyn {
public static final int ePwrStatus_Error = 3;
public static final int ePwrStatus_Fatal = 4;
public static final boolean debug = true;
public static final boolean debug = false;
Vector<DynElem> elements = new Vector<DynElem>();
GraphIfc graph;
......@@ -3204,6 +3204,9 @@ public class Dyn {
if ( token.hasMoreTokens())
attribute = token.nextToken();
break;
case Dyn.eSave_ValueInput_unselect:
unselect = Integer.valueOf(token.nextToken());
break;
case Dyn.eSave_ValueInput_min_value:
min_value = new Double(token.nextToken()).doubleValue();
break;
......@@ -6314,6 +6317,18 @@ public class Dyn {
ref_object = x.ref_object;
}
public int action( GlowArrayElem object, GlowEvent e) {
if ( !dyn.graph.isAuthorized( dyn.access))
return 1;
switch ( e.event) {
case Glow.eEvent_MB3Press:
dyn.graph.openPopupMenu( ref_object, e.x, e.y);
break;
}
return 1;
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
......@@ -7423,9 +7438,8 @@ public class Dyn {
case Glow.eEvent_MB1Click:
if ( (dyn.action_type1 & Dyn.mActionType1_Confirm) != 0)
break;
String command = null;
if ( !graph_object.equals(""))
if ( !(graph_object == null || graph_object.equals("")))
command = new String("open graph/object=" + graph_object);
else {
// Open classgraph for popup menu object
......
......@@ -1498,4 +1498,5 @@ public class Glow {
public static final int eEvent_SliderMoveStart = 11;
public static final int eEvent_SliderMoved = 12;
public static final int eEvent_SliderMoveEnd = 13;
public static final int eEvent_MB3Press = 14;
}
......@@ -343,7 +343,8 @@ public class Graph implements GraphIfc, GrowApplIfc {
while ( (idx = str.indexOf("$object")) != -1) {
if ( appl != null) {
String oname = appl.getObject();
// String oname = appl.getObject();
String oname = cmn.getOwner();
str = str.substring(0, idx) + oname + str.substring(idx+7);
}
}
......@@ -412,6 +413,7 @@ public class Graph implements GraphIfc, GrowApplIfc {
// Note! no break
case Glow.eEvent_MB1Up:
case Glow.eEvent_MB1Down:
case Glow.eEvent_MB3Press:
case Glow.eEvent_ValueChanged:
case Glow.eEvent_SliderMoveStart:
case Glow.eEvent_SliderMoveEnd:
......@@ -492,6 +494,11 @@ public class Graph implements GraphIfc, GrowApplIfc {
appl.openValueInputDialog(dyn, text, object);
}
public void openPopupMenu(String object, double x, double y) {
if ( appl != null)
appl.openPopupMenu(object, x, y);
}
public String get_reference_name(String name) {
// TODO
return null;
......
......@@ -40,6 +40,7 @@ public interface GraphApplIfc {
public int command(String cmd);
public void openConfirmDialog( Object dyn, String text, Object object);
public void openValueInputDialog( Object dyn, String text, Object object);
public void openPopupMenu( String object, double x, double y);
public int getWidth();
public int getHeight();
public String getObject();
......
......@@ -57,6 +57,7 @@ public interface GraphIfc {
public void closeGraph();
public void openConfirmDialog(Object dyn, String text, Object object);
public void openValueInputDialog(Object dyn, String text, Object object);
public void openPopupMenu(String object, double x, double y);
public String get_reference_name(String name);
public Object getCurrentSlider();
public void setCurrentSlider(GrowSlider currentSlider);
......
......@@ -120,7 +120,7 @@ public class GrowCmn {
public GrowCmn( GrowCtxIfc ctx, GrowApplIfc appl) {
this.ctx = ctx;
this.appl = appl;
this.debug = true;
this.debug = false;
this.antiAliasing = true;
mw.window_width = getWidth();
mw.window_height = getHeight();
......@@ -155,4 +155,5 @@ public class GrowCmn {
public int getAppMotion() {
return app_motion;
}
}
......@@ -788,6 +788,12 @@ public class GrowCtx implements GrowCtxIfc {
draw();
}
public void zoomAbsolute( double factor) {
cmn.mw.zoom_factor_x = factor;
cmn.mw.zoom_factor_y = factor;
draw();
}
public void scroll( int delta_x, int delta_y) {
cmn.mw.offset_x += delta_x;
cmn.mw.offset_y += delta_y;
......@@ -837,6 +843,19 @@ public class GrowCtx implements GrowCtxIfc {
public void setSliderActive( boolean active) {
sliderActive = active;
}
public void setDefaultLayout( int width, int height) {
if ( cmn.x0 >= cmn.x1 || cmn.y0 >= cmn.y1)
return;
cmn.mw.zoom_factor_x = Math.min( width/(cmn.x1 - cmn.x0),
height/(cmn.y1 - cmn.y0));
cmn.mw.zoom_factor_y = cmn.mw.zoom_factor_x;
cmn.mw.offset_x = (int)(cmn.x0 * cmn.mw.zoom_factor_x);
cmn.mw.offset_y = (int)(cmn.y0 * cmn.mw.zoom_factor_y);
draw();
}
}
......
......@@ -49,6 +49,8 @@ import java.net.*;
import java.applet.*;
public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
static final int BORDER_WIDTH = 5;
static final int BORDER_HEIGHT = 40;
JScrollPane scrollPane;
JPanel contentPane;
LocalPanel localPanel = new LocalPanel();
......@@ -72,6 +74,13 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
String instance;
GrowFrameApplIfc appl;
GrowFrame frame;
boolean drawn = false;
double baseZoomFactor = 0;
int defaultWidth = 0;
int defaultHeight = 0;
double aspectRatio = 0;
Dimension prevSize;
int skipResize = 0;
public GrowFrame( String file, Gdh gdh, String instance, GrowFrameApplIfc appl, Object root) {
this.root = root;
......@@ -113,13 +122,12 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
URL fileURL = new URL( filename);
InputStream in = fileURL.openStream();
// in = new BufferedInputStream(in);
InputStreamReader r2 = new InputStreamReader(in);
InputStreamReader r2 = new InputStreamReader(in, "ISO-8859-1");
reader = new BufferedReader( r2);
// Read size info
reader.mark(1000);
String line;
int defaultWidth = 0;
int defaultHeight = 0;
try {
for ( int i = 0; i < 2; i++) {
......@@ -136,16 +144,27 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
}
System.out.println("GraphFrame size " + defaultWidth + " " + defaultHeight);
if ( defaultWidth != 0 && defaultHeight != 0) {
size = new Dimension( defaultWidth + 5, defaultHeight + 40);
size = new Dimension( defaultWidth + BORDER_WIDTH, defaultHeight + BORDER_HEIGHT);
System.out.println("defaultWidth: " + defaultWidth + " defaultHeight " + defaultHeight);
setSize( size);
aspectRatio = (double)defaultWidth/defaultHeight;
prevSize = new Dimension(defaultWidth, defaultHeight);
}
else {
reader.reset();
/* reader.close();
InputStream in3 = fileURL.openStream();
InputStreamReader r3 = new InputStreamReader(in, "ISO-8859-1");
reader = new BufferedReader( r3);
*/
}
}
catch ( Exception e) {
System.out.println( "Unable to open file");
}
}
else {
// Not applet
if ( fname.lastIndexOf('/') == -1) {
if ( fname.startsWith("pwr_c_"))
filename = "$pwr_exe/" + fname;
......@@ -158,7 +177,7 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
System.out.println( "Fname: " + filename);
try {
reader = new BufferedReader(new FileReader(filename));
reader = new BufferedReader( new InputStreamReader(new FileInputStream(filename), "ISO-8859-1"));
}
catch ( Exception e) {
System.out.println( "Unable to open file " + filename);
......@@ -166,10 +185,9 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
}
// Read size info
String line;
int defaultWidth = 0;
int defaultHeight = 0;
try {
reader.mark(1000);
for ( int i = 0; i < 2; i++) {
line = reader.readLine();
if ( line == null || !line.startsWith("0! "))
......@@ -186,6 +204,22 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
if ( defaultWidth != 0 && defaultHeight != 0) {
size = new Dimension( defaultWidth + 5, defaultHeight + 40);
setSize( size);
aspectRatio = (double)defaultWidth/defaultHeight;
prevSize = new Dimension(defaultWidth, defaultHeight);
}
else {
try {
reader.reset();
/*
reader.close();
reader = new BufferedReader( new InputStreamReader(new FileInputStream(filename), "ISO-8859-1"));
*/
}
catch ( Exception e) {
System.out.println( "Unable to open file " + filename);
return;
}
}
}
......@@ -196,32 +230,60 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
graph.setOwner( instance);
graph.open(reader);
System.out.println("After open " + defaultWidth + " " + defaultHeight);
if ( defaultWidth == 0 || defaultHeight == 0)
setSize();
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
setDefaultCloseOperation( DISPOSE_ON_CLOSE);
MouseAdapter adapter = new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
System.out.println("GrowFrame click " + e.getModifiers() + " " + MouseEvent.BUTTON1_MASK);
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
System.out.println("GrowFrame click MB1" + e.getModifiers() + " " + MouseEvent.BUTTON1_MASK);
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB1Click;
graph.ctx.eventHandler( event);
}
else if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0) {
System.out.println("GrowFrame click MB3" + e.getModifiers() + " " + MouseEvent.BUTTON3_MASK);
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB3Press;
graph.ctx.eventHandler( event);
}
}
public void mousePressed(MouseEvent e) {
/*
if ( e.isPopupTrigger()) {
System.out.println("GrowFrame MB3");
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB3Press;
graph.ctx.eventHandler( event);
}
else */ if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB1Down;
graph.ctx.eventHandler( event);
}
}
public void mouseReleased(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB1Up;
graph.ctx.eventHandler( event);
}
}
public void mouseMoved(MouseEvent e) {
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
......@@ -238,6 +300,35 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
}
};
this.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent e) {
if ( drawn && aspectRatio != 0) {
int w = getWidth() - BORDER_WIDTH;
int h = getHeight() - BORDER_HEIGHT;
if ( skipResize > 0) {
skipResize--;
prevSize = new Dimension(w,h);
graph.ctx.setDefaultLayout( w, h);
return;
}
double ratio = (double)w/h;
if ( (w > 400 && Math.abs(ratio - aspectRatio) > 0.05) ||
(w > 200 && w <= 400 && Math.abs(ratio - aspectRatio) > 0.10) ||
(w <= 200 && Math.abs(ratio - aspectRatio) > 0.15)) {
h = (int) ((double)w/aspectRatio);
prevSize = new Dimension(w,h);
setSize(w + BORDER_WIDTH,h + BORDER_HEIGHT);
skipResize = 1;
}
graph.ctx.setDefaultLayout( w, h);
}
}
});
localPanel.addMouseListener(adapter);
localPanel.addMouseMotionListener(adapter);
......@@ -245,7 +336,6 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
timer.start();
}
public int getWidth() {
return localPanel.getWidth() + 5;
}
......@@ -282,6 +372,7 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
graph.gdraw.setGraphics(g2);
graph.ctx.draw();
drawn = true;
}
}
......@@ -472,6 +563,14 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
}
}
public void openPopupMenu( String object, double x, double y) {
if ( appl != null) {
appl.openPopupMenu( object, this,
(int)(x * graph.ctx.cmn.mw.zoom_factor_x - graph.ctx.cmn.mw.offset_x),
(int)(y * graph.ctx.cmn.mw.zoom_factor_y - graph.ctx.cmn.mw.offset_y));
}
}
public String getObject() {
return instance;
}
......@@ -490,12 +589,17 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
if ( idx2 > idx)
idx = idx2;
String path = current_str.substring(0,idx + 1);
idx = fname.indexOf('/');
if ( idx != -1)
fname = fname.substring(idx);
filename = path + fname;
System.out.println( "Opening file " + filename);
URL fileURL = new URL( filename);
InputStream in = fileURL.openStream();
// in = new BufferedInputStream(in);
InputStreamReader r2 = new InputStreamReader(in);
InputStreamReader r2 = new InputStreamReader(in, "ISO-8859-1");
reader = new BufferedReader( r2);
}
catch ( Exception e) {
......@@ -515,7 +619,8 @@ public class GrowFrame extends JFrame implements GraphApplIfc, ActionListener {
System.out.println( "Fname: " + filename);
try {
reader = new BufferedReader(new FileReader(filename));
//reader = new BufferedReader(new FileReader(filename));
reader = new BufferedReader( new InputStreamReader(new FileInputStream(filename), "ISO-8859-1"));
}
catch ( Exception e) {
System.out.println( "Unable to open file " + filename);
......
......@@ -40,4 +40,5 @@ package jpwr.jopg;
public interface GrowFrameApplIfc {
public int command(String cmd);
public void frameClosed( Object utility);
public void openPopupMenu( String object, Object invoker, int x, int y);
}
......@@ -450,6 +450,8 @@ public class GrowWindow extends GrowRect implements GrowScrollBarIfc {
v_value = wctx_y0 * windowCmn.mw.subwindow_scale;
}
}
else
v_value = wctx_y0 * windowCmn.mw.subwindow_scale;
if ( horizontal_scrollbar != 0 && h_scrollbar == null) {
x0 = x_left;
......@@ -479,6 +481,9 @@ public class GrowWindow extends GrowRect implements GrowScrollBarIfc {
h_value = wctx_x0 * windowCmn.mw.subwindow_scale;
}
}
else
h_value = wctx_x0 * windowCmn.mw.subwindow_scale;
}
public void verticalScrollValueChanged(double value) {
......
!
! 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.
!
! pwrb_c_appgraph.wb_load -- Defines the class AppGraph.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Summary Defines a link in an android application.
! Defines a link in an android application.
! AppLink objects should be positioned as children to a WebHandler object.
!
!
! @b See also
! @classlink WebHandler pwrb_webhandler.html
!*/
Object AppLink $ClassDef 616
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
Attr PopEditor = 1
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "AppLink"
EndBody
!/**
! The URL.
!*/
Object URL $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$URL"
EndBody
EndObject
!/**
! Icon text for the link.
!*/
Object Text $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Icon image for the link.
! The default location is $pwrp_exe.
!*/
Object Image $Attribute 3
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
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