All files / output cl_gui_column_tree.clas.mjs

33.99% Statements 69/203
100% Branches 2/2
1.63% Functions 1/61
33.99% Lines 69/203

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 2031x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x         1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                                                               1x               1x       1x       1x                 1x                 1x               1x             1x                                           1x               1x     1x                                   1x           1x       1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
const {cl_item_tree_control} = await import("./cl_item_tree_control.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_gui_column_tree.clas.abap
class cl_gui_column_tree extends cl_item_tree_control {
  static STATIC_SUPER = cl_item_tree_control;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_GUI_COLUMN_TREE';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"ALIGN_CENTER": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "ALIGN_RIGHT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "EVENTID_NODE_DOUBLE_CLICK": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "ITEM_CLASS_BUTTON": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "ITEM_CLASS_LINK": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "ITEM_CLASS_TEXT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "NODE_SEL_MODE_SINGLE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "STYLE_EMPHASIZED": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "STYLE_EMPHASIZED_POSITIVE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "STYLE_INACTIVE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"CONSTRUCTOR": {"visibility": "U", "parameters": {"PARENT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_GUI_CONTAINER", RTTIName: "\\CLASS=CL_GUI_CONTAINER"});}, "is_optional": " ", "parm_kind": "I", "type_name": "ObjectReferenceType"}, "NODE_SELECTION_MODE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}, "ITEM_SELECTION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "HIERARCHY_COLUMN_NAME": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}, "HIERARCHY_HEADER": {"type": () => {return new abap.types.Structure({
  "t_image": new abap.types.Character(46, {}),
  "heading": new abap.types.Character(132, {}),
  "tooltip": new abap.types.Character(132, {}),
  "width": new abap.types.Integer({qualifiedName: "I"}),
  "width_pix": new abap.types.Character(1, {})}, "TREEV_HHDR", "TREEV_HHDR", {}, {});}, "is_optional": " ", "parm_kind": "I", "type_name": "StructureType"}}},
  "HIERARCHY_HEADER_SET_TEXT": {"visibility": "U", "parameters": {"TEXT": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}}},
  "HIERARCHY_HEADER_SET_TOOLTIP": {"visibility": "U", "parameters": {"TOOLTIP": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}}},
  "HIERARCHY_HEADER_SET_WIDTH": {"visibility": "U", "parameters": {"WIDTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}, "WIDTH_PIX": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}},
  "ADD_NODES_AND_ITEMS": {"visibility": "U", "parameters": {"NODE_TABLE": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}, "ITEM_TABLE": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"USER"});}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}, "ITEM_TABLE_STRUCTURE_NAME": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}}},
  "COLUMN_SET_HIDDEN": {"visibility": "U", "parameters": {"COLUMN_NAME": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"TV_ITMNAME","ddicName":"TV_ITMNAME","description":"Item Name"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "HIDDEN": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}},
  "DELETE_ALL_NODES": {"visibility": "U", "parameters": {}},
  "ADD_COLUMN": {"visibility": "U", "parameters": {"NAME": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}, "HIDDEN": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "DISABLED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "ALIGNMENT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}, "WIDTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}, "WIDTH_PIX": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "HEADER_IMAGE": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}, "HEADER_TEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}, "HEADER_TOOLTIP": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}}},
  "HIERARCHY_HEADER_GET_WIDTH": {"visibility": "U", "parameters": {"WIDTH_PIX": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "WIDTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "E", "type_name": "IntegerType"}}},
  "EXPAND_NODE": {"visibility": "U", "parameters": {"NODE_KEY": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CLikeType"}, "LEVEL_COUNT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}, "EXPAND_SUBTREE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}},
  "COLUMN_GET_WIDTH": {"visibility": "U", "parameters": {"COLUMN_NAME": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}, "WIDTH_PIX": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "WIDTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "E", "type_name": "IntegerType"}}},
  "ADJUST_COLUMN_WIDTH": {"visibility": "U", "parameters": {"START_COLUMN": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}, "END_COLUMN": {"type": () => {return new abap.types.Character(4);}, "is_optional": " ", "parm_kind": "I", "type_name": "AnyType"}, "ALL_COLUMNS": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "INCLUDE_HEADING": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}}};
  constructor() {
    const sup = super();
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "SUPER": sup.FRIENDS_ACCESS_INSTANCE,
      "hierarchy_header_set_text": this.hierarchy_header_set_text.bind(this),
      "hierarchy_header_set_tooltip": this.hierarchy_header_set_tooltip.bind(this),
      "hierarchy_header_set_width": this.hierarchy_header_set_width.bind(this),
      "add_nodes_and_items": this.add_nodes_and_items.bind(this),
      "column_set_hidden": this.column_set_hidden.bind(this),
      "delete_all_nodes": this.delete_all_nodes.bind(this),
      "add_column": this.add_column.bind(this),
      "hierarchy_header_get_width": this.hierarchy_header_get_width.bind(this),
      "expand_node": this.expand_node.bind(this),
      "column_get_width": this.column_get_width.bind(this),
      "adjust_column_width": this.adjust_column_width.bind(this),
    };
    this.align_center = cl_gui_column_tree.align_center;
    this.align_right = cl_gui_column_tree.align_right;
    this.eventid_node_double_click = cl_gui_column_tree.eventid_node_double_click;
    this.item_class_button = cl_gui_column_tree.item_class_button;
    this.item_class_link = cl_gui_column_tree.item_class_link;
    this.item_class_text = cl_gui_column_tree.item_class_text;
    this.node_sel_mode_single = cl_gui_column_tree.node_sel_mode_single;
    this.style_emphasized = cl_gui_column_tree.style_emphasized;
    this.style_emphasized_positive = cl_gui_column_tree.style_emphasized_positive;
    this.style_inactive = cl_gui_column_tree.style_inactive;
    this.button_click = {"EVENT_NAME": "BUTTON_CLICK", "EVENT_CLASS": "CL_GUI_COLUMN_TREE"};
    this.link_click = {"EVENT_NAME": "LINK_CLICK", "EVENT_CLASS": "CL_GUI_COLUMN_TREE"};
  }
  async hierarchy_header_set_width(INPUT) {
    let width = INPUT?.width;
    if (width?.getQualifiedName === undefined || width.getQualifiedName() !== "I") { width = undefined; }
    if (width === undefined) { width = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.width); }
    let width_pix = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.width_pix) {width_pix.set(INPUT.width_pix);}
    return;
  }
  async hierarchy_header_set_tooltip(INPUT) {
    let tooltip = INPUT?.tooltip;
    return;
  }
  async hierarchy_header_set_text(INPUT) {
    let text = INPUT?.text;
    return;
  }
  async column_set_hidden(INPUT) {
    let column_name = INPUT?.column_name;
    if (column_name?.getQualifiedName === undefined || column_name.getQualifiedName() !== "TV_ITMNAME") { column_name = undefined; }
    if (column_name === undefined) { column_name = new abap.types.Character(12, {"qualifiedName":"TV_ITMNAME","ddicName":"TV_ITMNAME","description":"Item Name"}).set(INPUT.column_name); }
    let hidden = INPUT?.hidden;
    if (hidden?.getQualifiedName === undefined || hidden.getQualifiedName() !== "ABAP_BOOL") { hidden = undefined; }
    if (hidden === undefined) { hidden = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.hidden); }
    return;
  }
  async adjust_column_width(INPUT) {
    let start_column = INPUT?.start_column || new abap.types.Character(4);
    let end_column = INPUT?.end_column || new abap.types.Character(4);
    let all_columns = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.all_columns) {all_columns.set(INPUT.all_columns);}
    let include_heading = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.include_heading) {include_heading.set(INPUT.include_heading);}
    return;
  }
  async column_get_width(INPUT) {
    let column_name = INPUT?.column_name;
    let width_pix = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.width_pix) {width_pix.set(INPUT.width_pix);}
    if (INPUT === undefined || INPUT.width_pix === undefined) {width_pix = abap.builtin.abap_true;}
    let width = INPUT?.width || new abap.types.Integer({qualifiedName: "I"});
    return;
  }
  async hierarchy_header_get_width(INPUT) {
    let width_pix = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.width_pix) {width_pix.set(INPUT.width_pix);}
    if (INPUT === undefined || INPUT.width_pix === undefined) {width_pix = abap.builtin.abap_true;}
    let width = INPUT?.width || new abap.types.Integer({qualifiedName: "I"});
    return;
  }
  async constructor_(INPUT) {
    let parent = INPUT?.parent;
    if (parent?.getQualifiedName === undefined || parent.getQualifiedName() !== "CL_GUI_CONTAINER") { parent = undefined; }
    if (parent === undefined) { parent = new abap.types.ABAPObject({qualifiedName: "CL_GUI_CONTAINER", RTTIName: "\\CLASS=CL_GUI_CONTAINER"}).set(INPUT.parent); }
    let node_selection_mode = INPUT?.node_selection_mode;
    if (node_selection_mode?.getQualifiedName === undefined || node_selection_mode.getQualifiedName() !== "I") { node_selection_mode = undefined; }
    if (node_selection_mode === undefined) { node_selection_mode = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.node_selection_mode); }
    let item_selection = INPUT?.item_selection;
    if (item_selection?.getQualifiedName === undefined || item_selection.getQualifiedName() !== "ABAP_BOOL") { item_selection = undefined; }
    if (item_selection === undefined) { item_selection = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.item_selection); }
    let hierarchy_column_name = INPUT?.hierarchy_column_name;
    let hierarchy_header = INPUT?.hierarchy_header;
    if (hierarchy_header?.getQualifiedName === undefined || hierarchy_header.getQualifiedName() !== "TREEV_HHDR") { hierarchy_header = undefined; }
    if (hierarchy_header === undefined) { hierarchy_header = new abap.types.Structure({
    "t_image": new abap.types.Character(46, {}),
    "heading": new abap.types.Character(132, {}),
    "tooltip": new abap.types.Character(132, {}),
    "width": new abap.types.Integer({qualifiedName: "I"}),
    "width_pix": new abap.types.Character(1, {})}, "TREEV_HHDR", "TREEV_HHDR", {}, {}).set(INPUT.hierarchy_header); }
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
    return this;
  }
  async expand_node(INPUT) {
    let node_key = INPUT?.node_key;
    let level_count = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.level_count) {level_count.set(INPUT.level_count);}
    let expand_subtree = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.expand_subtree) {expand_subtree.set(INPUT.expand_subtree);}
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async free() {
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async add_column(INPUT) {
    let name = INPUT?.name;
    let hidden = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.hidden) {hidden.set(INPUT.hidden);}
    let disabled = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.disabled) {disabled.set(INPUT.disabled);}
    let alignment = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.alignment) {alignment.set(INPUT.alignment);}
    let width = INPUT?.width;
    if (width?.getQualifiedName === undefined || width.getQualifiedName() !== "I") { width = undefined; }
    if (width === undefined) { width = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.width); }
    let width_pix = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.width_pix) {width_pix.set(INPUT.width_pix);}
    let header_image = INPUT?.header_image || new abap.types.Character();
    let header_text = INPUT?.header_text;
    let header_tooltip = INPUT?.header_tooltip || new abap.types.Character();
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async add_nodes_and_items(INPUT) {
    let node_table = INPUT?.node_table || new abap.types.Character(4);
    let item_table = INPUT?.item_table;
    let item_table_structure_name = INPUT?.item_table_structure_name;
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async set_registered_events(INPUT) {
    let events = INPUT?.events;
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async delete_all_nodes() {
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
}
abap.Classes['CL_GUI_COLUMN_TREE'] = cl_gui_column_tree;
cl_gui_column_tree.align_center = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.align_center.set(1);
cl_gui_column_tree.align_right = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.align_right.set(2);
cl_gui_column_tree.eventid_node_double_click = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.eventid_node_double_click.set(25);
cl_gui_column_tree.item_class_button = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.item_class_button.set(2);
cl_gui_column_tree.item_class_link = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.item_class_link.set(3);
cl_gui_column_tree.item_class_text = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.item_class_text.set(1);
cl_gui_column_tree.node_sel_mode_single = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.node_sel_mode_single.set(1);
cl_gui_column_tree.style_emphasized = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.style_emphasized.set(1);
cl_gui_column_tree.style_emphasized_positive = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.style_emphasized_positive.set(4);
cl_gui_column_tree.style_inactive = new abap.types.Integer({qualifiedName: "I"});
cl_gui_column_tree.style_inactive.set(5);
export {cl_gui_column_tree};