CN103049507A - Label adding device and method for browser - Google Patents

Label adding device and method for browser Download PDF

Info

Publication number
CN103049507A
CN103049507A CN2012105371121A CN201210537112A CN103049507A CN 103049507 A CN103049507 A CN 103049507A CN 2012105371121 A CN2012105371121 A CN 2012105371121A CN 201210537112 A CN201210537112 A CN 201210537112A CN 103049507 A CN103049507 A CN 103049507A
Authority
CN
China
Prior art keywords
label
browser
new
presents
new label
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.)
Pending
Application number
CN2012105371121A
Other languages
Chinese (zh)
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 CN2012105371121A priority Critical patent/CN103049507A/en
Publication of CN103049507A publication Critical patent/CN103049507A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to the technical field of network data communication and discloses a label adding device and method for a browser. The label adding method includes that an instruction for generating a new label is received, the new label is generated according to the instruction, and whether the browser only comprises the new label is judged; if the browser only comprises the new label, the new label is added into a display interface of the browser and presented; otherwise, the new label is inserted into the next position after the currently presented label in the display interface of the browser and presented; and the step for presenting the new label further includes that the new label is enabled to acquire a browser focal point so that the new label is presented on the display interface of the browser. The label adding device and method have the advantages that the technical problem of long distance between a label browsed before adding and the newly added label can be solved, the newly added label is presented, and simultaneously, the label browsed before adding can be easily found out.

Description

