[go: up one dir, main page]

CN102566849A - Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system - Google Patents

Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system Download PDF

Info

Publication number
CN102566849A
CN102566849A CN2010105826804A CN201010582680A CN102566849A CN 102566849 A CN102566849 A CN 102566849A CN 2010105826804 A CN2010105826804 A CN 2010105826804A CN 201010582680 A CN201010582680 A CN 201010582680A CN 102566849 A CN102566849 A CN 102566849A
Authority
CN
China
Prior art keywords
tree data
node
layer
output area
tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010105826804A
Other languages
Chinese (zh)
Other versions
CN102566849B (en
Inventor
乔昕明
李馥龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201010582680.4A priority Critical patent/CN102566849B/en
Publication of CN102566849A publication Critical patent/CN102566849A/en
Application granted granted Critical
Publication of CN102566849B publication Critical patent/CN102566849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention is applicable to the technical field of computers, and provides a method and a device for acquiring tree-form data drawing output positions and an ERP (enterprise resource planning) system. The method includes: acquiring the width of each tree-form data node output area of tree-form data in coordinate calculation orders and interval information of adjacent node output areas to determine the abscissa of each tree-form data node output area; calculating moving direction and moving distance of tree-form data nodes in each layer and updating the abscissa of the moved tree-form data nodes; determining the ordinate of each tree-form data node output area after the tree-form data nodes are moved; and outputting coordination information containing the tree-form data and the tree-form data node output areas of the tree-form data. The method and the device for acquiring tree-form data drawing output positions solve the problem that center of gravity of existing outputted tree-form data are not centered integrally and insufficiently compact, and tree-form data drawn and outputted by the method and the device are centered integrally, better in visual effect and more humanized.

Description

A kind of tree data is drawn outgoing position acquisition methods, device and ERP system
Technical field
The invention belongs to field of computer technology, relate in particular to a kind of tree data and draw outgoing position acquisition methods, device and ERP system.
Background technology
Usually tree data uses the form that represents of the tabulation that is similar to the window explorer indentation, or adopt naturally from the top and under tree-shaped outward appearance, can show hierarchical relationship intuitively, comprise, gather application scenarios such as relation.At present, the graphical interfaces that uses a computer is exported when showing tree-shaped outward appearance, is manually to be depicted as picture through instrument, is write as the static Html page, or uses the function of the insertion figure of similar Word to carry out the graphical interfaces output of tree data.Yet, in the enterprise application scene, like ERP system; Data are unpredictable, need dynamically accomplish the graphic plotting and the output of tree data through computer program, use the tree data figure center of gravity of existing method output not placed in the middle; Compact inadequately, poor visual effect, not enough hommization.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of tree data to draw outgoing position acquisition methods, device and ERP system; Be intended to solve because the tree data figure center of gravity of existing tree data output is not placed in the middle; Compact inadequately; Cause drawing the tree data poor visual effect of output, the problem of not enough hommization.
The embodiment of the invention is achieved in that a kind of tree data drafting outgoing position acquisition methods, and said method comprises the steps:
Obtain each tree type back end output area of tree data in the coordinate Calculation instruction width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
Horizontal ordinate and width information thereof according to each layer tree data node in the said tree data; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
After accomplishing the moving of tree data node, according to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area;
Output comprises the coordinate information of said tree data and tree data node output area thereof.
Another purpose of the embodiment of the invention is to provide a kind of tree data to draw the outgoing position deriving means, and said device comprises:
Horizontal ordinate is confirmed the unit, be used for obtaining each tree type back end output area of coordinate Calculation instruction tree data width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
The node motion unit; Be used for confirming each layer of tree data tree data node horizontal ordinate and the width information thereof that the unit obtains according to horizontal ordinate; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
Ordinate is confirmed the unit; Be used for after accomplishing the moving of tree data node; According to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area; And
The coordinate information output unit is used to export the coordinate information that comprises tree data and tree data node output area thereof.
Another purpose of the embodiment of the invention is to provide a kind of ERP system, and said system comprises tree data drafting outgoing position deriving means, and said device comprises:
Horizontal ordinate is confirmed the unit, be used for obtaining each tree type back end output area of coordinate Calculation instruction tree data width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
The node motion unit; Be used for confirming each layer of tree data tree data node horizontal ordinate and the width information thereof that the unit obtains according to horizontal ordinate; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
Ordinate is confirmed the unit; Be used for after accomplishing the moving of tree data node; According to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area; And
The coordinate information output unit is used to export the coordinate information that comprises tree data and tree data node output area thereof.
The embodiment of the invention through tree data node output area width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area, and then obtain the moving direction and the displacement of every layer of tree data; The tree layer is moved adjustment; Afterwards according to the height of tree data node output area and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area, the whole center of gravity of tree data that has overcome existing tree data output is not placed in the middle; Compact inadequately problem; Make the tree data of drawing output whole placed in the middle, visual effect is better, more hommization.
Description of drawings
Fig. 1 is the realization flow figure that the tree data that provides of first embodiment of the invention is drawn the outgoing position acquisition methods;
Fig. 2 a, Fig. 2 b, Fig. 2 c and Fig. 2 d are the instantiation figure that the tree data that provides of second embodiment of the invention is drawn the outgoing position acquisition methods;
Fig. 3 is the structural drawing that the tree data that provides of third embodiment of the invention is drawn the outgoing position deriving means.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the invention through tree data node output area width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area, and then obtain the moving direction and the displacement of every layer of tree data; The tree layer is moved adjustment; Afterwards according to the height of tree data node output area and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area, the whole center of gravity of tree data that has overcome existing tree data output is not placed in the middle; Compact inadequately problem; Make the tree data of drawing output whole placed in the middle, visual effect is better, more hommization.
The embodiment of the invention provides a kind of tree data to draw the outgoing position acquisition methods, and said method comprises the steps:
Obtain each tree type back end output area of tree data in the coordinate Calculation instruction width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
Horizontal ordinate and width information thereof according to each layer tree data node in the said tree data; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
After accomplishing the moving of tree data node, according to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area;
Output comprises the coordinate information of said tree data and tree data node output area thereof.
The embodiment of the invention also provides a kind of tree data to draw the outgoing position deriving means, and said device comprises:
Horizontal ordinate is confirmed the unit, be used for obtaining each tree type back end output area of coordinate Calculation instruction tree data width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
The node motion unit; Be used for confirming each layer of tree data tree data node horizontal ordinate and the width information thereof that the unit obtains according to horizontal ordinate; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
Ordinate is confirmed the unit; Be used for after accomplishing the moving of tree data node; According to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area; And
The coordinate information output unit is used to export the coordinate information that comprises tree data and tree data node output area thereof.
The embodiment of the invention also provides a kind of ERP system, and said system comprises tree data drafting outgoing position deriving means, and said device comprises:
Horizontal ordinate is confirmed the unit, be used for obtaining each tree type back end output area of coordinate Calculation instruction tree data width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
The node motion unit; Be used for confirming each layer of tree data tree data node horizontal ordinate and the width information thereof that the unit obtains according to horizontal ordinate; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
Ordinate is confirmed the unit; Be used for after accomplishing the moving of tree data node; According to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area; And
The coordinate information output unit is used to export the coordinate information that comprises tree data and tree data node output area thereof.
The embodiment of the invention through tree data node output area width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area, and then obtain the moving direction and the displacement of every layer of tree data; The tree layer is moved adjustment; Afterwards according to the height of tree data node output area and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area, the whole center of gravity of tree data that has overcome existing tree data output is not placed in the middle; Compact inadequately problem; Make the tree data of drawing output whole placed in the middle, visual effect is better, more hommization.Below in conjunction with specific embodiment concrete realization of the present invention is described in detail:
Embodiment one:
The tree data that Fig. 1 shows first embodiment of the invention to be provided is drawn the realization flow of outgoing position acquisition methods, and details are as follows:
In step S101, obtain each tree type back end output area of tree data in the coordinate Calculation instruction width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area.
In embodiments of the present invention; Obtain each tree type back end output area of tree data in the coordinate Calculation instruction width and with the pitch information of brotgher of node output area, confirm that the horizontal ordinate of each tree data node output area specifically comprises two steps:
(1) postorder traversal of tree data in the coordinate Calculation instruction being set; In the postorder traversal process; The data node is conducted interviews, obtain this tree type back end output area width and with the pitch information of brotgher of node output area, and then the horizontal ordinate of the boundary set of definite tree data node and output area; Boundary set comprises the border of tree data node; And the border of each layer of tree data descendant of node, the border comprises the whole amount of forward maximum adjustable and the whole amount of negative sense maximum adjustable of tree data node output area, and the left margin and the right margin of tree data node output area.
In embodiments of the present invention, in the postorder traversal process, when the tree data node is leaf node; Boundary set only comprises the border of tree data node self; Wherein the positive and negative of tree data node output area is 0 to the whole amount of maximum adjustable, and the left margin of tree data node output area is 0, and right margin is k; K is the width of tree data node output area, and the initialization horizontal ordinate of tree data node output area is 0.
When the tree data node is not leaf node, confirm the boundary set of tree data node, the boundary set of tree data node comprises the border of tree data node; And the border of each layer of tree data descendant of node; Wherein the whole amount of the forward maximum adjustable in the border of tree data node is 0, and the whole amount of negative sense maximum adjustable is 0, if the width of tree data node output area is k; The left margin of the ground floor of tree data descendant of node is l; Right margin is r, and then (r-l) is the width of the ground floor output area of tree data descendant of node, and the horizontal ordinate of tree data node output area is l+ (r-l)/2-k/2; The left margin of tree data node output area is l+ (r-l)/2-k/2, and right margin is l+ (r-l)/2+k/2.
(2) when there is the left brotgher of node in the tree data node; According to the boundary set of tree data node and the boundary set of its left brotgher of node merging body; To be the subtree of root node and be root node with its left brotgher of node subtree merges with the tree data node, upgrade the horizontal ordinate that merges back tree data node.
In embodiments of the present invention; When there is the left brotgher of node in the tree data node, need the tree data node be merged to its left brotgher of node place and merge in the body, in concrete embodiment; The subtree that can to fix with this tree data node be root node; Or the fixing subtree that is root node with its left brotgher of node, according to the moving direction that presets loose subtree is carried out translation, mobile distance is the maximal value of each layer output area left margin and the right dividing value in the fixing subtree; After the translation, upgrade the horizontal ordinate of the tree data node of translation.
In concrete implementation process; Upgrade the tree data node and merge the border that the back merges body with its left brotgher of node, this whole amount of forward maximum adjustable that merges body and the whole amount of negative sense maximum adjustable for tree-like node output area median vertical line to 1/2nd of the distance of first tree data node output area median vertical line of this merging body another side end;
Merge to its brotgher of node at the tree data node and merge in the body process, each layer of offspring that this each layer of tree data descendant of node brotgher of node left with it place merges body also merges.In the process on the border of confirming the left brotgher of node merging of tree data node and its back merging body offspring; The whole amount of each layer of merging body offspring forward maximum adjustable after the tree data node merges with its left brotgher of node is min (p1; P2); Wherein P1 is the whole amount of forward maximum adjustable in this layer of tree data node border, and P2 is that the forward maximum adjustable in its left this layer of brotgher of node border is put in order amount, and the tree data node merges the whole amount of back merging body offspring each layer negative sense maximum adjustable with its left brotgher of node and is min (n1; N2); Wherein n1 is the whole amount of negative sense maximum adjustable in this layer of tree data node border, and n2 is the minimum value of the whole amount of negative sense maximum adjustable in its left this layer of brotgher of node border, when this layer only exists tree data node or its one of them border of left brotgher of node; Positive and negative movable distance is the positive and negative to the whole amount of maximum adjustable of this border, upgrades the tree data node and merges the boundary set that the back merges body with its left brotgher of node.
In concrete implementation process; Can according to the kind of data in the tree data node or the width that obtains its output area its ID number and with the pitch information of brotgher of node output area; For example, the width of the node output area of same division data is identical, and the width of the output area of different division datas is all different; Thereby the data to different departments are distinguished, and these information can be stored with the form of configuration file or database table in advance.
In step S102; Horizontal ordinate and width information thereof according to each layer tree data node in the tree data; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node.
In embodiments of the present invention; After the postorder traversal of accomplishing tree data; Preserve the border of tree data root node in the tree data root node boundary set and put in order amount for the whole amount of left margin, right margin, forward maximum adjustable and the negative sense maximum adjustable of each layer thereafter; Whole amount of the forward maximum adjustable of tree data root node and the whole amount of negative sense maximum adjustable all are 0, need not move.When the displacement of each layer of computation tree graphic data root node offspring; The left margin in each layer of computation tree graphic data root node border and the distance of tree data root node output area vertical center line are designated as the left margin distance, and the distance of right margin in each layer of tree data root node border and tree data root node output area vertical center line; Be designated as the right margin distance; Calculate left and right frontier distance the difference absolute value 1/2nd, be designated as and hope the adjustment distance, especially; When the left margin of this layer and right margin are positioned at the left side of tree data root node output area vertical center line; Right margin distance is 0, and when the left margin of this layer and right margin were positioned at the right side of tree data root node output area vertical center line, the left margin linear distance was 0;
When the left margin linear distance greater than right margin apart from the time; The distance of translation is put in order the minimum value in the amount for hoping adjustment distance and the forward maximum adjustable of this layer; Should the layer and succeeding layer to right translation; According to the distance of translation and the horizontal ordinate that upgrades the tree data node, when the right margin distance less than right margin apart from the time, should layer and succeeding layer to left; The distance of translation is that the negative sense maximum adjustable of hoping adjustment distance and this layer is put in order the minimum value in the amount, according to the distance of translation and the horizontal ordinate of direction renewal tree data node.
After the adjustment of accomplishing each layer of tree data root node offspring, whole tree output area leftmost position, border possibly become negative or positive number by original 0, and negative meaning partial content will be lost, and the positive number meaning has been wasted the Blank Space in the left side.Need once repair the integral translation of character this moment to the outgoing position of all nodes, and all tree data nodes in the tree data are carried out translation, makes that the horizontal ordinate of leftmost tree graphic data node is 0 in the tree data.Can certainly by external entity when drawing output, add a reparation amount, to reduce the level traversal one time.
In step S103; After accomplishing the moving of tree data node; According to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area.
In embodiments of the present invention; The preorder traversal of the breadth First that tree data is set; According to the height of tree data node output area in each layer of tree data and with the interlamellar spacing of its father node output area; Obtain the height of each layer of tree data output area, confirm the ordinate of tree data node output area.In concrete implementation process; Can take the data structure of formation to realize preorder traversal to the breadth First of tree data; Through traversal, confirmed the height of every layer of output area, obtain the ordinate of all tree data nodes thereby add up by every layer height.
In step S104, output comprises the coordinate information of tree data and tree data node output area thereof.
In embodiments of the present invention, through being tree data node interpolation boundary set, wherein boundary set has comprised the movable distance of tree data node output area; In the postorder traversal process of the depth-first of tree data, back end is merged in the merging body at the tree data node place of having visited, confirm the moving direction of each layer of tree data root node offspring; And then the boundary set and the horizontal ordinate of renewal tree data node; Preorder traversal through tree data is set at last, further the ordinate of definite tree data node makes that the tree data of drawing output is between two parties whole; Compact more, visual effect is better.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium; Described storage medium is like ROM/RAM, disk, CD etc.
Embodiment two:
According to embodiment one, two, the tree data that Fig. 2 a, Fig. 2 b, Fig. 2 c, Fig. 2 d show second embodiment of the invention to be provided is drawn the instantiation of outgoing position acquisition methods, and details are as follows:
Fig. 2 a, Fig. 2 b have described the process that Node B merges to its brotgher of node A; In embodiments of the present invention, in order to be illustrated more clearly in this process, the width of supposing each node all is 100; Spacing between the brotgher of node is 0, adopts the mode that moves to right to realize the merging of node.
Fig. 2 a has described the position relation that Node B joins node before its left brotgher of node A, and at this moment, the boundary set of node A, B and horizontal ordinate are shown in table 1 the 2nd row, and wherein the boundary set of node A comprises the border of node A, and thereafter for the border of each layer.The first floor border of node A is [50,150], (0,0), and wherein 50 is the left margin of node A; 150 is the right margin of node A, and the forward displacement of node A and negative sense displacement all are 0, and node A offspring's ground floor border is [0,200], (50; 50), node A offspring's second layer border is [50,250], (50,50); The horizontal ordinate of node A is 50, and the border of Node B is [0,100], and the horizontal ordinate of output area is 0, and node A, B merge as yet at this moment.
Fig. 2 b has described the position relation that Node B joins its left brotgher of node A posterior nodal point, and at this moment, the boundary set of node A, B and horizontal ordinate are shown in table 1 the 3rd row, and boundary set and the horizontal ordinate of node A be constant.Node B is a leaf node, and its boundary set includes only itself border, and after the merging, the left and right border on the border of Node B is [150; 250], it is positive and negative to the no longer renewal of the whole amount of maximum adjustable, and producing a boundary set that merges body AB after node A, B merge is { [50; 250], (50,50); [0,200], (50,50); [50,250], (50; 50) }, the ground floor that merges body AB boundary set is the border of node A and Node B place layer, and wherein the whole amount of forward maximum adjustable and the whole amount of negative sense maximum adjustable are 1/2nd of the node A median vertical line distance that arrives the Node B median vertical line; Be (50,50) that the border that merges body AB offspring also merges; Owing to the ground floor that merges body AB offspring only exists with node A is the subtree of root node, so the positive and negative of the offspring's of merging body AB ground floor measured for positive and negative the putting in order to maximum adjustable in the node A offspring ground floor border to the maximum adjustable amount of putting in order after merging; I.e. (50,50), in like manner; Be combined the positive and negative of the body AB offspring second layer and be (50,50) to the whole amount of maximum adjustable.
Table 1:
Figure BDA0000037296400000101
It is the subtree of root node and the process that merges with its left brotgher of node subtree that is root node that Fig. 2 c shows with node C, Fig. 2 d described with node C be the subtree of root node and merge with the subtree that its left brotgher of node is root node after the position relation.In embodiments of the present invention, because node C is not a leaf node, the initialization boundary set of node C has comprised himself border [100,200]; (0,0), and the border [0,300] that merges body by its three node; (100,100), the horizontal ordinate of node C are 100, shown in table 2 the 2nd row.When detecting node C and have the left brotgher of node, attempt merging with the merging body of AB, during merging considered node C and its child node all can not with any node stack in the merging body of AB; This moment can be through the distance of border to confirm to move to right of each node layer of subtree of relatively merging; In embodiments of the present invention, the boundary set of merging body AB is { [50,250]; (50,50); [0,200], (50,50); [50,250], (50,50) } and the boundary set of node C be respectively { [100,200], (0,0); [0,300], (100; 100) }; Through relatively merging the left and right border of body AB and node C respective layer, can get egress C and need move to right and 150 just can not superpose with AB, and the child node of node C need move to right 200 just not can with the ground floor child node stack that merges body AB offspring; Therefore be that the subtree of root node need move to right and 200 could accomplish merging with node C, the node correlation attribute value of the tree after the merging is as shown in table 2 the 3rd is capable.The horizontal ordinate that merges back C is: 300.Each layer of merging body ABC after calculate merging positive and negative when the whole amount of maximum adjustable; The first floor that merges body ABC for the median vertical line that merges the left sibling output area of body ABC to 1/2nd of the distance of the median vertical line of rightmost node output area; Just the median vertical line of node A output area is 125 to 1/2nd of the distance of the median vertical line of node C output area.The positive and negative of the second layer is the corresponding positive and negative minimum value to the whole amount of maximum adjustable with the second layer border of node C in the second layer border that merges body AB to displacement, and the whole amount of forward maximum adjustable is 50, and the whole amount of negative sense maximum adjustable is 50.Have three layers because merge the boundary set of body AB, and that the boundary set of node C has only is two-layer, therefore, the 3rd layer positive and negative, is (50,50) for merging the positive and negative to the whole amount of maximum adjustable of the 3rd layer of body AB to the whole amount of maximum adjustable.
Table 2:
Embodiment three:
The tree data that Fig. 3 shows third embodiment of the invention to be provided is drawn the structure that outgoing position obtains, and for the ease of explanation, only shows the part relevant with the embodiment of the invention.
This tree data outgoing position deriving means can be used for ERP system, perhaps has figure outgoing position, tree data and draws the application system that outgoing position obtains function, for example in the drafting system; Can be the software unit that runs on these systems, can be used as also independently that suspension member is integrated in these systems, this tree data is drawn outgoing position deriving means and comprised: horizontal ordinate be confirmed unit 31; Node motion unit 32; Ordinate is confirmed unit 33, coordinate information output unit 34, wherein:
Horizontal ordinate confirm unit 31 obtain each tree type back end output area of tree data in the coordinate Calculation instruction width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area.Horizontal ordinate confirms that unit 31 comprises that specifically horizontal ordinate confirms subelement 311 and node merge cells 312, wherein:
Horizontal ordinate confirms that 311 pairs of tree datas of subelement carry out postorder traversal; According to the width of tree data node output area and with the pitch information of brotgher of node output area; Confirm the boundary set of tree data node and the horizontal ordinate of output area; Boundary set comprises the border of tree data node, and the border of each layer of tree data descendant of node, and the border comprises the whole amount of forward maximum adjustable and the whole amount of negative sense maximum adjustable of tree data node output area; And the left margin and the right margin of tree data node output area, the tree data node is the back end of visiting in the postorder traversal tree data process.
When there is the left brotgher of node in the tree data node; Node merge cells 312 is according to the boundary set of tree data node and the boundary set of its left brotgher of node merging body; To be the subtree of root node and be root node with its left brotgher of node subtree merges with the tree data node; Upgrade the horizontal ordinate that merges back tree data node, this tree data node is the back end of visiting in the postorder traversal tree data process.
Each layer tree data node horizontal ordinate and width information thereof in the tree data that unit 31 obtains confirmed according to horizontal ordinate in node motion unit 32; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node.Node motion unit 32 specifically comprises displacement computing unit 321 and node translation unit 322, wherein:
After the postorder traversal of accomplishing tree data; Displacement computing unit 321 is according to each layer of tree data root node offspring output area border of preserving in the tree data root node boundary set; The left margin distance of each layer of computation tree graphic data root node offspring, right margin distance and hope adjustment distance; Left margin distance is left margin and the distance of tree data root node output area vertical center line in each layer of tree data root node offspring border; Right margin distance be the right margin and the distance of tree data root node output area vertical center line in this layer border, hope adjustment apart from be this layer left margin distance with this layer right margin apart from the difference absolute value 1/2nd.
When left margin distance greater than right margin apart from the time; Node translation unit 322 should the layer and succeeding layer to right translation; The distance of translation is put in order the minimum value in the amount for hoping adjustment distance and the forward maximum adjustable of this layer; Upgrade the horizontal ordinate of tree data node according to the distance of translation and direction, when the left margin distance less than right margin apart from the time, should layer and succeeding layer to left; The distance of translation is that the negative sense maximum adjustable of hoping adjustment distance and this layer is put in order the minimum value in the amount, according to the distance of translation and the horizontal ordinate of direction renewal tree data node.
After accomplishing the moving of tree data node; Ordinate confirm unit 33 according to the height of tree data node output area in each layers of tree data that obtain and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area; 34 outputs of coordinate information output unit comprise the coordinate information of tree data and tree data node output area thereof.
Above-mentionedly be merely system embodiment of the present invention, the function of its each unit such as above-mentioned method embodiment are said, repeat no more at this, but not in order to restriction the present invention.
The embodiment of the invention through tree data node output area width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area, and then obtain the moving direction and the displacement of every layer of tree data; The tree layer is moved adjustment; Afterwards according to the height of tree data node output area and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area, the whole center of gravity of tree data that has overcome existing tree data output is not placed in the middle; Compact inadequately problem; Make the tree data of drawing output whole placed in the middle, visual effect is better, more hommization.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. a tree data is drawn the outgoing position acquisition methods, it is characterized in that said method comprises the steps:
Obtain each tree type back end output area of tree data in the coordinate Calculation instruction width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
Horizontal ordinate and width information thereof according to each layer tree data node in the said tree data; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
After accomplishing the moving of tree data node, according to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area;
Output comprises the coordinate information of said tree data and tree data node output area thereof.
2. the method for claim 1; It is characterized in that; Through the postorder traversal that tree data in the said coordinate Calculation instruction is set; Obtain each tree type back end output area width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area.
3. method as claimed in claim 2; It is characterized in that; The said width that obtains each tree type back end output area of tree data in the coordinate Calculation instruction and with the pitch information of brotgher of node output area, confirm that the step of the horizontal ordinate of each tree data node output area specifically comprises the steps:
Said tree data is carried out postorder traversal; According to the width of tree data node output area and with the pitch information of brotgher of node output area; Confirm the boundary set of said tree data node and the horizontal ordinate of output area; Said boundary set comprises the border of said tree data node, and the border of said each layer of tree data descendant of node, and said border comprises the whole amount of forward maximum adjustable and the whole amount of negative sense maximum adjustable of said tree data node output area; And the left margin and the right margin of said tree data node output area, said tree data node is the back end of visiting in the said tree data process of postorder traversal;
When there is the left brotgher of node in said tree data node; According to the boundary set of said tree data node and the boundary set of its left brotgher of node merging body; To merge with said tree data node subtree that is root node and the subtree that is root node with its left brotgher of node, upgrade the horizontal ordinate that merges back tree data node.
4. method as claimed in claim 3; It is characterized in that; Said horizontal ordinate and width information thereof according to each layer tree data node in the said tree data; Calculate the moving direction and the displacement of each layer tree data node, and move this layer and follow-up tree layer according to said moving direction and displacement, the step of upgrading the horizontal ordinate that moves back tree data node specifically comprises:
After the postorder traversal of accomplishing said tree data; According to said each layer of tree data root node offspring output area border of preserving in the tree data root node boundary set; Calculate left margin distance, the right margin distance of said each layer of tree data root node offspring and hope the adjustment distance; Said left margin distance is left margin and the distance of said tree data root node output area vertical center line in said each layer of tree data root node offspring border; Said right margin distance be the right margin and the distance of said tree data root node output area vertical center line in this layer border, said hope adjustment apart from be this layer left margin distance with this layer right margin apart from the difference absolute value 1/2nd;
When left margin distance greater than right margin apart from the time; Should the layer and succeeding layer to right translation; The distance of translation is put in order the minimum value in the amount for hoping adjustment distance and the forward maximum adjustable of this layer; Upgrade the horizontal ordinate of tree data node according to the distance of translation and direction, when the left margin distance less than right margin apart from the time, should layer and succeeding layer to left; The distance of translation is that the negative sense maximum adjustable of hoping adjustment distance and this layer is put in order the minimum value in the amount, according to the distance of translation and the horizontal ordinate of direction renewal tree data node.
5. a tree data is drawn the outgoing position deriving means, it is characterized in that said device comprises:
Horizontal ordinate is confirmed the unit, be used for obtaining each tree type back end output area of coordinate Calculation instruction tree data width and with the pitch information of brotgher of node output area, confirm the horizontal ordinate of each tree data node output area;
The node motion unit; Be used for confirming each layer of tree data tree data node horizontal ordinate and the width information thereof that the unit obtains according to horizontal ordinate; Calculate the moving direction and the displacement of each layer tree data node; And move this layer and follow-up tree layer according to said moving direction and displacement, upgrade the horizontal ordinate that moves back tree data node;
Ordinate is confirmed the unit; Be used for after accomplishing the moving of tree data node; According to the height of tree data node output area in each layer of tree data that obtains and with the interlamellar spacing information of its father node output area, confirm the ordinate of tree data node output area; And
The coordinate information output unit is used to export the coordinate information that comprises tree data and tree data node output area thereof.
6. device as claimed in claim 5 is characterized in that, said horizontal ordinate confirms that the unit specifically comprises:
Horizontal ordinate is confirmed subelement; Be used for said tree data is carried out postorder traversal; According to the width of tree data node output area and with the pitch information of brotgher of node output area; Confirm the boundary set of said tree data node and the horizontal ordinate of output area; Said boundary set comprises the border of said tree data node, and the border of said each layer of tree data descendant of node, and said border comprises the whole amount of forward maximum adjustable and the whole amount of negative sense maximum adjustable of said tree data node output area; And the left margin and the right margin of said tree data node output area, said tree data node is the back end of visiting in the said tree data process of postorder traversal; And
The node merge cells; Be used for when there is the left brotgher of node in the tree data node; According to the boundary set of said tree data node and the boundary set of its left brotgher of node merging body; To merge with said tree data node subtree that is root node and the subtree that is root node with its left brotgher of node, and upgrade the horizontal ordinate that merges back tree data node, said tree data node is the back end of visiting in the said tree data process of postorder traversal.
7. device as claimed in claim 6 is characterized in that, said node motion unit specifically comprises:
The displacement computing unit; Be used for after the postorder traversal of accomplishing said tree data; According to said each layer of tree data root node offspring output area border of preserving in the tree data root node boundary set; Calculate left margin distance, the right margin distance of said each layer of tree data root node offspring and hope the adjustment distance; Said left margin distance is left margin and the distance of said tree data root node output area vertical center line in said each layer of tree data root node offspring border; Said right margin distance be the right margin and the distance of said tree data root node output area vertical center line in this layer border, said hope adjustment apart from be this layer left margin distance with this layer right margin apart from the difference absolute value 1/2nd; And
The node translation unit; Be used for when left margin distance greater than right margin apart from the time; Should layer and succeeding layer to right translation, the distance of translation is the minimum value in the whole amount of the forward maximum adjustable of hoping adjustment distance and this layer, the horizontal ordinate that upgrades the tree data node according to the distance and the direction of translation; When left margin distance less than right margin apart from the time; Should layer and succeeding layer to left, the distance of translation is the minimum value in the whole amount of the negative sense maximum adjustable of hoping adjustment distance and this layer, the horizontal ordinate that upgrades the tree data node according to the distance and the direction of translation.
8. a tree data is drawn outgoing position and is obtained system, it is characterized in that, comprises each described tree data drafting outgoing position deriving means of claim 5 to 7.
CN201010582680.4A 2010-12-10 2010-12-10 Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system Active CN102566849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010582680.4A CN102566849B (en) 2010-12-10 2010-12-10 Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010582680.4A CN102566849B (en) 2010-12-10 2010-12-10 Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system

Publications (2)

Publication Number Publication Date
CN102566849A true CN102566849A (en) 2012-07-11
CN102566849B CN102566849B (en) 2014-01-08

Family

ID=46412407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010582680.4A Active CN102566849B (en) 2010-12-10 2010-12-10 Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system

Country Status (1)

Country Link
CN (1) CN102566849B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294686A (en) * 2016-08-05 2017-01-04 董涛 A kind of method quickly updating tree node position coordinates in mind map
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN108319991A (en) * 2017-01-16 2018-07-24 航天信息股份有限公司 A kind of node engineering wiring diagram determines method and device
CN108536837A (en) * 2018-04-13 2018-09-14 卓易法智(上海)网络科技有限公司 Generation method, device, equipment and the storage medium of knowledge tree
CN114385123A (en) * 2022-01-14 2022-04-22 南京拓界信息技术有限公司 WeChat group invitation relation analysis method based on QT framework

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756188A (en) * 2004-09-30 2006-04-05 北京航空航天大学 Method of Graphical Display of Large-Scale Network Topology
CN1773494A (en) * 2005-10-20 2006-05-17 北京航空航天大学 Optimal Design Method of Scene Graph Oriented to Graphics Rendering Platform
CN101042643A (en) * 2006-03-24 2007-09-26 国际商业机器公司 Method and device for regulating graphical user interface
CN101063972A (en) * 2006-04-28 2007-10-31 国际商业机器公司 Method and apparatus for enhancing visuality of image tree

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756188A (en) * 2004-09-30 2006-04-05 北京航空航天大学 Method of Graphical Display of Large-Scale Network Topology
CN1773494A (en) * 2005-10-20 2006-05-17 北京航空航天大学 Optimal Design Method of Scene Graph Oriented to Graphics Rendering Platform
CN101042643A (en) * 2006-03-24 2007-09-26 国际商业机器公司 Method and device for regulating graphical user interface
CN101063972A (en) * 2006-04-28 2007-10-31 国际商业机器公司 Method and apparatus for enhancing visuality of image tree

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN106445931B (en) * 2015-08-04 2019-06-28 阿里巴巴集团控股有限公司 Database node incidence relation methods of exhibiting and device
CN106294686A (en) * 2016-08-05 2017-01-04 董涛 A kind of method quickly updating tree node position coordinates in mind map
CN106294686B (en) * 2016-08-05 2021-04-02 董涛 Method for rapidly updating tree node position coordinates in thought guide graph applied to computer technical field
CN108319991A (en) * 2017-01-16 2018-07-24 航天信息股份有限公司 A kind of node engineering wiring diagram determines method and device
CN108536837A (en) * 2018-04-13 2018-09-14 卓易法智(上海)网络科技有限公司 Generation method, device, equipment and the storage medium of knowledge tree
CN108536837B (en) * 2018-04-13 2022-04-01 上海渠杰信息科技有限公司 Knowledge tree generation method, device, equipment and storage medium
CN114385123A (en) * 2022-01-14 2022-04-22 南京拓界信息技术有限公司 WeChat group invitation relation analysis method based on QT framework

Also Published As

Publication number Publication date
CN102566849B (en) 2014-01-08

Similar Documents

Publication Publication Date Title
US20250028733A1 (en) Enhanced mechanisms for managing multidimensional data
Wang et al. Trivariate solid T-spline construction from boundary triangulations with arbitrary genus topology
CN102193786B (en) Device and method for constructing self-adaptive graphic user interface (GUI)
CN107300917B (en) A Backend Optimization Method for Visual SLAM Based on Hierarchical Architecture
KR102082541B1 (en) Selecting and editing visual elements with attribute groups
CN102566849B (en) Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system
CN110532968A (en) Table recognition method, apparatus and storage medium
CN103530379B (en) tree structure data display method and device
CN110866342B (en) Cabinet modeling method and system and electronic equipment
CN102467535B (en) Method, device and system for acquiring tree data output coordinate
CN105138526A (en) Method and system used for automatically generating semantic mapping for relational databases
US20220083574A1 (en) Graphically Representing Related Record Families Using a Phantom Parent Node
Brandes et al. Sketch-driven orthogonal graph drawing
Yang et al. Interactive visualization of multi-resolution urban building models considering spatial cognition
CN109324796A (en) Quick interface arrangement method and device
Jeschke Generalized Diffusion Curves: An Improved Vector Representation for Smooth‐Shaded Images
Fan et al. Layout graph model for semantic façade reconstruction using laser point clouds
CN104091367B (en) Three-dimensional scenic storage method and device based on OGRE
US20070266307A1 (en) Auto-layout of shapes
US10345482B2 (en) Global grid building unfaulting sequence for complex fault-network topologies
CN106294686B (en) Method for rapidly updating tree node position coordinates in thought guide graph applied to computer technical field
Gosciewski Selection of interpolation parameters depending on the location of measurement points
CN102200985A (en) Correspondence device and method of webpage and document object model (DOM)
CN107564105B (en) Grid simplifying method for considering area and normal vector aiming at unsmooth surface
CN116029263A (en) DWG object importing method, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant