CN103049313B - For label stopping device and the method for browser - Google Patents

For label stopping device and the method for browser Download PDF

Info

Publication number
CN103049313B
CN103049313B CN201210537245.9A CN201210537245A CN103049313B CN 103049313 B CN103049313 B CN 103049313B CN 201210537245 A CN201210537245 A CN 201210537245A CN 103049313 B CN103049313 B CN 103049313B
Authority
CN
China
Prior art keywords
label
father
browser
subtab
closing
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.)
Expired - Fee Related
Application number
CN201210537245.9A
Other languages
Chinese (zh)
Other versions
CN103049313A (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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210537245.9A priority Critical patent/CN103049313B/en
Publication of CN103049313A publication Critical patent/CN103049313A/en
Application granted granted Critical
Publication of CN103049313B publication Critical patent/CN103049313B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to network data communication technical field, it discloses the label stopping device for browser and method, label method for closing comprises when receiving closedown instruction, judges whether label to be closed has father's label, if had, then judge whether this father's label has multiple subtab; If there is multiple subtab, then completes label and close; If this father's label only with this label to be closed for subtab, then complete label close; Subtab is the label by clicking the webpage for loading this link that link generates in described father's label; The subtab wherein being switched to by the current label presented a subtab of this father's label found to comprise further to make to be switched to obtains browser focus, to present this subtab in the display interface of browser.Lack the technical matters of relevance between the label that the present invention presents after can solving and closing label and buttoned-up label, achieve and can automatically present and the beneficial effect of closing the label that label is associated.

Description

For label stopping device and the method for browser
Technical field
The present invention relates to network data communication technical field, be specifically related to a kind of label stopping device for browser and method.
Background technology
In prior art, when after closedown label, an adjacent label of this buttoned-up label can be switched to, and present this adjacent label.But label that should be adjacent with buttoned-up label, not necessarily has with buttoned-up label and associates with regard to web page contents in label.Thus, lack relevance between the label presented after causing closedown label and buttoned-up label, automatically cannot present the problem of the correlation tag of closing label.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of overcoming the problems referred to above or the label stopping device for browser solved the problem at least in part and method.
According to one aspect of the present invention, provide a kind of label stopping device for browser, described device comprises:
Father's label judge module, is suitable for, when receiving the instruction of closing label, judging whether label to be closed has father's label, judged result being informed to subtab judge module;
Subtab judge module, being suitable in judged result is when having father's label wait the label of closing, and judges whether this father's label has multiple subtab, and this judged result is informed to label closing module;
Label closing module, is suitable for when the judged result of the subtab judge module received has multiple subtab for father's label, completes label and closes, and the current label presented is switched to a subtab of the father's label found; The judged result of the subtab judge module received be father's label only with when the label of closing is for subtab, complete label and close, and the current label presented is switched to this father's label;
Described subtab is the label by clicking the webpage for loading this link that link generates in described father's label;
Wherein, described label closing module is further adapted for, and after completing label closedown, makes the label be switched to obtain browser focus, to present the label be switched in the display interface of browser.
Alternatively, described device also comprises: position judging module,
Described father's label judge module, is also suitable for judged result to inform to described position judging module;
Described position judging module, being suitable in judged result is when not having father's label wait the label of closing, and judges whether label to be closed is positioned at browser last, this judged result is informed to label closing module;
Described label closing module, be also suitable for the judged result of described position judging module be wait the label of closing be positioned at browser last time, complete label and close, and the current label presented is switched to the upper label before the label of closedown; The judged result of position judging module be wait the label of closing be not be positioned at browser last time, complete label and close, and the current label presented is switched to the next label after the label of closedown.
Alternatively, described device also comprises: number of labels judge module,
Described father's label judge module, specifically be suitable for after receiving the instruction of closing label, indicating label quantity judge module carries out the judgement whether only comprising label to be closed in browser, be be not when only comprising the label wait closing in browser in the judged result of number of labels judge module, judge whether label to be closed has father's label, judged result is informed to subtab judge module, when the judged result of number of labels judge module is the label only comprised in browser wait closing, end operation, do not carry out the judgement whether label to be closed has father's label,
Described number of labels judge module is also suitable for judged result being informed to described label closing module;
Described label closing module is also suitable for, and when the judged result of the described number of labels judge module received being the label only comprised in browser wait closing, completing after label is closed and generating new label, and presenting this new label.
According to a further aspect in the invention, provide a kind of label method for closing for browser, described method comprises:
When receiving the instruction of closing label, judging whether label to be closed has father's label, if having father's label, then judging whether this father's label has multiple subtab further;
If this father's label has multiple subtab, then complete label and close, the current label presented is switched to a subtab of this father's label found;
If this father's label only with this label to be closed for subtab, then complete label close, the current label presented is switched to this father's label;
Described subtab is the label by clicking the webpage for loading this link that link generates in described father's label;
Wherein, the described subtab of this father's label found that switched to by the current label presented comprises further: make the subtab be switched to obtain browser focus, to present this subtab in the display interface of browser;
Describedly this father's label is switched to comprise further on the current label presented: to make the father's label be switched to obtain browser focus, to present this father's label in the display interface of browser.
Alternatively, described method also comprises:
When not there is father's label wait the label of closing, judge whether label to be closed is positioned at browser last;
If it is last to be positioned at browser, then completes label and close, the current label presented is switched to the upper label before the label of closedown;
Last if not being positioned at browser, then complete label and close, the current label presented is switched to the next label after the label of closedown.
Alternatively, judging also to comprise before whether label to be closed has father's label:
Judge whether only comprise label to be closed in browser, if so, then complete after label is closed and generate new label, and present this new label.
According to technical scheme of the present invention, when closing label, can judge whether label to be closed has father's label, if having father's label, then judging whether this father's label has multiple subtab further.If this father's label has multiple subtab, then complete label and close, the current label presented is switched to a subtab of this father's label found; If this father's label only with this label to be closed for subtab, then complete label close, the current label presented is switched to this father's label.Thus, when making to close label, after completing label closedown, preferentially be switched to and the buttoned-up label related label of tool in terms of content, this label and buttoned-up label have identical father's label or both are set membership, and then lacks the problem of relevance between the label presented after solving closedown label and buttoned-up label; Achieve and can automatically present and the beneficial effect of closing the label that label is associated.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the structural drawing adding tagged device in browser according to an embodiment of the invention;
Fig. 2 shows the tag sorting according to adding in one embodiment of the invention after label in browser;
Fig. 3 shows according to an embodiment of the invention for the structural drawing of the label stopping device of browser;
Fig. 4 shows according to an embodiment of the invention for the structural drawing of the label stopping device of browser;
Fig. 5 shows according to an embodiment of the invention for the structural drawing of the label stopping device of browser;
Fig. 6 shows the process flow diagram adding tagged method in browser according to an embodiment of the invention;
Fig. 7 shows according to an embodiment of the invention for the process flow diagram of the label method for closing of browser; And
Fig. 8 shows according to an embodiment of the invention for the process flow diagram of the label method for closing of browser.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
See Fig. 1, show the structural drawing adding label apparatus according to an embodiment of the invention.This interpolation label apparatus 100 comprises: generation module 110, judge module 120 and interpolation module 130.
Generation module 110, be suitable for receiving the instruction generating new label, the instruction according to receiving generates new label.
Judge module 120, is suitable for the new label judging whether only to comprise this generation in browser, and judged result is informed to interpolation module 130.
Add module 130, be suitable for, when judged result is the new label only comprising this generation in browser, in the display interface of browser, adds this new label and presenting; Be, when not being the new label only comprising this generation in browser, in the next position in the display interface of browser after the current label presented, insert this new label in judged result, and present this new label.
In the present embodiment, browser can be mobile phone browser, PC browser or PAD browser, is not particularly limited at this.
Wherein, interpolation module 130 is further adapted for and makes new label obtain browser focus, to present this new label in the display interface of browser.
Wherein, after generation module 110 is further adapted for the instruction receiving and click and link in the current label presented, generate the new label of the webpage loading this link.
Wherein, after generation module 110 is further adapted for the instruction receiving label interpolation button in click browser, generate the new label of blank or that loading is default webpage.
Such as, label A, label A 1, label A 2, label B, label B 1, label B 2, label C, label D, label D1 and label D2 to be added in a browser.Wherein, label A 1 and label A 2 are the subtab of label A; Label B 1 and label B 2 are the subtab of label B; Label D1 and label D2 is the subtab of label D.Namely label A 1 and label A 2 add by clicking link in label A, and label B 1 and label B 2 add by clicking link in label B, and label D1 and label D2 adds by clicking link in label D.
Adding procedure in this citing is as follows.Sequence label after interpolation as shown in Figure 2.
First, newly-built label A.Generation module 110 receives the instruction of generating labels A, according to the instruction generating labels A received.Judge module 120 is judged only to comprise label A in browser, judged result is informed to and adds module 130.Add module 130 and add label A in the display interface of browser, make label A obtain browser focus, to present label A.
Click in label A and link, add label A 1.Generation module 110 receives the instruction clicked and link in label A, generates the label A 1 loading webpage in this link.Judge module 120 judges it is not only comprise label A 1 in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label A presented and insert label A 1, make label A 1 obtain browser focus, to present label A 1.Namely, after label A 1 is added label A, webpage in label A 1 is presented.
Newly-built label B, adds label B.Generation module 110 receives label in click browser and adds the instruction of button, generating labels B.Label B can be blank tag, after label has added, by input network address, loads the webpage of this network address.Or, in the label B of generation, load default webpage.Judge module 120 judges it is not only comprise label B in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label A 1 presented and insert label B, make label B obtain browser focus, to present label B.Namely, after label B is added label A 1, content in label B is presented.
Click in label B and link, add label B 1.Generation module 110 receives the instruction clicked and link in label B, generates the label B 1 loading webpage in this link.Judge module 120 judges it is not only comprise label B 1 in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label B presented and insert label B 1, make label B 1 obtain browser focus, to present label B 1.Namely, after label B 1 is added label B, webpage in label B 1 is presented.
Click label A, make label A obtain focus, present label A.Click another link in label A, add label A 2.Generation module 110 receives the instruction clicking another link in label A, generates the label A 2 loading webpage in this link.Judge module 120 judges it is not only comprise label A 2 in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label A presented and insert label A 2, make label A 2 obtain browser focus, to present label A 2.Namely label A 2 is being added between label A and label A 1, presenting webpage in label A 2.
Newly-built label C, adds label C.Generation module 110 receives label in click browser and adds the instruction of button, generating labels C.Label C can be blank tag, after label has added, by input network address, loads the webpage of this network address.Or, in the label C of generation, load default webpage.Judge module 120 judges it is not only comprise label C in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label A 2 presented and insert label C, make label C obtain browser focus, to present label C.Namely, after label C is added label A 2, content in label C is presented.
Click label B, make label B obtain focus, present label B.Click another link in label B, add label B 2.Generation module 110 receives the instruction clicking another link in label B, generates the label B 2 loading webpage in this link.Judge module 120 judges it is not only comprise label B 2 in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label B presented and insert label B 2, make label B 2 obtain browser focus, to present label B 2.Namely, after label B 2 is added label B, webpage in label B 2 is presented.
Click label B 1, make label B 1 obtain focus, present label B 1.Newly-built label D, adds label D.Generation module 110 receives label in click browser and adds the instruction of button, generating labels D.Label D can be blank tag, after label has added, by input network address, loads the webpage of this network address.Or, in the label D of generation, load default webpage.Judge module 120 judges it is not only comprise label D in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label B 1 presented and insert label D, make label D obtain browser focus, to present label D.Namely, after label D is added label B 1, content in label D is presented.
In label D, one click first links and the second link, adds label D1 and label D2.Such as, by after pinning ctrl key in label D, click the mode of the first link and the second link, realize one click first in label D and link and second to link.Generation module 110 receives the instruction clicking the first link in label D, generates the label D1 loading webpage in this link; Receive the instruction clicking the second link in label D, generate the label D2 loading webpage in this link.Judge module 120 judges it is not only comprise label D1 in browser, is not only comprise label D2 in browser, and judged result is informed to interpolation module 130.Add in the next position of module 130 in the display interface of browser after the current label D presented and insert label D1, between the label D1 of the current label D that presents and interpolation in the display interface of browser, add label D2.Label D2 obtains browser focus, presents label D2.
In the present embodiment, when adding label, the position of new label all after the current label presented, and then the problem that the label browsed before solving interpolation is far away with the label spacing of newly adding; The label browsed before making interpolation is adjacent with the label newly added, and achieves while presenting the new label added, the beneficial effect of the label browsed before being easy to find out interpolation.
In one embodiment, after generation module 110 is further adapted for the instruction receiving and click and link in the current label presented, generate the new label of the webpage loading this link.The current label presented is father's label of new label, and new label is the subtab of the current label presented.
It is when not being the new label only comprising described generation in browser that interpolation module 130 is further adapted in judged result, determine that in the display interface of browser, the current label presented is father's label of new label, added in the next position of interface in display interface after the current label presented by the subtab of father's label and insert this new label and present.
In another embodiment, after generation module 110 is further adapted for the instruction receiving label interpolation button in click browser, generate the new label of blank or that loading is default webpage.
It is when not being the new label only comprising described generation in browser that interpolation module 130 is further adapted in judged result, obtain the sorting position of the current label presented in browser display interface, added in the next position of interface after this position by the label of label container and insert this new label;
Label container is used for depositing each label in browser.
For example, in interpolation module 130, labels class Tab and label container class TabContainer is set.
The object of labels class is label, and labels class Tab comprises interface:
VoidsetParentTab (Tabparent), arranges interface for the father's label arranging father's label;
TabgetParent (), obtains interface for the father's label obtaining father's label;
VoidaddChildTab (Tabchild), adds interface for the subtab adding subtab.
Labels class comprises parameter:
ArrayList<Tab>mTabContainer, for depositing the label container of each label in browser,
HashMap<intkey, TabmTab>mTabMap, for the Hash table of map tags, carry out tag storage by key assignments (key, value), can be mapped to corresponding label by key.
IntmCurrentTabKey, for recording the current label key of the key of current label, when not having label in a browser, this parameter initial value is-1.
Labels class comprises interface,
VoidaddTab(TabmTab), the initial labels for adding initial labels in a browser adds interface;
VoidaddTab(intindex, TabmTab), add interface for the label of the label after adding initial labels.
Judge module 120 judges by mCurrentTabKey the new label whether only comprising this generation in browser, as mCurrentTabKey=-1, only comprises the new label of this generation in browser, otherwise, not the new label only comprising this generation in browser.
Add module 130 when mCurrentTabKey=-1, add interface by the initial labels of label container and in the display interface of browser, add this new label and present.Such as: by Tabtab=newtab, by newly-built label assignment to variable tab.Pass through addTab(tab) in the display interface of browser, add this new label and present.In addition, by intkey=tab.hashcode (), calculate the key of new label, hashcode () is the interface for calculating key.By mTabMap.put (key, tab), by new label stored in Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Add module 130 in mCurrentTabKey ≠-1, and new label has father's label, when namely receiving the instruction clicking in the current label presented and link and generate new label, added in the next position of interface in display interface after the current label presented by the subtab of father's label and insert this new label and present.Such as: by Tabtab=newtab, by newly-built label assignment to variable tab.By TabparrentTab=mTabmap.get (mCurrentTabkey), take out the current label presented from Hash table, this label is father's label of new label to be added.By inserting this new label in the next position of parentTab.addchildTab (tab) in display interface after the current label presented and presenting, insert this new label in the next position namely in display interface after father's label and present.In addition, by intkey=tab.hashcode (), the key of new label is calculated.By mTabMap.put (key, tab), by new label stored in Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Add module 130 in mCurrentTabKey ≠-1, and new label does not have father's label, when namely receiving the instruction of label interpolation button in click browser and generate new label, obtain the sorting position of the current label presented in browser display interface, added in the next position of interface after this position by the label of label container and insert this new label.Such as: by Tabtab=newtab, by newly-built label assignment to variable tab.By addTab(index, tab) in the display interface of browser, add this new label and present.Index is that the label of acquisition browser focus is at the sorting position of label in browser display interface.In addition, by intkey=tab.hashcode (), the key of new label is calculated.By mTabMap.put (key, tab), by new label stored in Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Above-mentioned citing is only a kind of embodiment of the embodiment of the present invention, the present invention is not limited thereto, and can implement in several ways.
See Fig. 3, show according to an embodiment of the invention for the structural drawing of the label stopping device of browser.The device 200 of closing label comprises: father's label judge module 210, subtab judge module 220 and label closing module 230.
Father's label judge module 210, is suitable for, when receiving the instruction of closing label, judging whether label to be closed has father's label, judged result being informed to subtab judge module 220.
Subtab judge module 220, being suitable in judged result is when having father's label wait the label of closing, and judges whether this father's label has multiple subtab, and this judged result is informed to label closing module 230.
Label closing module 230, is suitable for when the judged result of the subtab judge module 220 received has multiple subtab for father's label, completes label and closes, and the current label presented is switched to a subtab of the father's label found; The judged result of the subtab judge module 220 received be father's label only with when the label of closing is for subtab, complete label and close, and the current label presented is switched to this father's label.
Wherein, subtab is by clicking the label linking the webpage for loading this link generated in father's label.
Further, label closing module 230, is suitable for after completing label closedown, makes the label be switched to obtain browser focus, to present the label be switched in the display interface of browser.
For example, in the browser label in fig. 2, when receiving the instruction of closing label A 1, father's label judge module 210 judges that label A 1 has father's label, label A, and judged result is notified this subtab judge module 220.Subtab judge module 220 judges that label A has multiple subtab, and judged result is informed to label closing module 230.Label closing module 230, after being closed by label A 1, makes another subtab of label A, label A 2, obtains browser focus, presents label A 2.
Subsequently, when receiving the instruction of closing label A 2, father's label judge module 210 judges that label A 2 has father's label, label A, and judged result is notified this subtab judge module 220.Subtab judge module 220 judge label A only with label A 2 for subtab, and judged result is informed to label closing module 230.Label closing module 230, after being closed by label A 2, makes label A obtain browser focus, presents label A.
Adopt the present embodiment, when closing label, after completing label closedown, preferentially be switched to and the buttoned-up label related label of tool in terms of content, this label and buttoned-up label have identical father's label or both are set membership, and then lacks the problem of relevance between the label presented after solving closedown label and buttoned-up label; Achieve and can automatically present and the beneficial effect of closing the label that label is associated.
See Fig. 4, show according to an embodiment of the invention for the structural drawing of the label stopping device of browser.Device comprises: father's label judge module 210, subtab judge module 220, label closing module 230 and position judging module 240.
Father's label judge module 210, is suitable for, when receiving the instruction of closing label, judging whether label to be closed has father's label, judged result being informed to subtab judge module 220 and position judging module 240.
Subtab judge module 220, being suitable in judged result is when having father's label wait the label of closing, and judges whether this father's label has multiple subtab, and this judged result is informed to label closing module 230.
Label closing module 230, is suitable for when the judged result of the subtab judge module 220 received has multiple subtab for father's label, completes label and closes, and the current label presented is switched to a subtab of the father's label found; The judged result of the subtab judge module 220 received be father's label only with when the label of closing is for subtab, complete label and close, and the current label presented is switched to this father's label.
Position judging module 240, being suitable in judged result is when not having father's label wait the label of closing, and judges whether label to be closed is positioned at browser last, this judged result is informed to label closing module 230.
Label closing module 230, be also suitable for the judged result of position judging module 240 be wait the label of closing be positioned at browser last time, complete label and close, and the current label presented is switched to the upper label before the label of closedown; The judged result of position judging module 240 be wait the label of closing be not be positioned at browser last time, complete label and close, and the current label presented is switched to the next label after the label of closedown.
The present embodiment is only a kind of embodiment of the present invention, the present invention is not limited thereto.Such as, the present invention also can not comprise position judging module 240.Judged result is also informed to label closing module 230 by father's label judge module 210.Label closing module 230 is when not having father's label wait the label of closing in judged result, completes label and closes, and the current label presented is switched to first label, or last label, or arbitrary father's label with subtab.Because when not there is father's label wait the label of closing, the correlation tag of label not closed in the label comprised in browser is described, so in such cases, the present invention is not particularly limited for the label presented after closing.
See Fig. 5, show according to an embodiment of the invention for the structural drawing of the label stopping device of browser.Device comprises: number of labels judge module 250, father's label judge module 210, subtab judge module 220, label closing module 230 and position judging module 240.
Father's label judge module 210, be suitable for when receiving the instruction of closing label, indicating label quantity judge module 250 judges.
Number of labels judge module 250, is suitable for judging whether only comprise label to be closed in browser, and judged result is informed to described label closing module 230,
Father's label judge module 210 is after indicating label quantity judge module 250 judges, wait for the judged result of number of labels judge module 250, be be not when only comprising the label wait closing in browser in judged result, judge whether label to be closed has father's label, judged result is informed to subtab judge module 220 and position judging module 240, when judged result is the label only comprised in browser wait closing, end operation, does not carry out the judgement whether label to be closed has father's label.By which, father's label judge module 210 can be avoided to carry out unnecessary judgement, to save system resource.
Label closing module 230, is suitable for when the judged result of the number of labels judge module 250 received is the label only comprised in browser wait closing, and completes after label is closed and generates new label, and present this new label.
Subtab judge module 220, being suitable in the judged result of father's label judge module 210 is when having father's label wait the label of closing, and judges whether this father's label has multiple subtab, and this judged result is informed to label closing module 230.When the judged result of father's label judge module 210 is, when not having father's label wait the label of closing, do not carry out judgement operation.
Label closing module 230, is also suitable for when the judged result of the subtab judge module 220 received has multiple subtab for father's label, completes label and closes, and the current label presented is switched to a subtab of the father's label found; The judged result of the subtab judge module 220 received be father's label only with when the label of closing is for subtab, complete label and close, and the current label presented is switched to this father's label.
Position judging module 240, being suitable in the judged result of father's label judge module 210 is when not having father's label wait the label of closing, and judges whether label to be closed is positioned at browser last, this judged result is informed to label closing module 230.When the judged result of father's label judge module 210 is, when having father's label wait the label of closing, do not carry out judgement operation.
Label closing module 230, be also suitable for the judged result of position judging module 240 be wait the label of closing be positioned at browser last time, complete label and close, and the current label presented is switched to the upper label before the label of closedown; The judged result of position judging module 240 be wait the label of closing be not be positioned at browser last time, complete label and close, and the current label presented is switched to the next label after the label of closedown.
Above-described embodiment is only the exemplary illustration of the specific embodiment of the present invention, the present invention is not limited thereto, and can implement to realize the present invention by other concrete mode multiple.
See Fig. 6, show the process flow diagram adding tagged method in browser according to an embodiment of the invention.The method comprises the steps.
Step S610, receives the instruction generating new label, generates new label according to instruction.
Step S620, judges whether only comprise this new label in browser, if so, then performs step S630, otherwise, perform step S640.
Step S630, adds this new label in the display interface of browser, and presents this new label.
Step S640, inserts this new label in the next position in the display interface of browser after the current label presented, and presents this new label.
Wherein, present this new label in step S630 and step S640 and comprise further: make new label obtain browser focus, to present this new label in the display interface of browser.
Wherein, step S610 comprises further: after receiving the instruction clicked and link in the current label presented, and generates the new label of the webpage loading this link.
Wherein, step S610 comprises further: after receiving the instruction of label interpolation button in click browser, generates the new label of blank or that loading is default webpage.
Such as, label A, label A 1, label A 2, label B, label B 1, label B 2, label C, label D, label D1 and label D2 to be added in a browser.Wherein, label A 1 and label A 2 are the subtab of label A; Label B 1 and label B 2 are the subtab of label B; Label D1 and label D2 is the subtab of label D.Namely label A 1 and label A 2 add by clicking link in label A, and label B 1 and label B 2 add by clicking link in label B, and label D1 and label D2 adds by clicking link in label D.
Adding procedure in this citing is as follows.Sequence label after interpolation as shown in Figure 2.
First, newly-built label A.Receive the instruction of generating labels A, according to the instruction generating labels A received.Judge only to comprise label A in browser, in the display interface of browser, add label A, make label A obtain browser focus, to present label A.
Click in label A and link, add label A 1.Receive the instruction clicked and link in label A, generate the label A 1 loading webpage in this link.Judge it is not only comprise label A 1 in browser, in the next position in the display interface of browser after the current label A presented, insert label A 1, make label A 1 obtain browser focus, to present label A 1.Namely, after label A 1 is added label A, webpage in label A 1 is presented.
Newly-built label B, adds label B.Receive label in click browser and add the instruction of button, generating labels B.Label B can be blank tag, after label has added, by input network address, loads the webpage of this network address.Or, in the label B of generation, load default webpage.Judge it is not only comprise label B in browser, in the next position in the display interface of browser after the current label A 1 presented, insert label B, make label B obtain browser focus, to present label B.Namely, after label B is added label A 1, content in label B is presented.
Click in label B and link, add label B 1.Receive the instruction clicked and link in label B, generate the label B 1 loading webpage in this link.Judge it is not only comprise label B 1 in browser, in the next position in the display interface of browser after the current label B presented, insert label B 1, make label B 1 obtain browser focus, to present label B 1.Namely, after label B 1 is added label B, webpage in label B 1 is presented.
Click label A, make label A obtain focus, present label A.Click another link in label A, add label A 2.Receive the instruction clicking another link in label A, generate the label A 2 loading webpage in this link.Judge it is not only comprise label A 2 in browser, in the next position in the display interface of browser after the current label A presented, insert label A 2, make label A 2 obtain browser focus, to present label A 2.Namely label A 2 is being added between label A and label A 1, presenting webpage in label A 2.
Newly-built label C, adds label C.Receive label in click browser and add the instruction of button, generating labels C.Label C can be blank tag, after label has added, by input network address, loads the webpage of this network address.Or, in the label C of generation, load default webpage.Judge it is not only comprise label C in browser, in the next position in the display interface of browser after the current label A 2 presented, insert label C, make label C obtain browser focus, to present label C.Namely, after label C is added label A 2, content in label C is presented.
Click label B, make label B obtain focus, present label B.Click another link in label B, add label B 2.Receive the instruction clicking another link in label B, generate the label B 2 loading webpage in this link.Judge it is not only comprise label B 2 in browser, in the next position in the display interface of browser after the current label B presented, insert label B 2, make label B 2 obtain browser focus, to present label B 2.Namely, after label B 2 is added label B, webpage in label B 2 is presented.
Click label B 1, make label B 1 obtain focus, present label B 1.Newly-built label D, adds label D.Receive label in click browser and add the instruction of button, generating labels D.Label D can be blank tag, after label has added, by input network address, loads the webpage of this network address.Or, in the label D of generation, load default webpage.Judge it is not only comprise label D in browser, in the next position in the display interface of browser after the current label B 1 presented, insert label D, make label D obtain browser focus, to present label D.Namely, after label D is added label B 1, content in label D is presented.
In label D, one click first links and the second link, adds label D1 and label D2.Such as, by after pinning ctrl key in label D, click the mode of the first link and the second link, realize one click first in label D and link and second to link.Receive the instruction clicking the first link in label D, generate the label D1 loading webpage in this link; Receive the instruction clicking the second link in label D, generate the label D2 loading webpage in this link.Judge it is not only comprise label D1 in browser, not only comprise label D2 in browser, insert label D1 in next position in the display interface of browser after the current label D presented, between the label D1 of the current label D that presents and interpolation in the display interface of browser, add label D2.Label D2 obtains browser focus, presents label D2.
In the present embodiment, when adding label, the position of new label all after the current label presented, and then the problem that the label browsed before solving interpolation is far away with the label spacing of newly adding; The label browsed before making interpolation is adjacent with the label newly added, and achieves while presenting the new label added, the beneficial effect of the label browsed before being easy to find out interpolation.
In one embodiment, step S610 comprises further: after receiving the instruction clicked and link in the current label presented, and generates the new label of the webpage loading this link.The current label presented is father's label of new label, and new label is the subtab of the current label presented.
Step S640 comprises further: be when not being the new label only comprising described generation in browser in judged result, determine that in the display interface of browser, the current label presented is father's label of new label, added in the next position of interface in display interface after the current label presented by the subtab of father's label and insert this new label and present.
In another embodiment, step S610 comprises further: after receiving the instruction of label interpolation button in click browser, generates the new label of blank or that loading is default webpage.
Step S640 comprises further: be when not being the new label only comprising described generation in browser in judged result, obtain the sorting position of the current label presented in browser display interface, added in the next position of interface after this position by the label of label container and insert this new label;
Label container is used for depositing each label in browser.
For example, labels class Tab and label container class TabContainer is set.
The object of labels class is label, and labels class Tab comprises interface:
VoidsetParentTab (Tabparent), arranges interface for the father's label arranging father's label;
TabgetParent (), obtains interface for the father's label obtaining father's label;
VoidaddChildTab (Tabchild), adds interface for the subtab adding subtab.
Labels class comprises parameter:
ArrayList<Tab>mTabContainer, for depositing the label container of each label in browser,
HashMap<intkey, TabmTab>mTabMap, for the Hash table of map tags, carry out tag storage by key assignments (key, value), can be mapped to corresponding label by key.
IntmCurrentTabKey, for recording the current label key of the key of current label, when not having label in a browser, this parameter initial value is-1.
Labels class comprises interface,
VoidaddTab(TabmTab), the initial labels for adding initial labels in a browser adds interface;
VoidaddTab(intindex, TabmTab), add interface for the label of the label after adding initial labels.
In step S620, judge by mCurrentTabKey the new label whether only comprising this generation in browser, as mCurrentTabKey=-1, in browser, only comprise the new label of this generation, otherwise, not the new label only comprising this generation in browser.
In step S630, when mCurrentTabKey=-1, add interface by the initial labels of label container and in the display interface of browser, add this new label and present.Such as: by Tabtab=newtab, by newly-built label assignment to variable tab.Pass through addTab(tab) in the display interface of browser, add this new label and present.In addition, by intkey=tab.hashcode (), calculate the key of new label, hashcode () is the interface for calculating key.By mTabMap.put (key, tab), by new label stored in Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
In step S640, in mCurrentTabKey ≠-1, and new label has father's label, when namely receiving the instruction clicking in the current label presented and link and generate new label, added in the next position of interface in display interface after the current label presented by the subtab of father's label and insert this new label and present.Such as: by Tabtab=newtab, by newly-built label assignment to variable tab.By TabparrentTab=mTabmap.get (mCurrentTabkey), take out the current label presented from Hash table, this label is father's label of new label to be added.By inserting this new label in the next position of parentTab.addchildTab (tab) in display interface after the current label presented and presenting, insert this new label in the next position namely in display interface after father's label and present.In addition, by intkey=tab.hashcode (), the key of new label is calculated.By mTabMap.put (key, tab), by new label stored in Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
In step S640, in mCurrentTabKey ≠-1, and new label does not have father's label, when namely receiving the instruction of label interpolation button in click browser and generate new label, obtain the sorting position of the current label presented in browser display interface, added in the next position of interface after this position by the label of label container and insert this new label.Such as: by Tabtab=newtab, by newly-built label assignment to variable tab.By addTab(index, tab) in the display interface of browser, add this new label and present.Index is that the label of acquisition browser focus is at the sorting position of label in browser display interface.In addition, by intkey=tab.hashcode (), the key of new label is calculated.By mTabMap.put (key, tab), by new label stored in Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Above-mentioned citing is only a kind of embodiment of the embodiment of the present invention, the present invention is not limited thereto, and can implement in several ways.
See Fig. 7, show according to an embodiment of the invention for the process flow diagram of the label method for closing of browser.
Step S710, receives the instruction of closing label.
Step S720, judges whether label to be closed has father's label, if having father's label, then performs step S730, otherwise, perform step S760.
Wherein, subtab is by clicking the label linking the webpage for loading this link generated in father's label.If label is for generating by clicking link in another label, then this label has father's label.
Step S730, judges whether this father's label has multiple subtab, if had, then performs step S740, otherwise, perform step S750.
Step S740, completes label and closes, the current label presented is switched to a subtab of this father's label found.
Further, the subtab be switched to is made to obtain browser focus, to present this subtab in the display interface of browser.
Step S750, completes label and closes, the current label presented is switched to this father's label.
Further, the father's label be switched to is made to obtain browser focus, to present this father's label in the display interface of browser.
Step S760, completes label and closes.
Further, can judge in step S760 whether label to be closed is positioned at browser last, if it is last to be positioned at browser, then completes label and close, the current label presented is switched to the upper label before the label of closedown; Last if not being positioned at browser, then complete label and close, the current label presented is switched to the next label after the label of closedown.
Herein, be only a kind of embodiment of step S760, the present invention is not limited thereto.Such as, can be also when not there is father's label wait the label of closing in judged result, complete label and close, and the current label presented is switched to first label, or last label, or arbitrary father's label with subtab.Because when not there is father's label wait the label of closing, the correlation tag of label not closed in the label comprised in browser is described, so in such cases, the present invention is not particularly limited for the label presented after closing.
Below the present embodiment being illustrated, in the browser label in fig. 2, when receiving the instruction of closing label A 1, judging that label A 1 has father's label, label A.Then, judge that label A has multiple subtab, after being closed by label A 1, make another subtab of label A, label A 2, obtain browser focus, present label A 2.
Subsequently, when receiving the instruction of closing label A 2, judge that label A 2 has father's label, label A.Then, judge label A only with label A 2 for subtab, after label A 2 is closed, make label A obtain browser focus, present label A.
Adopt the present embodiment, when closing label, after completing label closedown, preferentially be switched to and the buttoned-up label related label of tool in terms of content, this label and buttoned-up label have identical father's label or both are set membership, and then lacks the problem of relevance between the label presented after solving closedown label and buttoned-up label; Achieve and can automatically present and the beneficial effect of closing the label that label is associated.
See Fig. 8, show according to an embodiment of the invention for the process flow diagram of the label method for closing of browser.
Step S8010, receives the instruction of closing label.
Step S8020, judges whether only comprise label to be closed in browser, if so, then performs step S8030, otherwise, perform step S8040.
Step S8030, completes after label is closed and generates new label, and present this new label.
Step S8040, judges whether label to be closed has father's label, if having father's label, then performs step S8050, otherwise, perform step S8080.
Wherein, subtab is by clicking the label linking the webpage for loading this link generated in father's label.If namely label is for generating by clicking link in another label, then this label has father's label.
Step S8050, judges whether this father's label has multiple subtab, if had, then performs step S8060, otherwise, perform step S8070.
Step S8060, completes label and closes, the current label presented is switched to a subtab of this father's label found.
Further, the subtab be switched to is made to obtain browser focus, to present this subtab in the display interface of browser.
Step S8070, completes label and closes, the current label presented is switched to this father's label.
Further, the father's label be switched to is made to obtain browser focus, to present this father's label in the display interface of browser.
Step S8080, judges whether label to be closed is positioned at browser last, if so, then performs step S8090, otherwise, perform step S8100.
Step S8090, completes label and closes, the current label presented is switched to the upper label before the label of closedown.
Step S8100, completes label and closes, the current label presented is switched to the next label after the label of closedown.
Above-described embodiment is only the exemplary illustration of the specific embodiment of the present invention, the present invention is not limited thereto, and can implement to realize the present invention by other concrete mode multiple.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (4)

1., for a label stopping device for browser, described device comprises:
Father's label judge module, is suitable for, when receiving the instruction of closing label, judging whether label to be closed has father's label, judged result being informed to subtab judge module;
Subtab judge module, being suitable in judged result is when having father's label wait the label of closing, and judges whether this father's label has multiple subtab, and this judged result is informed to label closing module;
Label closing module, is suitable for when the judged result of the subtab judge module received has multiple subtab for father's label, completes label and closes, and the current label presented is switched to a subtab of the father's label found; The judged result of the subtab judge module received be father's label only with when the label of closing is for subtab, complete label and close, and the current label presented is switched to this father's label;
Described subtab is the label by clicking the webpage for loading this link that link generates in described father's label;
Wherein, described label closing module, is further adapted for after completing label closedown, makes the label be switched to obtain browser focus, to present the label be switched in the display interface of browser;
Wherein, described device also comprises: number of labels judge module,
Described father's label judge module, be further adapted for after receiving the instruction of closing label, indicating label quantity judge module carries out the judgement whether only comprising label to be closed in browser, be be not when only comprising the label wait closing in browser in the judged result of number of labels judge module, judge whether label to be closed has father's label, judged result is informed to subtab judge module, when the judged result of number of labels judge module is the label only comprised in browser wait closing, end operation, do not carry out the judgement whether label to be closed has father's label,
Described number of labels judge module, is also suitable for judged result being informed to described label closing module;
Described label closing module, is also suitable for when the judged result of the described number of labels judge module received is the label only comprised in browser wait closing, and completes after label is closed and generates new label, and present this new label.
2. device according to claim 1, wherein,
Described device also comprises: position judging module,
Described father's label judge module, is also suitable for judged result to inform to described position judging module;
Described position judging module, being suitable in judged result is when not having father's label wait the label of closing, and judges whether label to be closed is positioned at browser last, this judged result is informed to label closing module;
Described label closing module, be also suitable for the judged result of described position judging module be wait the label of closing be positioned at browser last time, complete label and close, and the current label presented is switched to the upper label before the label of closedown; The judged result of position judging module be wait the label of closing be not be positioned at browser last time, complete label and close, and the current label presented is switched to the next label after the label of closedown.
3., for a label method for closing for browser, described method comprises:
When receiving the instruction of closing label, judging whether label to be closed has father's label, if having father's label, then judging whether this father's label has multiple subtab further;
If this father's label has multiple subtab, then complete label and close, the current label presented is switched to a subtab of this father's label found;
If this father's label only with this label to be closed for subtab, then complete label close, the current label presented is switched to this father's label;
Described subtab is the label by clicking the webpage for loading this link that link generates in described father's label;
Wherein, the described subtab of this father's label found that switched to by the current label presented comprises further: make the subtab be switched to obtain browser focus, to present this subtab in the display interface of browser;
Describedly this father's label is switched to comprise further on the current label presented: to make the father's label be switched to obtain browser focus, to present this father's label in the display interface of browser;
Wherein, judging also to comprise before whether label to be closed has father's label:
Judge whether only comprise label to be closed in browser, if so, then complete after label is closed and generate new label, and present this new label.
4. method according to claim 3, wherein, described method also comprises:
When not there is father's label wait the label of closing, judge whether label to be closed is positioned at browser last;
If it is last to be positioned at browser, then completes label and close, the current label presented is switched to the upper label before the label of closedown;
Last if not being positioned at browser, then complete label and close, the current label presented is switched to the next label after the label of closedown.
CN201210537245.9A 2012-12-12 2012-12-12 For label stopping device and the method for browser Expired - Fee Related CN103049313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210537245.9A CN103049313B (en) 2012-12-12 2012-12-12 For label stopping device and the method for browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210537245.9A CN103049313B (en) 2012-12-12 2012-12-12 For label stopping device and the method for browser

Publications (2)

Publication Number Publication Date
CN103049313A CN103049313A (en) 2013-04-17
CN103049313B true CN103049313B (en) 2015-11-25

Family

ID=48061963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210537245.9A Expired - Fee Related CN103049313B (en) 2012-12-12 2012-12-12 For label stopping device and the method for browser

Country Status (1)

Country Link
CN (1) CN103049313B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103472977B (en) * 2013-09-24 2017-05-24 北京奇虎科技有限公司 Method and device for activating next label page when label page is closed
CN109901837A (en) * 2019-02-27 2019-06-18 海信电子科技(深圳)有限公司 For showing the page display method and device of equipment
US10977331B2 (en) 2019-07-24 2021-04-13 International Business Machines Corporation Closing a plurality of webpages in a browser

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539912A (en) * 2008-03-18 2009-09-23 林福来 Method for browsing webpages by tree browser

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539912A (en) * 2008-03-18 2009-09-23 林福来 Method for browsing webpages by tree browser

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
值得一用Firefox2_0秘籍一箩筐;小老虎;《电脑爱好者》;20070831;第40页 *

Also Published As

Publication number Publication date
CN103049313A (en) 2013-04-17

Similar Documents

Publication Publication Date Title
CN102902815B (en) For the result display systems of search engine
CN102890724B (en) webpage loading method and device
CN102902816B (en) Search Results display packing, system and client
CN105426538A (en) Page switching method and device
CN110806873B (en) Target control determining method and device, electronic equipment and storage medium
CN103034643A (en) Method and device for file downloading
CN104461239A (en) Information interaction method and device
CN103023972B (en) A kind of method and apparatus that file is managed
CN105260421A (en) Webpage loading method and apparatus
CN104317931A (en) Webpage title determining method and device
CN103049313B (en) For label stopping device and the method for browser
CN105183890A (en) Webpage loading method based on browser and browser device
CN102982118A (en) Searching method and device based on favorites
CN103714002A (en) Project testing method and device based on configuration system
CN105045789A (en) Game server database buffer memory method and system
CN104462142A (en) Method and device for searching for content in webpage
CN104375814A (en) Generation method and device of an interface document
CN104424239A (en) Resource file loading method and device
CN102999591B (en) File management method and device
CN107451270B (en) Page display method, electronic equipment and computer storage media
CN103019715B (en) The apparatus and method of label are closed in browser
CN103049507A (en) Label adding device and method for browser
CN105389393A (en) Method and device for adjusting browser display information in browser recommendation list
CN104317929A (en) Search result display optimizing method and device
CN103152426A (en) Server, system and method for preloading webpage browsed by client side

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151125

Termination date: 20211212

CF01 Termination of patent right due to non-payment of annual fee