The label adding set and the method that are used for browser
Technical field
The present invention relates to the network data communication technical field, be specifically related to a kind of label adding set and method for browser.
Background technology
In the prior art, when adding label, the label that newly adds is arranged in the browser tag sorting backmost.Because each new label that adds all can be presented, and namely represents webpage in the label in browser.So, when label is more in the browser, can produce problem distant between the label of browsing before the interpolation and the label that newly adds, and then be difficult to from sequence label, find out the label that adds front browsing.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of label adding set and method of being used for browser that overcomes the problems referred to above or address the above problem at least in part is provided.
According to one aspect of the present invention, a kind of label adding set for browser is provided, described device comprises:
Generation module is suitable for receiving the indication that generates new label, generates new label according to described indication;
Judge module is suitable for judging the new label that whether only comprises described generation in the browser, and judged result is notified to adding module;
Add module, being suitable in judged result is when only comprising the new label of described generation in the browser, adds this new label and present in the display interface of browser; Be not to be when only comprising the new label of described generation in the browser in judged result, insert this new label in the next position in the display interface of browser after the current label that presents, and present this new label;
Wherein, described interpolation module is further adapted for and makes new label obtain browser focus, to present this new label in the display interface of browser.
Alternatively, described generation module, be further adapted for receive click the indication that links in the current label that presents after, generate the new label of the webpage that loads this link;
Father's label that the described current label that presents is described new label, described new label is the subtab of the described current label that presents;
Described interpolation module, being further adapted in judged result is not to be when only comprising the new label of described generation in the browser, determine father's label that the current label that presents is new label in the display interface of browser, the subtab by father's label adds interface and inserts this new label in the next position after the current label that presents and present in display interface.
Alternatively, described generation module, be further adapted for receive the indication that label in the click browser adds button after, generate blank or load the new label of default webpage;
Described interpolation module, being further adapted in judged result is not to be when only comprising the new label of described generation in the browser, obtain the sorting position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container;
Described label container is used for depositing each label of browser.
A kind of label addition method for browser is provided according to a further aspect in the invention, and described method comprises:
Receive the indication that generates new label, generate new label according to described indication, judge whether only comprise this new label in the browser;
If so, then in the display interface of browser, add this new label, and present this new label;
If not, then in the display interface of browser, insert this new label in the next position after the current label that presents, and present this new label;
Wherein, described this new label that presents further comprises: make new label obtain browser focus, to present this new label in the display interface of browser.
Alternatively, described reception generates the indication of new label, generates new label according to described indication and further comprises:
After receiving the indication that links in the current label that presents of click, generate the new label of the webpage that loads this link; Father's label that the described current label that presents is described new label, described new label is the subtab of the described current label that presents;
Described this new label that inserts in the next position after the current label that presents in the display interface of browser further comprises:
Determine father's label that the current label that presents is new label in the display interface, the subtab by father's label adds interface and insert this new label in the next position after the current label that presents in display interface.
Alternatively, described reception generates the indication of new label, generates new label according to described indication and further comprises:
After receiving the indication of label interpolation button in the click browser, generate new the label blank or webpage that loading is default;
Described this new label that inserts in the next position after the current label that presents in the display interface of browser further comprises:
Obtain the arrangement position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container;
Described label container is used for depositing each label of browser.
According to technical scheme of the present invention, can after receiving the indication that generates new label, generate new label according to this indication.When in browser, only comprising this new label, in the display interface of browser, add this new label, and present this new label.Not when only comprising this new label in browser, insert this new label in the next position in the display interface of browser after the current label that presents, and present this new label.Thus, so that when adding label, new label is the position the current label that presents after all at every turn, and then solved problem distant between the label of the label browsed before adding and newly interpolation; So that the label of browsing before adding is adjacent with the new label that adds, obtained when presenting the label of new interpolation, be easy to find out the beneficial effect of the label of browsing before the interpolation.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows the structural drawing that is used for according to an embodiment of the invention the label adding set of browser;
Fig. 2 shows according to the tag sorting in the browser behind the interpolation label in the one embodiment of the invention;
Fig. 3 shows the structural drawing of closing the device of label in the browser according to an embodiment of the invention;
Fig. 4 shows the structural drawing of closing the device of label in the browser according to an embodiment of the invention;
Fig. 5 shows the structural drawing of closing the device of label in the browser according to an embodiment of the invention;
Fig. 6 shows the process flow diagram that is used for according to an embodiment of the invention the label addition method of browser;
Fig. 7 shows the process flow diagram of closing the method for label in the browser according to an embodiment of the invention; And
Fig. 8 shows the process flow diagram of closing the method for label in the browser according to an embodiment of the invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
Referring to Fig. 1, show the structural drawing that adds according to an embodiment of the invention label apparatus.This interpolation label apparatus 100 comprises: generation module 110, judge module 120 and interpolation module 130.
Generation module 110 is suitable for receiving the indication that generates new label, generates new label according to the indication that receives.
Judge module 120 is suitable for judging the new label that whether only comprises this generation in the browser, and judged result is notified to adding module 130.
Add module 130, being suitable in judged result is when only comprising the new label of this generation in the browser, adds this new label and present in the display interface of browser; Be not to be when only comprising the new label of this generation in the browser in judged result, insert this new label in the next position in the display interface of browser after the current label that presents, and present this new label.
In the present embodiment, browser can for mobile phone browser, PC browser or PAD browser, be 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 and receives the indication that links in the current label that presents of click, generate the new label of the webpage that loads this link.
Wherein, after generation module 110 is further adapted for the indication that receives label interpolation button in the click browser, generate new the label blank or webpage that loading is default.
For example, in browser, to add 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.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 are the subtab of label D.Be that label A 1 and label A 2 add by clicking to link in the label A, label B 1 and label B 2 add by clicking to link in the label B, and label D1 and label D2 add by clicking to link among the label D.
Adding procedure in should giving an example is as follows.Sequence label after the interpolation as shown in Figure 2.
At first, newly-built label A.Generation module 110 receives the indication of generating labels A, according to the indication generating labels A that receives.Judge module 120 is judged and is only comprised label A in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, add label A, make label A obtain browser focus, to present label A.
Click in the label A and link interpolation label A 1.Generation module 110 receives clicks the indication that links in the label A, generates the label A 1 that loads webpage in this link.It is not only to comprise label A 1 that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label A 1 in the next position after the current label A that presents, make label A 1 obtain browser focus, to present label A 1.Namely after label A 1 is added label A, present webpage in the label A 1.
Newly-built label B adds label B.Generation module 110 receives the indication of label interpolation button in the click browser, generating labels B.Label B can be blank tag, after the label interpolation is finished, by the input network address, loads the webpage of this network address.Perhaps, load default webpage in the label B of generation.It is not only to comprise label B that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label B in the next position after the current label A that presents 1, make label B obtain browser focus, to present label B.Namely after label B is added label A 1, present content in the label B.
Click in the label B and link interpolation label B 1.Generation module 110 receives clicks the indication that links in the label B, generates the label B 1 that loads webpage in this link.It is not only to comprise label B 1 that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label B 1 in the next position after the current label B that presents, make label B 1 obtain browser focus, to present label B 1.Namely after label B 1 is added label B, present webpage in the label B 1.
Click label A, so that label A obtains focus, present label A.Click another link in the label A, add label A 2.Generation module 110 receives the indication of clicking another link in the label A, generates the label A 2 that loads webpage in this link.It is not only to comprise label A 2 that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label A 2 in the next position after the current label A that presents, make label A 2 obtain browser focus, to present label A 2.Namely in that label A 2 is added between label A and the label A 1, present webpage in the label A 2.
Newly-built label C adds label C.Generation module 110 receives the indication of label interpolation button in the click browser, generating labels C.Label C can be blank tag, after the label interpolation is finished, by the input network address, loads the webpage of this network address.Perhaps, load default webpage in the label C of generation.It is not only to comprise label C that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label C in the next position after the current label A that presents 2, make label C obtain browser focus, to present label C.Namely after label C is added label A 2, present content in the label C.
Click label B, so that label B obtains focus, present label B.Click another link in the label B, add label B 2.Generation module 110 receives the indication of clicking another link in the label B, generates the label B 2 that loads webpage in this link.It is not only to comprise label B 2 that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label B 2 in the next position after the current label B that presents, make label B 2 obtain browser focus, to present label B 2.Namely after label B 2 is added label B, present webpage in the label B 2.
Click label B 1, so that label B 1 obtains focus, present label B 1.Newly-built label D adds label D.Generation module 110 receives the indication of label interpolation button in the click browser, generating labels D.Label D can be blank tag, after the label interpolation is finished, by the input network address, loads the webpage of this network address.Perhaps, load default webpage among the label D of generation.It is not only to comprise label D that judge module 120 is judged in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label D in the next position after the current label B that presents 1, make label D obtain browser focus, to present label D.Namely after label D is added label B 1, present content among the label D.
Label D1 and label D2 are added in one click the first link and the second link in label D.For example, in label D, by after pinning the ctrl key, click the mode of the first link and the second link, be implemented in one click the first link and the second link among the label D.Generation module 110 receives the indication of clicking the first link among the label D, generates the label D1 that loads webpage in this link; Receive the indication of clicking the second link among the label D, generate the label D2 that loads webpage in this link.It is not only to comprise label D1 that judge module 120 is judged in the browser, is not only to comprise label D2 in the browser, and judged result is notified to adding module 130.Add module 130 and in the display interface of browser, insert label D1 in the next position after the current label D that presents, in the display interface of browser, add label D2 between the label D1 of the current label D that presents and interpolation.Label D2 obtains browser focus, presents label D2.
In the present embodiment, when adding label, new label is the position after the current label that presents all, and then has solved problem distant between the label of browsing before the interpolation and the label that newly adds; So that the label of browsing before adding is adjacent with the new label that adds, obtained when presenting the label of new interpolation, be easy to find out the beneficial effect of the label of browsing before the interpolation.
In one embodiment, after generation module 110 is further adapted for and receives the indication that links in the current label that presents of click, generate the new label of the webpage that loads this link.Father's label that the current label that presents is new label, new label is the subtab of the current label that presents.
It is not to be when only comprising the new label of described generation in the browser that interpolation module 130 is further adapted in judged result, determine father's label that the current label that presents is new label in the display interface of browser, the subtab by father's label adds interface and inserts this new label in the next position after the current label that presents and present in display interface.
In another embodiment, after generation module 110 is further adapted for the indication that receives label interpolation button in the click browser, generate new the label blank or webpage that loading is default.
It is not to be when only comprising the new label of described generation in the browser that interpolation module 130 is further adapted in judged result, obtain the sorting position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container;
Label container is used for depositing each label of browser.
For example, in the interpolation module 130 labels class Tab and label container class TabContainer are set.
The object of labels class is label, and labels class Tab comprises interface:
Void setParentTab (Tab parent) arranges interface for father's label that father's label is set;
Tab getParent () obtains interface for the father's label that obtains father's label;
Void addChildTab (Tab child), the subtab that is used for the interpolation subtab adds interface.
Labels class comprises parameter:
ArrayList<Tab〉mTabContainer, for the label container of depositing each label of browser,
HashMap<int key, Tab mTab〉mTabMap, the Hash table for map tags carries out tag storage by key assignments (key, value), can be mapped to corresponding label by key.
Int mCurrentTabKey, for the current label key of the key that records current label, when not having label in browser, this parameter initial value is-1.
Labels class comprises interface,
Void addTab(Tab mTab), be used for adding at browser the initial labels interpolation interface of initial labels;
Void addTab(int index, Tab mTab), the label that is used for interpolation initial labels label afterwards adds interface.
Judge module 120 is judged the new label that whether only comprises this generation in the browser by mCurrentTabKey, when mCurrentTabKey=-1, only comprises the new label of this generation in the browser, otherwise, not the new label that only comprises this generation in the 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.For example: by Tab tab=new tab, with 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 int key=tab.hashcode (), calculate the key of new label, hashcode () is for being used for calculating the interface of key.By mTabMap.put (key, tab), new label is deposited in the Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Add module 130 in mCurrentTabKey ≠-1, and new label has father's label, namely receive and click the indication that links in the current label that presents and when generating new label, the subtab by father's label adds interface and inserts this new label in the next position after the current label that presents and present in display interface.For example: by Tab tab=new tab, with newly-built label assignment to variable tab.By TabparrentTab=mTabmap.get (mCurrentTabkey), from Hash table, take out the current label that presents, this label is father's label of new label to be added.In display interface, insert this new label in the next position after the current label that presents and present by parentTab.addchildTab (tab), be i.e. this new label of insertion and presenting in the next position after father's label in display interface.In addition, by int key=tab.hashcode (), calculate the key of new label.By mTabMap.put (key, tab), new label is deposited in the Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Add module 130 in mCurrentTabKey ≠-1, and new label does not have father's label, receive namely that label in the click browser adds the indication of button and when generating new label, obtain the sorting position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container.For example: by Tab tab=new tab, with newly-built label assignment to variable tab.By addTab(index, tab) in the display interface of browser, add this new label and present.Index obtains the label of browser focus at the sorting position of label in the browser display interface.In addition, by int key=tab.hashcode (), calculate the key of new label.By mTabMap.put (key, tab), new label is deposited in the Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Above-mentioned only is a kind of embodiment of the embodiment of the invention for example, the invention is not restricted to this, can implement in several ways.
Referring to Fig. 3, show the structural drawing of closing the device of label in the browser according to an embodiment of the invention.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 indication of closing label, judges that whether label to be closed has father's label, notifies judged result to subtab judge module 220.
Subtab judge module 220, being suitable in judged result is label to be closed when having father's label, judges whether this father's label has a plurality of subtabs, and this judged result is notified to label closing module 230.
Label closing module 230 is suitable for finishing label and closing when the judged result of the subtab judge module 220 that receives has a plurality of subtab for father's label, and the current label that presents is switched to a subtab of the father's label that finds; During only take label to be closed as subtab, finish label to close, and the current label that presents is switched to this father's label for father's label in the judged result of the subtab judge module 220 that receives.
Wherein, subtab is for linking the label for the webpage that loads this link that generates by clicking in father's label.
Further, label closing module 230 is suitable for after finishing label and closing, and makes the label that switches to obtain browser focus, to present the label that switches in the display interface of browser.
For example, in the browser label shown in Fig. 2, when receiving the indication of closing label A 1, father's label judge module 210 is judged label A 1 and is had father's label, label A, and notify this subtab judge module 220 with judged result.Subtab judge module 220 is judged label A and is had a plurality of subtabs, and judged result is notified to label closing module 230.Label closing module 230 after label A 1 closed, makes another subtab of label A, and label A 2 obtains browser focus, presents label A 2.
Subsequently, when receiving the indication of closing label A 2, father's label judge module 210 is judged label A 2 and is had father's label, label A, and notify this subtab judge module 220 with judged result.Subtab judge module 220 is judged label A only take label A 2 as subtab, and judged result is notified to label closing module 230.Label closing module 230 after label A 2 closed, makes label A obtain browser focus, presents label A.
Adopt present embodiment, when closing label, after finishing label and closing, preferentially switch 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 has solved the problem that lacks relevance between the label that presents behind the label and buttoned-up label of closing; Obtained and automatically to have presented and the beneficial effect of closing the label that label is associated.
Referring to Fig. 4, show the structural drawing of closing the device of label in the browser according to an embodiment of the invention.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 indication of closing label, judges whether label to be closed has father's label, and judged result is notified to subtab judge module 220 and position judging module 240.
Subtab judge module 220, being suitable in judged result is label to be closed when having father's label, judges whether this father's label has a plurality of subtabs, and this judged result is notified to label closing module 230.
Label closing module 230 is suitable for finishing label and closing when the judged result of the subtab judge module 220 that receives has a plurality of subtab for father's label, and the current label that presents is switched to a subtab of the father's label that finds; During only take label to be closed as subtab, finish label to close, and the current label that presents is switched to this father's label for father's label in the judged result of the subtab judge module 220 that receives.
Position judging module 240, being suitable in judged result is label to be closed when not having father's label, it is last to judge whether label to be closed is positioned at browser, and this judged result is notified to label closing module 230.
Label closing module 230 also is suitable for judged result in position judging module 240 and is label to be closed and is positioned at browser when last, finishes label and closes, and the current label that presents switched to a upper label before the label of closing; Be that label to be closed is not to be positioned at browser when last in the judged result of position judging module 240, finish label and close, and the current label that presents switched to next label after the label of closing.
Present embodiment only is a kind of embodiment of the present invention, the invention is not restricted to this.For example, the present invention also can not comprise position judging module 240.Father's label judge module 210 also notifies judged result to label closing module 230.Label closing module 230 is label to be closed when not having father's label in judged result, finishes label and closes, and the current label that presents is switched to first label, perhaps last label, perhaps arbitrary father's label with subtab.Because when label to be closed does not have father's label, the correlation tag of label not closed in the label that comprises in the browser is described, so in such cases, the present invention is not particularly limited for the label that presents after closing.
Referring to Fig. 5, show the structural drawing of closing the device of label in the browser according to an embodiment of the invention.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 is suitable for when receiving the indication of closing label, and indicating label quantity judge module 250 is judged.
Number of labels judge module 250 is suitable for judging whether only comprise label to be closed in the browser, and judged result is notified to described label closing module 230,
Father's label judge module 210 is after indicating label quantity judge module 250 is judged, wait for the judged result of number of labels judge module 250, be not to be when only comprising label to be closed in the browser in judged result, judge whether label to be closed has father's label, judged result is notified to subtab judge module 220 and position judging module 240, be when only comprising label to be closed in the browser in judged result, end operation, whether label not closed has the judgement of father's label.By this mode, can avoid father's label judge module 210 to carry out unnecessary judgement, with conserve system resources.
Label closing module 230, the judged result that is suitable at the number of labels judge module 250 that receives is when only comprising label to be closed in the browser, finishes label and closes the new label of rear generation, and present this new label.
Subtab judge module 220 when being suitable for judged result at father's label judge module 210 and being label to be closed and having father's label, is judged whether this father's label has a plurality of subtabs, and this judged result is notified to label closing module 230.When the judged result of father's label judge module 210 is label to be closed when not having father's label, do not carry out decision operation.
Label closing module 230 also is suitable for finishing label and closing when the judged result of the subtab judge module 220 that receives has a plurality of subtab for father's label, and the current label that presents is switched to a subtab of the father's label that finds; During only take label to be closed as subtab, finish label to close, and the current label that presents is switched to this father's label for father's label in the judged result of the subtab judge module 220 that receives.
Position judging module 240, when being suitable for judged result at father's label judge module 210 and being label to be closed and not having father's label, it is last to judge whether label to be closed is positioned at browser, and this judged result is notified to label closing module 230.When the judged result of father's label judge module 210 is label to be closed when having father's label, do not carry out decision operation.
Label closing module 230 also is suitable for judged result in position judging module 240 and is label to be closed and is positioned at browser when last, finishes label and closes, and the current label that presents switched to a upper label before the label of closing; Be that label to be closed is not to be positioned at browser when last in the judged result of position judging module 240, finish label and close, and the current label that presents switched to next label after the label of closing.
Above-described embodiment is the exemplary illustration of the specific embodiment of the present invention only, the invention is not restricted to this, can implement to realize the present invention by multiple other concrete mode.
Referring to Fig. 6, show the process flow diagram that is used for according to an embodiment of the invention the label addition method of browser.The method comprises the steps.
Step S610 receives the indication that generates new label, generates new label according to indication.
Step S620 judges whether only comprise this new label in the browser, if so, and execution in step S630 then, otherwise, execution in step S640.
Step S630 adds this new label, and presents this new label in the display interface of browser.
Step S640 inserts this new label, and presents this new label in the next position in the display interface of browser after the current label that presents.
Wherein, present this new label among step S630 and the step S640 and further comprise: make new label obtain browser focus, in the display interface of browser, to present this new label.
Wherein, step S610 further comprises: after receiving the indication that links in the current label that presents of click, generate the new label of the webpage that loads this link.
Wherein, step S610 further comprises: after receiving the indication of label interpolation button in the click browser, generate new the label blank or webpage that loading is default.
For example, in browser, to add 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.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 are the subtab of label D.Be that label A 1 and label A 2 add by clicking to link in the label A, label B 1 and label B 2 add by clicking to link in the label B, and label D1 and label D2 add by clicking to link among the label D.
Adding procedure in should giving an example is as follows.Sequence label after the interpolation as shown in Figure 2.
At first, newly-built label A.Receive the indication of generating labels A, according to the indication generating labels A that receives.Judge and only comprise label A in the browser, in the display interface of browser, add label A, make label A obtain browser focus, to present label A.
Click in the label A and link interpolation label A 1.Receive and click the indication that links in the label A, generate the label A 1 that loads webpage in this link.Judging in the browser is not only to comprise label A 1, inserts label A 1 in the next position in the display interface of browser after the current label A that presents, and makes label A 1 obtain browser focus, to present label A 1.Namely after label A 1 is added label A, present webpage in the label A 1.
Newly-built label B adds label B.Receive the indication of label interpolation button in the click browser, generating labels B.Label B can be blank tag, after the label interpolation is finished, by the input network address, loads the webpage of this network address.Perhaps, load default webpage in the label B of generation.Judging in the browser is not only to comprise label B, inserts label B in the next position in the display interface of browser after the current label A that presents 1, makes label B obtain browser focus, to present label B.Namely after label B is added label A 1, present content in the label B.
Click in the label B and link interpolation label B 1.Receive and click the indication that links in the label B, generate the label B 1 that loads webpage in this link.Judging in the browser is not only to comprise label B 1, inserts label B 1 in the next position in the display interface of browser after the current label B that presents, and makes label B 1 obtain browser focus, to present label B 1.Namely after label B 1 is added label B, present webpage in the label B 1.
Click label A, so that label A obtains focus, present label A.Click another link in the label A, add label A 2.Receive the indication of clicking another link in the label A, generate the label A 2 that loads webpage in this link.Judging in the browser is not only to comprise label A 2, inserts label A 2 in the next position in the display interface of browser after the current label A that presents, and makes label A 2 obtain browser focus, to present label A 2.Namely in that label A 2 is added between label A and the label A 1, present webpage in the label A 2.
Newly-built label C adds label C.Receive the indication of label interpolation button in the click browser, generating labels C.Label C can be blank tag, after the label interpolation is finished, by the input network address, loads the webpage of this network address.Perhaps, load default webpage in the label C of generation.Judging in the browser is not only to comprise label C, inserts label C in the next position in the display interface of browser after the current label A that presents 2, makes label C obtain browser focus, to present label C.Namely after label C is added label A 2, present content in the label C.
Click label B, so that label B obtains focus, present label B.Click another link in the label B, add label B 2.Receive the indication of clicking another link in the label B, generate the label B 2 that loads webpage in this link.Judging in the browser is not only to comprise label B 2, inserts label B 2 in the next position in the display interface of browser after the current label B that presents, and makes label B 2 obtain browser focus, to present label B 2.Namely after label B 2 is added label B, present webpage in the label B 2.
Click label B 1, so that label B 1 obtains focus, present label B 1.Newly-built label D adds label D.Receive the indication of label interpolation button in the click browser, generating labels D.Label D can be blank tag, after the label interpolation is finished, by the input network address, loads the webpage of this network address.Perhaps, load default webpage among the label D of generation.Judging in the browser is not only to comprise label D, inserts label D in the next position in the display interface of browser after the current label B that presents 1, makes label D obtain browser focus, to present label D.Namely after label D is added label B 1, present content among the label D.
Label D1 and label D2 are added in one click the first link and the second link in label D.For example, in label D, by after pinning the ctrl key, click the mode of the first link and the second link, be implemented in one click the first link and the second link among the label D.Receive the indication of clicking the first link among the label D, generate the label D1 that loads webpage in this link; Receive the indication of clicking the second link among the label D, generate the label D2 that loads webpage in this link.Judge in the browser is not only to comprise label D1, not only to comprise label D2 in the browser, insert label D1 in the next position in the display interface of browser after the current label D that presents, in the display interface of browser, add label D2 between the label D1 of the current label D that presents and interpolation.Label D2 obtains browser focus, presents label D2.
In the present embodiment, when adding label, new label is the position after the current label that presents all, and then has solved problem distant between the label of browsing before the interpolation and the label that newly adds; So that the label of browsing before adding is adjacent with the new label that adds, obtained when presenting the label of new interpolation, be easy to find out the beneficial effect of the label of browsing before the interpolation.
In one embodiment, step S610 further comprises: after receiving the indication that links in the current label that presents of click, generate the new label of the webpage that loads this link.Father's label that the current label that presents is new label, new label is the subtab of the current label that presents.
Step S640 further comprises: be not to be when only comprising the new label of described generation in the browser in judged result, determine father's label that the current label that presents is new label in the display interface of browser, the subtab by father's label adds interface and inserts this new label in the next position after the current label that presents and present in display interface.
In another embodiment, step S610 further comprises: after receiving the indication of label interpolation button in the click browser, generate new the label blank or webpage that loading is default.
Step S640 further comprises: be not to be when only comprising the new label of described generation in the browser in judged result, obtain the sorting position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container;
Label container is used for depositing each label of browser.
For example, labels class Tab and label container class TabContainer are set.
The object of labels class is label, and labels class Tab comprises interface:
Void setParentTab (Tab parent) arranges interface for father's label that father's label is set;
Tab getParent () obtains interface for the father's label that obtains father's label;
Void addChildTab (Tab child), the subtab that is used for the interpolation subtab adds interface.
Labels class comprises parameter:
ArrayList<Tab〉mTabContainer, for the label container of depositing each label of browser,
HashMap<int key, Tab mTab〉mTabMap, the Hash table for map tags carries out tag storage by key assignments (key, value), can be mapped to corresponding label by key.
Int mCurrentTabKey, for the current label key of the key that records current label, when not having label in browser, this parameter initial value is-1.
Labels class comprises interface,
Void addTab(Tab mTab), be used for adding at browser the initial labels interpolation interface of initial labels;
Void addTab(int index, Tab mTab), the label that is used for interpolation initial labels label afterwards adds interface.
In step S620, judge the new label that whether only comprises this generation in the browser by mCurrentTabKey, when mCurrentTabKey=-1, only comprise the new label of this generation in the browser, otherwise, not the new label that only comprises this generation in the browser.
In step S630, when mCurrentTabKey=-1, the initial labels by label container is added interface and is added this new label and present in the display interface of browser.For example: by Tab tab=new tab, with 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 int key=tab.hashcode (), calculate the key of new label, hashcode () is for being used for calculating the interface of key.By mTabMap.put (key, tab), new label is deposited in the Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
In step S640, in mCurrentTabKey ≠-1, and new label has father's label, namely receive and click the indication that links in the current label that presents and when generating new label, the subtab by father's label adds interface and inserts this new label in the next position after the current label that presents and present in display interface.For example: by Tab tab=new tab, with newly-built label assignment to variable tab.By Tab parrentTab=mTabmap.get (mCurrentTabkey), from Hash table, take out the current label that presents, this label is father's label of new label to be added.In display interface, insert this new label in the next position after the current label that presents and present by parentTab.addchildTab (tab), be i.e. this new label of insertion and presenting in the next position after father's label in display interface.In addition, by int key=tab.hashcode (), calculate the key of new label.By mTabMap.put (key, tab), new label is deposited in the Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
In step S640, in mCurrentTabKey ≠-1, and new label does not have father's label, receive namely that label in the click browser adds the indication of button and when generating new label, obtain the sorting position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container.For example: by Tab tab=new tab, with newly-built label assignment to variable tab.By addTab(index, tab) in the display interface of browser, add this new label and present.Index obtains the label of browser focus at the sorting position of label in the browser display interface.In addition, by int key=tab.hashcode (), calculate the key of new label.By mTabMap.put (key, tab), new label is deposited in the Hash table.By mCurrentTabkey=key, upgrade parameter mCurrentTabKey.
Above-mentioned only is a kind of embodiment of the embodiment of the invention for example, the invention is not restricted to this, can implement in several ways.
Referring to Fig. 7, show the process flow diagram of closing the method for label in the browser according to an embodiment of the invention.
Step S710 receives the indication of closing label.
Step S720 judges whether label to be closed has father's label, if having father's label, and execution in step S730 then, otherwise, execution in step S760.
Wherein, subtab is for linking the label for the webpage that loads this link that generates by clicking in father's label.If label is for link generates in another label by clicking, then this label has father's label.
Step S730 judges whether this father's label has a plurality of subtabs, if having, and execution in step S740 then, otherwise, execution in step S750.
Step S740 finishes label and closes, and the current label that presents is switched to a subtab of this father's label that finds.
Further, make the subtab that switches to obtain browser focus, in the display interface of browser, to present this subtab.
Step S750 finishes label and closes, and the current label that presents is switched to this father's label.
Further, make the father's label that switches to obtain browser focus, in the display interface of browser, to present this father's label.
Step S760 finishes label and closes.
Further, it is last to judge in step S760 whether label to be closed is positioned at browser, if it is last to be positioned at browser, then finishes label and closes, and the current label that presents is switched to a label upper label before of closing; Last if not being positioned at browser, then finish label and close, the current label that presents is switched to the label next label afterwards of closing.
Herein, only be a kind of embodiment of step S760, the invention is not restricted to this.For example, can be label to be closed when not having father's label in judged result also, finish label and close, and the current label that presents is switched to first label, perhaps last label, perhaps arbitrary father's label with subtab.Because when label to be closed does not have father's label, the correlation tag of label not closed in the label that comprises in the browser is described, so in such cases, the present invention is not particularly limited for the label that presents after closing.
Below present embodiment is illustrated, in the browser label shown in Fig. 2, when receiving the indication of closing label A 1, judge label A 1 and have father's label, label A.Then, judge label A and have a plurality of subtabs, after label A 1 is closed, make another subtab of label A, label A 2 obtains browser focus, presents label A 2.
Subsequently, when receiving the indication of closing label A 2, judge label A 2 and have father's label, label A.Then, judge label A only take label A 2 as subtab, after label A 2 is closed, make label A obtain browser focus, present label A.
Adopt present embodiment, when closing label, after finishing label and closing, preferentially switch 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 has solved the problem that lacks relevance between the label that presents behind the label and buttoned-up label of closing; Obtained and automatically to have presented and the beneficial effect of closing the label that label is associated.
Referring to Fig. 8, show the process flow diagram of closing the method for label in the browser according to an embodiment of the invention.
Step S8010 receives the indication of closing label.
Step S8020 judges whether only comprise label to be closed in the browser, if so, and execution in step S8030 then, otherwise, execution in step S8040.
Step S8030 finishes label and closes the new label of rear generation, and presents this new label.
Step S8040 judges whether label to be closed has father's label, if having father's label, and execution in step S8050 then, otherwise, execution in step S8080.
Wherein, subtab is for linking the label for the webpage that loads this link that generates by clicking in father's label.If namely label is for link generates in another label by clicking, then this label has father's label.
Step S8050 judges whether this father's label has a plurality of subtabs, if having, and execution in step S8060 then, otherwise, execution in step S8070.
Step S8060 finishes label and closes, and the current label that presents is switched to a subtab of this father's label that finds.
Further, make the subtab that switches to obtain browser focus, in the display interface of browser, to present this subtab.
Step S8070 finishes label and closes, and the current label that presents is switched to this father's label.
Further, make the father's label that switches to obtain browser focus, in the display interface of browser, to present this father's label.
Step S8080, it is last to judge whether label to be closed is positioned at browser, if so, execution in step S8090 then, otherwise, execution in step S8100.
Step S8090 finishes label and closes, and the current label that presents is switched to a label upper label before of closing.
Step S8100 finishes label and closes, and the current label that presents is switched to the label next label afterwards of closing.
Above-described embodiment is the exemplary illustration of the specific embodiment of the present invention only, the invention is not restricted to this, can implement to realize the present invention by multiple other concrete mode.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.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 one or more in each inventive aspect, in the description 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 in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from 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 is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.

