Exemplo n.º 1
0
 public void Main_page() {
   win.Tab_mgr()
       .Active_tab_assert(); // force an active tab in case all tabs are closed; needed for
                             // win.Active_page() below; DATE:2014-09-17
   win.Page__navigate_by_url_bar(
       win.Active_tab().Wiki().Domain_str()
           + Xoh_href_
               .Str__wiki); // NOTE: add "/wiki/" to generate non-page like url;  EX: "home" ->
                            // "home/wiki/" which will be interpreted as a url, as opposed to
                            // "home" which will be intrepretted as page; DATE:2014-04-14
 }
Exemplo n.º 2
0
 public void Save_as() {
   if (this.Active_tab_is_null()) return;
   Xog_tab_itm tab = win.Tab_mgr().Active_tab();
   String file_name =
       Xoa_app_.Utl__encoder_mgr()
               .Fsys_safe()
               .Encode_str(String_.new_u8(tab.Page().Ttl().Full_url()))
           + ".html";
   String file_url =
       app.Gui_mgr()
           .Kit()
           .New_dlg_file(Gfui_kit_.File_dlg_type_save, "Select file to save to:")
           .Init_file_(file_name)
           .Ask();
   if (String_.Len_eq_0(file_url)) return;
   Io_mgr.I.SaveFilStr(file_url, tab.Html_box().Text());
   app.Usr_dlg().Prog_many("", "", "saved page: file=~{0}", file_url);
 }
Exemplo n.º 3
0
 public void Print() {
   if (this.Active_tab_is_null()) return;
   win.Active_html_box().Html_js_eval_proc_as_str(Xog_js_procs.Win__print_preview);
 }
Exemplo n.º 4
0
 public void Refresh() {
   if (Active_tab_is_null()) return;
   win.Page__refresh();
 }
Exemplo n.º 5
0
 public void Reload() {
   if (Active_tab_is_null()) return;
   win.Page__reload();
 }
Exemplo n.º 6
0
 private void Mode(byte v) {
   if (Active_tab_is_null()) return;
   win.Page__mode_(v);
 }
Exemplo n.º 7
0
 private boolean Active_tab_is_null() {
   return win.Tab_mgr().Active_tab_is_null();
 }
Exemplo n.º 8
0
 public void Sandbox() {
   win.Page__navigate_by_url_bar("Project:Sandbox");
 }
Exemplo n.º 9
0
 public void Random() {
   win.Page__navigate_by_url_bar("Special:Random");
 }
Exemplo n.º 10
0
 public void Go_fwd() {
   win.Page__navigate_by_history(Bool_.Y);
 }
Exemplo n.º 11
0
 public void Goto(String page) {
   win.Page__navigate_by_url_bar(page);
 }