Form S_197FE

LANSA

Form S_197FE
*===================================================================;
*;
* Component : S_197FE;
* Type : Form;
* Ancestor : PRIM_FORM (Primitive Form);
*;
* Description : Styles for graphs;
*;
* Disclaimer : The following material is supplied as sample material;
* only. No warranty concerning this material or its use;
* in any way whatsoever is expressed or implied.;
*;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(537) LAYOUTMANAGER(#ATLM_1) LEFT(301) TOP(125) WIDTH(698);
DEFINE_COM CLASS(#PRIM_GRPH) NAME(#GRPH_1) BARSTYLE(Clustered) CAPTION('Note how sizing the form influences the appearance of the graph.') DISPLAYPOSITION(1) HEIGHT(510) LEFT(0) PARENT(#COM_OWNER) SCATTERSTYLE(SymbolAtPoints+Solid) SURFACESTYLE(ConnectLinesInBlack) TABPOSITION(1) TOP(0) WIDTH(510) XCAPTION('Animal') YCAPTION('Frequency of panic attacks before and after treatment');
DEFINE_COM CLASS(#PRIM_GRCL) NAME(#GRCL_1) COLUMNSYMBOL(Cross) DISPLAYPOSITION(1) PARENT(#GRPH_1) SOURCE(#S_197CAB);
DEFINE_COM CLASS(#PRIM_GRCL) NAME(#GRCL_2) COLUMNSYMBOL(HollowUpTriangle) DISPLAYPOSITION(2) PARENT(#GRPH_1) SOURCE(#S_197CABE);
DEFINE_COM CLASS(#PRIM_GRCL) NAME(#GRCL_3) COLUMNROLE(Label) DISPLAYPOSITION(3) PARENT(#GRPH_1) SOURCE(#S_197PSL);
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_1) CAPTION('Visual Style for graph') DISPLAYPOSITION(2) HEIGHT(510) LAYOUTMANAGER(#FWLM_1) LEFT(510) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(0) WIDTH(180);
DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_1) CAPTION('no visual style') DISPLAYPOSITION(1) LEFT(13) PARENT(#GPBX_1) TABPOSITION(1) TOP(113) WIDTH(154);
DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_2) CAPTION('default style VS_NORM') DISPLAYPOSITION(2) LEFT(13) PARENT(#GPBX_1) TABPOSITION(2) TOP(247) WIDTH(154);
DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_3) CAPTION('VS_PANEL') DISPLAYPOSITION(3) LEFT(13) PARENT(#GPBX_1) TABPOSITION(3) TOP(381) WIDTH(154);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) DIRECTION(TopToBottom) FLOWOPERATION(Center) FLOWOPERATIONVER(Spread);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_1) MANAGE(#RDBN_1) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_2) MANAGE(#RDBN_2) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_3) MANAGE(#RDBN_3) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#GRPH_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Right) MANAGE(#GPBX_1) PARENT(#ATLM_1);
;
;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption(*component_desc);
;
* set the graph to no visual style;
set #GRPH_1 VisualStyle(*NULL) VisualStyleofParent(false);
set #RDBN_1 ButtonChecked(true);
;
;
* Load demo data for graph;
;
EXECUTE LOADGRAPH with_parms( 15 10 '''rabbits''');
EXECUTE LOADGRAPH with_parms( 1 1 '''cats''');
EXECUTE LOADGRAPH with_parms( 9 3 '''dogs''');
EXECUTE LOADGRAPH with_parms( 5 10 '''frogs''');
;
ENDROUTINE;
;
;
subroutine LOADGRAPH parms(#S_197CAB #S_197CABE #S_197PSL);
ADD_ENTRY #GRPH_1;
endroutine;
;
EVTROUTINE HANDLING(#RDBN_1.Click);
* use no visual style;
set #GRPH_1 VisualStyle(*NULL) VisualStyleofParent(false);
ENDROUTINE;
EVTROUTINE HANDLING(#RDBN_2.Click);
* use the default style VS_NORM;
set #GRPH_1 VisualStyle(#VS_NORM) ;
ENDROUTINE;
EVTROUTINE HANDLING(#RDBN_3.Click);
* use a reliable style for graphs: VS_PANEL;
set #GRPH_1 VisualStyle(#VS_PANEL);
ENDROUTINE;
END_COM;