Claims (6)

1. label adding set that is used for browser, described device comprises:
Generation module is suitable for receiving the indication that generates new label, generates new label according to described indication;
Judge module is suitable for judging the new label that whether only comprises described generation in the browser, and judged result is notified to adding module;
Add module, being suitable in judged result is when only comprising the new label of described generation in the browser, adds this new label and present in the display interface of browser; Be not to be when only comprising the new label of described generation in the browser in judged result, insert this new label in the next position in the display interface of browser after the current label that presents, and present this new label;
Wherein, described interpolation module is further adapted for and makes new label obtain browser focus, to present this new label in the display interface of browser.
2. device according to claim 1, wherein,
Described generation module, be further adapted for receive click the indication that links in the current label that presents after, generate the new label of the webpage that loads this link;
Father's label that the described current label that presents is described new label, described new label is the subtab of the described current label that presents;
Described interpolation module, being further adapted in judged result is not to be when only comprising the new label of described generation in the browser, determine father's label that the current label that presents is new label in the display interface of browser, the subtab by father's label adds interface and inserts this new label in the next position after the current label that presents and present in display interface.
3. device according to claim 1, wherein,
Described generation module, be further adapted for receive the indication that label in the click browser adds button after, generate blank or load the new label of default webpage;
Described interpolation module, being further adapted in judged result is not to be when only comprising the new label of described generation in the browser, obtain the sorting position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container;
Described label container is used for depositing each label of browser.
4. label addition method that is used for browser, described method comprises:
Receive the indication that generates new label, generate new label according to described indication, judge whether only comprise this new label in the browser;
If so, then in the display interface of browser, add this new label, and present this new label;
If not, then in the display interface of browser, insert this new label in the next position after the current label that presents, and present this new label;
Wherein, described this new label that presents further comprises and makes new label obtain browser focus, to present this new label in the display interface of browser.
5. method according to claim 4, wherein,
Described reception generates the indication of new label, generates new label according to described indication and further comprises:
After receiving the indication that links in the current label that presents of click, generate the new label of the webpage that loads this link; Father's label that the described current label that presents is described new label, described new label is the subtab of the described current label that presents;
Described this new label that inserts in the next position after the current label that presents in the display interface of browser further comprises:
Determine father's label that the current label that presents is new label in the display interface, the subtab by father's label adds interface and insert this new label in the next position after the current label that presents in display interface.
6. method according to claim 4, wherein,
Described reception generates the indication of new label, generates new label according to described indication and further comprises:
After receiving the indication of label interpolation button in the click browser, generate new the label blank or webpage that loading is default;
Described this new label that inserts in the next position after the current label that presents in the display interface of browser further comprises:
Obtain the arrangement position of the current label that presents in the browser display interface, insert this new label in the next position of label interpolation interface after this position by label container;
Described label container is used for depositing each label of browser.
CN2012105371121A 2012-12-12 2012-12-12 Label adding device and method for browser Pending CN103049507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105371121A CN103049507A (en) 2012-12-12 2012-12-12 Label adding device and method for browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105371121A CN103049507A (en) 2012-12-12 2012-12-12 Label adding device and method for browser

