MARK AND UNMARK DYNAMICS TREE
NODE CHECK BOX (IF NO CHECK BOX IS MARK THEN TAKE TWO CLICK TO MARK FIRST CHECK
BOX AND THEN ONE CLICK ON EACH NODE TO MARK CHECK AND REFRSH GRID.IF NO
CHECKBOX THEN JUST REFRESH RESPECTIVE GRID) AND SET/REMOVE TREE NODE IDX TO TMP
TABLE
public class
FormRun extends ObjectRun
{
TreeSearchingTmp setTreeSearchItemID;
}
public int
mouseDown(int _x, int _y, int
_button, boolean _Ctrl, boolean _Shift)
{
ImageRes stateImage;
int idx,f;
int ret;
FormTreeItem formTreeItem ;//=
PlanningObjectClinicsTree.getItem(PlanningObjectClinicsTree.getSelection());
FormTreeItem parentNode;
#FormTreeControl
[idx,f] =
this.hitTest(_x,_y);
FormTreeItem = this.getItem(idx);
ret = super(_x, _y, _button, _Ctrl, _Shift);
select *from
setTreeSearchItemID;
if(!setTreeSearchItemID)
{
if(element.getNode()==idx)
{
if (FormTreeItem)
{
switch(formTreeItem.stateImage())
{
case imageListAppl_checkbox.image(#ImageCheckNone):
stateImage =
imageListAppl_checkbox.image(#ImageCheckAll);
formTreeItem.stateImage(stateImage);
this.setItem(formTreeItem);
element.setTreeSearchItemID(idx,formTreeItem.data());
break;
case
imageListAppl_checkbox.image(#ImageCheckAll):
stateImage =
imageListAppl_checkbox.image(#ImageCheckNone);
formTreeItem.stateImage(stateImage);
this.setItem(formTreeItem);
element.removePlanningOjectTreeSearch(idx);
break;
}
element.refreshGrid();
element.resetControls();
}
}
else if(!setTreeSearchItemID
)
{
{
RefreshResourceGroupTree = false;
element.setnode(idx);
}
}
else
{
RefreshResourceGroupTree = false;
element.setnode(idx);
}
}
else
{
if(setTreeSearchItemID)
{
if (FormTreeItem)
{
switch(formTreeItem.stateImage())
{
case imageListAppl_checkbox.image(#ImageCheckNone):
stateImage =
imageListAppl_checkbox.image(#ImageCheckAll);
formTreeItem.stateImage(stateImage);
this.setItem(formTreeItem);
element.setTreeSearchItemID(idx,formTreeItem.data());
break;
case
imageListAppl_checkbox.image(#ImageCheckAll):
stateImage = imageListAppl_checkbox.image(#ImageCheckNone);
formTreeItem.stateImage(stateImage);
this.setItem(formTreeItem);
element.removePlanningOjectTreeSearch(idx);
break;
}
element.refreshGrid();
element.resetControls();
}
}
}
return ret;
}
Public void
removePlanningOjectTreeSearch(int
_idx)
{
while
select *from
setTreeSearchItemID where setTreeSearchItemID.ItemIdx
== _idx
{
setTreeSearchItemID.delete();
}
}
public HMTreeSearchingTmp setTreeSearchItemID(int64 idx = 0
,Description _data ='')
{
if(idx)
{
setTreeSearchItemID.ItemIdx=
idx;
setTreeSearchItemID.Description
= _data;
setTreeSearchItemID.insert();
return setTreeSearchItemID;
}
else
{
return setTreeSearchItemID;
}
}