Commit a81bea9d authored by claes's avatar claes

Java classgraphs implemented

parent 67f74b70
...@@ -1334,14 +1334,12 @@ static void ge_activate_export_javabean( Widget w, ge_tCtx gectx, XmAnyCallbackS ...@@ -1334,14 +1334,12 @@ static void ge_activate_export_javabean( Widget w, ge_tCtx gectx, XmAnyCallbackS
gectx->graph->get_name( name); gectx->graph->get_name( name);
if ( strcmp( name, "") != 0) if ( strcmp( name, "") != 0)
{ {
if ( strncmp( name, "pwr_", 4) == 0) if ( strncmp( name, "pwr_", 4) == 0) {
{
strcpy( default_name, "Jop"); strcpy( default_name, "Jop");
strcat( default_name, &name[4]); strcat( default_name, &name[4]);
default_name[3] = _toupper( default_name[3]); default_name[3] = _toupper( default_name[3]);
} }
else else {
{
strcpy( default_name, name); strcpy( default_name, name);
default_name[0] = _toupper( default_name[0]); default_name[0] = _toupper( default_name[0]);
} }
...@@ -1370,14 +1368,12 @@ static void ge_activate_export_javabean_as( Widget w, ge_tCtx gectx, XmAnyCallba ...@@ -1370,14 +1368,12 @@ static void ge_activate_export_javabean_as( Widget w, ge_tCtx gectx, XmAnyCallba
gectx->graph->get_name( name); gectx->graph->get_name( name);
if ( strcmp( name, "") != 0) if ( strcmp( name, "") != 0)
{ {
if ( strncmp( name, "pwr_", 4) == 0) if ( strncmp( name, "pwr_", 4) == 0) {
{
strcpy( default_name, "Jop"); strcpy( default_name, "Jop");
strcat( default_name, &name[4]); strcat( default_name, &name[4]);
default_name[3] = _toupper( default_name[3]); default_name[3] = _toupper( default_name[3]);
} }
else else {
{
strcpy( default_name, name); strcpy( default_name, name);
default_name[0] = _toupper( default_name[0]); default_name[0] = _toupper( default_name[0]);
} }
...@@ -1406,7 +1402,12 @@ static void ge_activate_export_gejava( Widget w, ge_tCtx gectx, XmAnyCallbackStr ...@@ -1406,7 +1402,12 @@ static void ge_activate_export_gejava( Widget w, ge_tCtx gectx, XmAnyCallbackStr
gectx->graph->get_name( name); gectx->graph->get_name( name);
if ( strcmp( name, "") != 0) if ( strcmp( name, "") != 0)
{ {
if ( strncmp( name, "pwr_", 4) == 0) if ( strncmp( name, "pwr_c_", 6) == 0) {
strcpy( default_name, "Jopc");
strcat( default_name, &name[6]);
default_name[4] = _toupper( default_name[4]);
}
else if ( strncmp( name, "pwr_", 4) == 0)
{ {
strcpy( default_name, "Jop"); strcpy( default_name, "Jop");
strcat( default_name, &name[4]); strcat( default_name, &name[4]);
...@@ -1437,7 +1438,12 @@ static void ge_activate_export_gejava_as( Widget w, ge_tCtx gectx, XmAnyCallback ...@@ -1437,7 +1438,12 @@ static void ge_activate_export_gejava_as( Widget w, ge_tCtx gectx, XmAnyCallback
gectx->graph->get_name( name); gectx->graph->get_name( name);
if ( strcmp( name, "") != 0) if ( strcmp( name, "") != 0)
{ {
if ( strncmp( name, "pwr_", 4) == 0) if ( strncmp( name, "pwr_c_", 6) == 0) {
strcpy( default_name, "Jopc");
strcat( default_name, &name[6]);
default_name[4] = _toupper( default_name[4]);
}
else if ( strncmp( name, "pwr_", 4) == 0)
{ {
strcpy( default_name, "Jop"); strcpy( default_name, "Jop");
strcat( default_name, &name[4]); strcat( default_name, &name[4]);
......
...@@ -1380,7 +1380,7 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass) ...@@ -1380,7 +1380,7 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass)
if ( dyn_action_type & ge_mActionType_ValueInput) { if ( dyn_action_type & ge_mActionType_ValueInput) {
fp << fp <<
"private class " << bean_name << " extends GeTextField {" << endl << "protected class " << bean_name << " extends GeTextField {" << endl <<
" public " << bean_name << "( JopSession session)" << endl << " public " << bean_name << "( JopSession session)" << endl <<
" {" << endl << " {" << endl <<
" super( session);" << endl << " super( session);" << endl <<
...@@ -1413,7 +1413,7 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass) ...@@ -1413,7 +1413,7 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass)
{ {
// Use prefabricated class GeFrameThin // Use prefabricated class GeFrameThin
fp << fp <<
"private class " << bean_name << " extends GeFrameThin {" << endl << "protected class " << bean_name << " extends GeFrameThin {" << endl <<
" public " << bean_name << "( JopSession session)" << endl << " public " << bean_name << "( JopSession session)" << endl <<
" {" << endl << " {" << endl <<
" super(session);" << endl << " super(session);" << endl <<
...@@ -1425,10 +1425,10 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass) ...@@ -1425,10 +1425,10 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass)
{ {
// if ( grow_IsSliderClass( nodeclass)) // if ( grow_IsSliderClass( nodeclass))
// fp << // fp <<
//"private class " << bean_name << " extends GeSlider {" << endl; //"protected class " << bean_name << " extends GeSlider {" << endl;
// else // else
fp << fp <<
"private class " << bean_name << " extends GeComponent {" << endl; "protected class " << bean_name << " extends GeComponent {" << endl;
fp << fp <<
" Dimension size;" << endl; " Dimension size;" << endl;
...@@ -1668,13 +1668,13 @@ int Graph::export_javaframe( char *filename, char *bean_name, int applet, ...@@ -1668,13 +1668,13 @@ int Graph::export_javaframe( char *filename, char *bean_name, int applet,
" codebase=\"" << codebase << "\">" << endl << " codebase=\"" << codebase << "\">" << endl <<
" <PARAM NAME = CODE VALUE = " << bean_name << "_A.class >" << endl << " <PARAM NAME = CODE VALUE = " << bean_name << "_A.class >" << endl <<
" <PARAM NAME =\"archive\" VALUE =\"pwrp_" << systemname << "_web.jar," << " <PARAM NAME =\"archive\" VALUE =\"pwrp_" << systemname << "_web.jar," <<
"pwr_rt_client.jar,pwr_jop.jar\">" << endl << "pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar\">" << endl <<
" <PARAM NAME=\"type\" VALUE=\"application/x-java-applet;version=1.3\">" << endl << " <PARAM NAME=\"type\" VALUE=\"application/x-java-applet;version=1.3\">" << endl <<
" <PARAM NAME=\"scriptable\" VALUE=\"false\">" << endl << " <PARAM NAME=\"scriptable\" VALUE=\"false\">" << endl <<
" <PARAM NAME=\"instance\" VALUE=\"\">" << endl << " <PARAM NAME=\"instance\" VALUE=\"\">" << endl <<
" <embed type=\"application/x-java-applet;version=1.3\"" << endl << " <embed type=\"application/x-java-applet;version=1.3\"" << endl <<
" code = " << bean_name << "_A.class" << endl << " code = " << bean_name << "_A.class" << endl <<
" archive =\"pwrp_" << systemname << "_web.jar," <<"pwr_rt_client.jar,pwr_jop.jar\"" << endl << " archive =\"pwrp_" << systemname << "_web.jar," <<"pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar\"" << endl <<
" width=" << int(x1-x0) + 2*glow_cJBean_Offset << endl << " width=" << int(x1-x0) + 2*glow_cJBean_Offset << endl <<
" height=" << int(y1-y0) + 2*glow_cJBean_Offset << ">" << endl << " height=" << int(y1-y0) + 2*glow_cJBean_Offset << ">" << endl <<
" height=" << int(y1-y0) + 2*glow_cJBean_Offset << endl << " height=" << int(y1-y0) + 2*glow_cJBean_Offset << endl <<
...@@ -1705,6 +1705,9 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1705,6 +1705,9 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
int bg_image_width; int bg_image_width;
int bg_image_height; int bg_image_height;
int sts; int sts;
int baseclass;
baseclass = (strncmp( filename, "Jopc", 4) == 0);
grow_GetBackgroundImage( grow->ctx, background_image, &background_tiled); grow_GetBackgroundImage( grow->ctx, background_image, &background_tiled);
if ( strcmp( background_image, "") != 0) if ( strcmp( background_image, "") != 0)
...@@ -1714,7 +1717,11 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1714,7 +1717,11 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
strcpy( background_image, ""); strcpy( background_image, "");
} }
if ( !strchr( filename, ':') && !strchr( filename, '/')) if ( baseclass) {
strcpy( fname, "$pwre_sroot/jpwr/jopc/src/");
strcat( fname, filename);
}
else if ( !strchr( filename, ':') && !strchr( filename, '/'))
{ {
strcpy( fname, default_path); strcpy( fname, default_path);
strcat( fname, filename); strcat( fname, filename);
...@@ -1736,6 +1743,9 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1736,6 +1743,9 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
fp.open( fname); fp.open( fname);
if ( baseclass)
fp << "package jpwr.jopc;" << endl;
fp << fp <<
"import jpwr.rt.*;" << endl << "import jpwr.rt.*;" << endl <<
"import jpwr.jop.*;" << endl << "import jpwr.jop.*;" << endl <<
...@@ -1755,6 +1765,7 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1755,6 +1765,7 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
" JPanel contentPane;" << endl << " JPanel contentPane;" << endl <<
" BorderLayout borderLayout1 = new BorderLayout();" << endl << " BorderLayout borderLayout1 = new BorderLayout();" << endl <<
" LocalPanel localPanel = new LocalPanel();" << endl << " LocalPanel localPanel = new LocalPanel();" << endl <<
" boolean scrollbar = false;" << endl <<
" Dimension size;" << endl; " Dimension size;" << endl;
// Declarations of components // Declarations of components
...@@ -1765,20 +1776,34 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1765,20 +1776,34 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
fp << fp <<
" public " << bean_name << "() {}" << endl << " public " << bean_name << "() {}" << endl <<
" public void init() {" << endl << " public void init() {" << endl <<
" super.init();" << endl; " super.init();" << endl <<
" geInit();" << endl <<
" }" << endl;
} }
else else
{ {
fp << fp <<
" public " << bean_name << "( JopSession session, String instance, boolean scrollbar) {" << endl << " public " << bean_name << "( JopSession session, String instance, boolean scrollbar) {" << endl <<
" super( session, instance);" << endl; " super( session, instance);" << endl <<
" this.scrollbar = scrollbar;" << endl <<
" geInit();" << endl <<
" }" << endl <<
" public " << bean_name << "( JopSession session, String instance, boolean scrollbar, boolean noinit) {" << endl <<
" super( session, instance);" << endl <<
" this.scrollbar = scrollbar;" << endl <<
" if ( !noinit)" << endl <<
" geInit();" << endl <<
" }" << endl;
} }
fp << fp <<
" public void geInit() {" << endl <<
" JopSpider.setSystemName( \"" << systemname << "\");" << endl << " JopSpider.setSystemName( \"" << systemname << "\");" << endl <<
" engine.setAnimationScanTime( " << int(animation_scan_time * 1000) << ");" << endl << " engine.setAnimationScanTime( " << int(animation_scan_time * 1000) << ");" << endl <<
" engine.setScanTime( " << int(scan_time * 1000) << ");" << endl << " engine.setScanTime( " << int(scan_time * 1000) << ");" << endl <<
" size = new Dimension( " << int(x1-x0) + 2*glow_cJBean_Offset + cFrameBorderX << ", " << int(y1-y0) + 2*glow_cJBean_Offset + cFrameBorderY << ");" << endl << " size = new Dimension( " << int(x1-x0) + 2*glow_cJBean_Offset + cFrameBorderX << ", " << int(y1-y0) + 2*glow_cJBean_Offset + cFrameBorderY << ");" << endl <<
" Dimension dsize = new Dimension(localPanel.original_width,localPanel.original_height);" << endl <<
" this.addComponentListener(new AspectRatioListener(this,size));" << endl <<
" contentPane = (JPanel) this.getContentPane();" << endl << " contentPane = (JPanel) this.getContentPane();" << endl <<
" contentPane.setLayout(borderLayout1);" << endl; " contentPane.setLayout(borderLayout1);" << endl;
if ( applet) { if ( applet) {
...@@ -1794,7 +1819,7 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1794,7 +1819,7 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
} }
fp << fp <<
" contentPane.setOpaque(true);" << endl << " contentPane.setOpaque(true);" << endl <<
" localPanel.setLayout(null /* xxx new RatioLayout()*/);" << endl << " localPanel.setLayout( new RatioLayout()); // scaletest" << endl <<
" localPanel.setOpaque(true);" << endl; " localPanel.setOpaque(true);" << endl;
if ( background_color != glow_eDrawType_LineErase) if ( background_color != glow_eDrawType_LineErase)
fp << fp <<
...@@ -1803,7 +1828,10 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1803,7 +1828,10 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
if ( !applet) if ( !applet)
fp << fp <<
" this.setSize(size);" << endl << " this.setSize(size);" << endl <<
" this.setTitle(\"" << bean_name << "\");" << endl; " if ( engine.isInstance())" << endl <<
" setTitle( engine.getInstance());" << endl <<
" else" << endl <<
" this.setTitle(\"" << bean_name << "\");" << endl;
// Set drawing attributes of components // Set drawing attributes of components
grow_ExportJavaBean( grow->ctx, fp, 2); grow_ExportJavaBean( grow->ctx, fp, 2);
...@@ -1916,13 +1944,13 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html) ...@@ -1916,13 +1944,13 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
" codebase=\"" << codebase << "\">" << endl << " codebase=\"" << codebase << "\">" << endl <<
" <PARAM NAME = CODE VALUE = " << bean_name << "_A.class >" << endl << " <PARAM NAME = CODE VALUE = " << bean_name << "_A.class >" << endl <<
" <PARAM NAME =\"archive\" VALUE =\"pwrp_" << systemname << "_web.jar," << " <PARAM NAME =\"archive\" VALUE =\"pwrp_" << systemname << "_web.jar," <<
"pwr_rt_client.jar,pwr_jop.jar\">" << endl << "pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar\">" << endl <<
" <PARAM NAME=\"type\" VALUE=\"application/x-java-applet;version=1.3\">" << endl << " <PARAM NAME=\"type\" VALUE=\"application/x-java-applet;version=1.3\">" << endl <<
" <PARAM NAME=\"scriptable\" VALUE=\"false\">" << endl << " <PARAM NAME=\"scriptable\" VALUE=\"false\">" << endl <<
" <PARAM NAME=\"instance\" VALUE=\"\">" << endl << " <PARAM NAME=\"instance\" VALUE=\"\">" << endl <<
" <embed type=\"application/x-java-applet;version=1.3\"" << endl << " <embed type=\"application/x-java-applet;version=1.3\"" << endl <<
" code = " << bean_name << "_A.class" << endl << " code = " << bean_name << "_A.class" << endl <<
" archive =\"pwrp_" << systemname << "_web.jar," <<"pwr_rt_client.jar,pwr_jop.jar\"" << endl << " archive =\"pwrp_" << systemname << "_web.jar," <<"pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar\"" << endl <<
" width=" << int(x1-x0) + 2*glow_cJBean_Offset << endl << " width=" << int(x1-x0) + 2*glow_cJBean_Offset << endl <<
" height=" << int(y1-y0) + 2*glow_cJBean_Offset << endl << " height=" << int(y1-y0) + 2*glow_cJBean_Offset << endl <<
" instance=\"\">" << endl << " instance=\"\">" << endl <<
......
...@@ -253,7 +253,7 @@ int Graph::generate_web( ldh_tSesContext ldhses) ...@@ -253,7 +253,7 @@ int Graph::generate_web( ldh_tSesContext ldhses)
" <object classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" << endl << " <object classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" << endl <<
" width=300 height=120 codebase=\"" << codebase << "\">" << endl << " width=300 height=120 codebase=\"" << codebase << "\">" << endl <<
" <param name = code value=jpwr.jop.JopLoginApplet.class >" << endl << " <param name = code value=jpwr.jop.JopLoginApplet.class >" << endl <<
" <param name =\"archive\" value=\"pwr_rt_client.jar,pwr_jop.jar\">" << endl << " <param name =\"archive\" value=\"pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar\">" << endl <<
" <param name=\"type\" value=\"application/x-java-applet;version=1.3\">" << endl << " <param name=\"type\" value=\"application/x-java-applet;version=1.3\">" << endl <<
" <param name=\"scriptable\" value=\"false\">" << endl << " <param name=\"scriptable\" value=\"false\">" << endl <<
" </body>" << endl << " </body>" << endl <<
...@@ -478,12 +478,12 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20 ...@@ -478,12 +478,12 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
" <object classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" << endl << " <object classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"" << endl <<
" width=100% height=100% codebase=\"" << codebase << "\">" << endl << " width=100% height=100% codebase=\"" << codebase << "\">" << endl <<
" <param name = code value=jpwr.jop.JopOpWindowApplet.class >" << endl << " <param name = code value=jpwr.jop.JopOpWindowApplet.class >" << endl <<
" <param name =\"archive\" value=\"pwr_rt_client.jar,pwr_jop.jar,pwrp_" << sname << "_web.jar\">" << endl << " <param name =\"archive\" value=\"pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar,pwrp_" << sname << "_web.jar\">" << endl <<
" <param name=\"type\" value=\"application/x-java-applet;version=1.3\">" << endl << " <param name=\"type\" value=\"application/x-java-applet;version=1.3\">" << endl <<
" <param name=\"scriptable\" value=\"false\">" << endl << " <param name=\"scriptable\" value=\"false\">" << endl <<
" <embed type=\"application/x-java-applet;version=1.4\" " << endl << " <embed type=\"application/x-java-applet;version=1.4\" " << endl <<
" code = jpwr.jop.JopOpWindowApplet.class " << endl << " code = jpwr.jop.JopOpWindowApplet.class " << endl <<
" archive=\"pwr_jop.jar,pwr_rt_client.jar,pwrp_" << sname << "_web.jar\" " << endl << " archive=\"pwr_jop.jar,pwr_jopc.jar,pwr_rt_client.jar,pwrp_" << sname << "_web.jar\" " << endl <<
" width = 100% height = 100% scriptable=false " << endl << " width = 100% height = 100% scriptable=false " << endl <<
" pluginspage=\"http://java.sun.com/products/plugin/index.html#download\">" << endl << " pluginspage=\"http://java.sun.com/products/plugin/index.html#download\">" << endl <<
" </body>" << endl << " </body>" << endl <<
......
...@@ -749,6 +749,9 @@ void GlowCtx::nav_draw( int ll_x, int ll_y, int ur_x, int ur_y) ...@@ -749,6 +749,9 @@ void GlowCtx::nav_draw( int ll_x, int ll_y, int ur_x, int ur_y)
{ {
int i; int i;
if ( no_nav)
return;
if ( ll_x == ur_x) if ( ll_x == ur_x)
return; return;
......
...@@ -88,8 +88,8 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp) ...@@ -88,8 +88,8 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp)
" public int getBorderColor() {" << endl << " public int getBorderColor() {" << endl <<
" return borderColor;" << endl << " return borderColor;" << endl <<
" }" << endl << " }" << endl <<
" int original_width = " << int( dim_x1 - dim_x0) + 2 * glow_cJBean_Offset << ";" << endl << " public int original_width = " << int( dim_x1 - dim_x0) + 2 * glow_cJBean_Offset << ";" << endl <<
" int original_height = " << int( dim_y1 - dim_y0) + 2 * glow_cJBean_Offset<< ";" << endl << " public int original_height = " << int( dim_y1 - dim_y0) + 2 * glow_cJBean_Offset<< ";" << endl <<
" double rotate;" << endl << " double rotate;" << endl <<
" public void setRotate( double rotate) {" << endl << " public void setRotate( double rotate) {" << endl <<
" if ( rotate < 0)" << endl << " if ( rotate < 0)" << endl <<
...@@ -169,7 +169,7 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp) ...@@ -169,7 +169,7 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp)
" AffineTransform save = g.getTransform();" << endl << " AffineTransform save = g.getTransform();" << endl <<
" g.setColor(getBackground());" << endl << " g.setColor(getBackground());" << endl <<
" g.fill(new Rectangle(0,0,getWidth(),getHeight()));" << endl << " g.fill(new Rectangle(0,0,getWidth(),getHeight()));" << endl <<
" // xxx g.transform( AffineTransform.getScaleInstance( scaleWidth, scaleHeight));" << endl << " g.transform( AffineTransform.getScaleInstance( scaleWidth, scaleHeight)); // scaletest" << endl <<
" AffineTransform save_tmp;" << endl; " AffineTransform save_tmp;" << endl;
if ( strcmp( ((GrowCtx *)ctx)->background_image, "") != 0) if ( strcmp( ((GrowCtx *)ctx)->background_image, "") != 0)
{ {
...@@ -214,8 +214,8 @@ void GlowExportJBean::nodeclass( GlowNodeClass *nc, glow_eExportPass pass, ...@@ -214,8 +214,8 @@ void GlowExportJBean::nodeclass( GlowNodeClass *nc, glow_eExportPass pass,
{ {
fp << fp <<
" int original_width = " << int( dim_x1 - dim_x0) + 2 * glow_cJBean_Offset << ";" << endl << " public int original_width = " << int( dim_x1 - dim_x0) + 2 * glow_cJBean_Offset << ";" << endl <<
" int original_height = " << int( dim_y1 - dim_y0) + 2 * glow_cJBean_Offset << ";" << endl << " public int original_height = " << int( dim_y1 - dim_y0) + 2 * glow_cJBean_Offset << ";" << endl <<
" Shape[] shapes = new Shape[] { " << endl; " Shape[] shapes = new Shape[] { " << endl;
} }
else else
...@@ -1483,7 +1483,7 @@ void GlowExportJBean::node( double x1, double y1, double x2, double y2, ...@@ -1483,7 +1483,7 @@ void GlowExportJBean::node( double x1, double y1, double x2, double y2,
" add(" << var_name << ");" << endl; " add(" << var_name << ");" << endl;
else else
fp << fp <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
...@@ -1580,7 +1580,7 @@ void GlowExportJBean::image( double x1, double y1, double x2, double y2, ...@@ -1580,7 +1580,7 @@ void GlowExportJBean::image( double x1, double y1, double x2, double y2,
" add(" << var_name << ");" << endl; " add(" << var_name << ");" << endl;
else else
fp << fp <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
...@@ -1678,7 +1678,7 @@ void GlowExportJBean::bar( double x1, double y1, double x2, double y2, ...@@ -1678,7 +1678,7 @@ void GlowExportJBean::bar( double x1, double y1, double x2, double y2,
" add(" << var_name << ");" << endl; " add(" << var_name << ");" << endl;
else else
fp << fp <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
case glow_eExportPass_Draw: case glow_eExportPass_Draw:
...@@ -1782,7 +1782,7 @@ void GlowExportJBean::trend( double x1, double y1, double x2, double y2, ...@@ -1782,7 +1782,7 @@ void GlowExportJBean::trend( double x1, double y1, double x2, double y2,
" add(" << var_name << ");" << endl; " add(" << var_name << ");" << endl;
else else
fp << fp <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
case glow_eExportPass_Draw: case glow_eExportPass_Draw:
...@@ -1891,7 +1891,7 @@ void GlowExportJBean::axis( double x1, double y1, double x2, double y2, ...@@ -1891,7 +1891,7 @@ void GlowExportJBean::axis( double x1, double y1, double x2, double y2,
" add(" << var_name << ");" << endl; " add(" << var_name << ");" << endl;
else else
fp << fp <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
case glow_eExportPass_Draw: case glow_eExportPass_Draw:
...@@ -1946,7 +1946,7 @@ void GlowExportJBean::window( double x1, double y1, double x2, double y2, ...@@ -1946,7 +1946,7 @@ void GlowExportJBean::window( double x1, double y1, double x2, double y2,
(int)(y1 - dim_y0 /* - glow_cJBean_Offset) */) << "," << (int)(y1 - dim_y0 /* - glow_cJBean_Offset) */) << "," <<
(int)(x2 - x1 + 2 * glow_cJBean_Offset) << "," << (int)(x2 - x1 + 2 * glow_cJBean_Offset) << "," <<
(int)(y2 - y1 + 2 * glow_cJBean_Offset) << "));" << endl << (int)(y2 - y1 + 2 * glow_cJBean_Offset) << "));" << endl <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
case glow_eExportPass_Draw: case glow_eExportPass_Draw:
...@@ -2017,7 +2017,7 @@ void GlowExportJBean::folder( double x1, double y1, double x2, double y2, ...@@ -2017,7 +2017,7 @@ void GlowExportJBean::folder( double x1, double y1, double x2, double y2,
(int)(y1 - dim_y0 /* - glow_cJBean_Offset) */) << "," << (int)(y1 - dim_y0 /* - glow_cJBean_Offset) */) << "," <<
(int)(x2 - x1 + 2 * glow_cJBean_Offset) << "," << (int)(x2 - x1 + 2 * glow_cJBean_Offset) << "," <<
(int)(y2 - y1 + 2 * glow_cJBean_Offset) << "));" << endl << (int)(y2 - y1 + 2 * glow_cJBean_Offset) << "));" << endl <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
case glow_eExportPass_Draw: case glow_eExportPass_Draw:
...@@ -2030,7 +2030,7 @@ void GlowExportJBean::folder( double x1, double y1, double x2, double y2, ...@@ -2030,7 +2030,7 @@ void GlowExportJBean::folder( double x1, double y1, double x2, double y2,
void GlowExportJBean::table( double x1, double y1, double x2, double y2, void GlowExportJBean::table( double x1, double y1, double x2, double y2,
glow_eDrawType fill_drawtype, int fill, glow_eDrawType fill_drawtype, int fill,
int rows, int columns, int header_row, int header_column, int rows, int columns, int header_row, int header_column,
int text_idx, glow_eDrawType text_drawtype, int text_idx, glow_eDrawType text_drawtype, double header_row_height,
double row_height, double *column_width, char *header_text, double row_height, double *column_width, char *header_text,
glow_eExportPass pass, int *shape_cnt, int node_cnt, ofstream& fp) glow_eExportPass pass, int *shape_cnt, int node_cnt, ofstream& fp)
{ {
...@@ -2079,6 +2079,7 @@ void GlowExportJBean::table( double x1, double y1, double x2, double y2, ...@@ -2079,6 +2079,7 @@ void GlowExportJBean::table( double x1, double y1, double x2, double y2,
fp << fp <<
" " << var_name << " = new " << class_name << "(session, " << " " << var_name << " = new " << class_name << "(session, " <<
rows << "," << columns << "," << header_row << "," << header_column << ");" << endl << rows << "," << columns << "," << header_row << "," << header_column << ");" << endl <<
" " << var_name << ".setHeaderRowHeight(" << int(header_row_height) << ");" << endl <<
" " << var_name << ".setRowHeight(" << int(row_height) << ");" << endl; " " << var_name << ".setRowHeight(" << int(row_height) << ");" << endl;
char *text_p = header_text; char *text_p = header_text;
for ( int i = 0; i < columns; i++) { for ( int i = 0; i < columns; i++) {
...@@ -2101,7 +2102,7 @@ void GlowExportJBean::table( double x1, double y1, double x2, double y2, ...@@ -2101,7 +2102,7 @@ void GlowExportJBean::table( double x1, double y1, double x2, double y2,
(int)(x2 - x1 + 2 * glow_cJBean_Offset) << "," << (int)(x2 - x1 + 2 * glow_cJBean_Offset) << "," <<
(int)(y2 - y1 + 2 * glow_cJBean_Offset) << "));" << endl; (int)(y2 - y1 + 2 * glow_cJBean_Offset) << "));" << endl;
fp << fp <<
" localPanel.add(" << var_name << ", ScaleTools.getAddString(" << var_name << ".getBounds(),size));" << endl; " localPanel.add(" << var_name << ", new Proportion(" << var_name << ".getBounds(), dsize));" << endl;
break; break;
} }
case glow_eExportPass_Draw: case glow_eExportPass_Draw:
......
...@@ -134,7 +134,7 @@ class GlowExportJBean { ...@@ -134,7 +134,7 @@ class GlowExportJBean {
void table( double x1, double y1, double x2, double y2, void table( double x1, double y1, double x2, double y2,
glow_eDrawType fill_drawtype, int fill, glow_eDrawType fill_drawtype, int fill,
int rows, int columns, int header_row, int header_column, int rows, int columns, int header_row, int header_column,
int text_idx, glow_eDrawType text_drawtype, int text_idx, glow_eDrawType text_drawtype, double header_row_height,
double row_height, double *column_width, char *header_text, double row_height, double *column_width, char *header_text,
glow_eExportPass pass, int *shape_cnt, int node_cnt, ofstream& fp); glow_eExportPass pass, int *shape_cnt, int node_cnt, ofstream& fp);
void slider( double x1, double y1, double x2, double y2, void slider( double x1, double y1, double x2, double y2,
......
...@@ -2089,6 +2089,9 @@ void GrowCtx::draw( int ll_x, int ll_y, int ur_x, int ur_y) ...@@ -2089,6 +2089,9 @@ void GrowCtx::draw( int ll_x, int ll_y, int ur_x, int ur_y)
void GrowCtx::nav_draw( int ll_x, int ll_y, int ur_x, int ur_y) void GrowCtx::nav_draw( int ll_x, int ll_y, int ur_x, int ur_y)
{ {
if ( no_nav)
return;
int i; int i;
int loc_ll_x = ll_x; int loc_ll_x = ll_x;
int loc_ll_y = ll_y; int loc_ll_y = ll_y;
......
...@@ -809,6 +809,7 @@ void GrowTable::export_javabean( GlowTransform *t, void *node, ...@@ -809,6 +809,7 @@ void GrowTable::export_javabean( GlowTransform *t, void *node,
((GrowCtx *)ctx)->export_jbean->table( ll_x, ll_y, ur_x, ur_y, ((GrowCtx *)ctx)->export_jbean->table( ll_x, ll_y, ur_x, ur_y,
fill_drawtype, fill, rows, columns, header_row, fill_drawtype, fill, rows, columns, header_row,
header_column, text_size, text_drawtype, header_column, text_size, text_drawtype,
header_row_height * ctx->zoom_factor_y,
row_height * ctx->zoom_factor_y, (double *)cwidth, row_height * ctx->zoom_factor_y, (double *)cwidth,
(char *)header_text, (char *)header_text,
pass, shape_cnt, node_cnt, fp); pass, shape_cnt, node_cnt, fp);
......
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