Publications (1)

Publication Number Publication Date
CN103049507A true CN103049507A (en) 2013-04-17

Family

ID=48062148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105371121A Pending CN103049507A (en) 2012-12-12 2012-12-12 Label adding device and method for browser

Country Status (1)

Country Link
CN (1) CN103049507A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025210A (en) * 2016-02-02 2017-08-08 珠海金山办公软件有限公司 A kind of document tag displaying method and device for WPS
CN108287832A (en) * 2017-01-09 2018-07-17 上海掌门科技有限公司 The method and apparatus for being inserted into label
CN111459371A (en) * 2020-03-31 2020-07-28 北京奇艺世纪科技有限公司 View switching method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090327947A1 (en) * 2008-06-25 2009-12-31 Microsoft Corporation Tab management in a user interface window
CN102708133A (en) * 2011-03-07 2012-10-03 微软公司 Task-based address bar and tabs scaling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090327947A1 (en) * 2008-06-25 2009-12-31 Microsoft Corporation Tab management in a user interface window
CN102708133A (en) * 2011-03-07 2012-10-03 微软公司 Task-based address bar and tabs scaling

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MARTIN BRINKMANN: ""Tab Position Customizer For Google Chrome"", 《HTTP://WWW.GHACKS.NET/2011/11/02/TAB-POSITION-CUSTOMIZER-FOR-GOOGLE-CHROME》, 1 December 2011 (2011-12-01), pages 1 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025210A (en) * 2016-02-02 2017-08-08 珠海金山办公软件有限公司 A kind of document tag displaying method and device for WPS
CN108287832A (en) * 2017-01-09 2018-07-17 上海掌门科技有限公司 The method and apparatus for being inserted into label
CN111459371A (en) * 2020-03-31 2020-07-28 北京奇艺世纪科技有限公司 View switching method and device, electronic equipment and storage medium
CN111459371B (en) * 2020-03-31 2021-09-28 北京奇艺世纪科技有限公司 View switching method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104951099A (en) Method and device for showing candidate items based on input method
CN102902815B (en) For the result display systems of search engine
CN103678566A (en) Method, server and system for providing mobile terminal fault problem solution
CN102982156A (en) System and method for realizing searching in mobile terminal
CN102999619A (en) Mobile terminal, server and method for realizing searching
CN102890724A (en) Webpage loading method and device
CN102982134A (en) System enabling recommended web site information to be displayed in browser address bar
CN103034680A (en) Data interaction method and device for terminal device
CN103150357A (en) Browser, system and method capable of realizing compare search
CN102982118A (en) Searching method and device based on favorites
CN103020253A (en) Application search method and equipment
CN103686809A (en) Method and system for providing mobile terminal fault problem solution and mobile terminal
CN110806873A (en) Target control determining method and device, electronic equipment and storage medium
CN109471797A (en) A kind of environment configurations management method, system and terminal device
CN105677658A (en) Page display method and device
CN104077314A (en) Method and system for adding browser into favorites and terminal equipment
CN114594927A (en) Low code development method, device, system, server and storage medium
CN111309413B (en) Interface display method and device, electronic equipment and storage medium
CN103049507A (en) Label adding device and method for browser
CN103049313A (en) Label closing device and method for browser
CN102999380A (en) Wallpaper control method and device
CN104699836A (en) Multi-keyword search prompting method and multi-keyword search prompting device
CN107016008A (en) The display methods and device of information processing method and device and multidate information
CN102968476A (en) Method and device for showing webpage content
CN108959294A (en) A kind of method and apparatus accessing search engine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130417