mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.7.3.1
This commit is contained in:
@@ -68,7 +68,7 @@ class GxwElemFactory_cls_mock extends GxwElemFactory_base {
|
||||
@gplx.Internal @Override protected GxwTextFld text_fld_() {return new MockTextBox();}
|
||||
@gplx.Internal @Override protected GxwTextFld text_memo_() {return new MockTextBoxMulti();}
|
||||
@gplx.Internal @Override protected GxwTextHtml text_html_() {return new MockTextBoxMulti();}
|
||||
@gplx.Internal @Override protected GxwCheckListBox checkListBox_(KeyValHash ctorArgs) {throw Exc_.new_unimplemented();}
|
||||
@gplx.Internal @Override protected GxwCheckListBox checkListBox_(KeyValHash ctorArgs) {throw Err_.new_unimplemented();}
|
||||
@gplx.Internal @Override protected GxwComboBox comboBox_() {return new MockComboBox();}
|
||||
@gplx.Internal @Override protected GxwListBox listBox_() {return new MockListBox();}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class GxwTextFld_cls_lang extends JTextField implements GxwTextFld {
|
||||
try {
|
||||
this.setSelectionStart(v);
|
||||
} catch (Exception e) {
|
||||
Exc_.Noop(e);
|
||||
Err_.Noop(e);
|
||||
} // NOTE: sometimes fails when skipping ahead in dvd player; v = 0, and start/end = 0
|
||||
}
|
||||
public int SelLen() {return this.getSelectionEnd() - this.getSelectionStart();} public void SelLen_set(int v) {this.setSelectionEnd(this.SelBgn() + v);}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class GxwTextHtml_lang extends JScrollPane implements GxwTextHtml {
|
||||
editor.Html_enabled(v);
|
||||
}
|
||||
public GxwTextHtml_editor Editor() {return editor;} GxwTextHtml_editor editor;
|
||||
public void ScrollTillCaretIsVisible() {throw Exc_.new_unimplemented();}
|
||||
public void ScrollTillCaretIsVisible() {throw Err_.new_unimplemented();}
|
||||
public GxwTextHtml_lang ctor() {
|
||||
editor = new GxwTextHtml_editor().ctor();
|
||||
core = new GxwCore_host(GxwCore_lang.new_(this), editor.core);
|
||||
@@ -152,7 +152,7 @@ class GxwTextHtml_editor extends JEditorPane implements GxwTextHtml {
|
||||
// this.setEditorKit(v ? new StyledEditorKit() : new DefaultEditorKit());
|
||||
this.setEditorKit(v ? htmlKit : styledKit);
|
||||
}
|
||||
public void ScrollTillCaretIsVisible() {throw Exc_.new_unimplemented();}
|
||||
public void ScrollTillCaretIsVisible() {throw Err_.new_unimplemented();}
|
||||
public void Html_css_set(String s) {
|
||||
StyleSheet styleSheet = htmlKit.getStyleSheet();
|
||||
styleSheet.addRule(s);
|
||||
@@ -187,14 +187,14 @@ class GxwTextHtml_editor extends JEditorPane implements GxwTextHtml {
|
||||
public String Html_doc_html() {
|
||||
Document doc = this.getDocument();
|
||||
try {return this.getDocument().getText(0, doc.getLength());}
|
||||
catch (Exception e) {throw Exc_.new_exc(e, "ui", "Html_doc_html");}
|
||||
catch (Exception e) {throw Err_.new_exc(e, "ui", "Html_doc_html");}
|
||||
}
|
||||
public String Html_sel_text() {
|
||||
Element elm = Html_sel_elm();
|
||||
int sel_bgn = elm.getStartOffset();
|
||||
int sel_end = elm.getEndOffset();
|
||||
try {return this.getDocument().getText(sel_bgn, sel_end - sel_bgn);}
|
||||
catch (Exception e) {throw Exc_.new_exc(e, "ui", "Html_sel_text");}
|
||||
catch (Exception e) {throw Err_.new_exc(e, "ui", "Html_sel_text");}
|
||||
}
|
||||
static void Html_sel_atrs(AttributeSet atrs, List_adp list, String ownerKey, String dlm) {
|
||||
if (atrs == null) return;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class GxwTextMemo_lang extends JScrollPane implements GxwTextMemo {
|
||||
else if (c.getRGB() == Color.WHITE.getRGB()) txt_box.setCaretColor(Color.BLACK);
|
||||
super.setBackground(c);
|
||||
}
|
||||
public void ScrollTillCaretIsVisible() {throw Exc_.new_unimplemented();}
|
||||
public void ScrollTillCaretIsVisible() {throw Err_.new_unimplemented();}
|
||||
public void Margins_set(int left, int top, int right, int bot) {
|
||||
if (left == 0 && right == 0) {
|
||||
txt_box.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
||||
|
||||
@@ -262,7 +262,7 @@ class GxwElemFactory_swt extends GxwElemFactory_base {
|
||||
@gplx.Internal @Override protected GxwTextFld text_fld_() {return null;}
|
||||
@gplx.Internal @Override protected GxwTextFld text_memo_() {return null;}
|
||||
@gplx.Internal @Override protected GxwTextHtml text_html_() {return null;}
|
||||
@gplx.Internal @Override protected GxwCheckListBox checkListBox_(KeyValHash ctorArgs) {throw Exc_.new_unimplemented();}
|
||||
@gplx.Internal @Override protected GxwCheckListBox checkListBox_(KeyValHash ctorArgs) {throw Err_.new_unimplemented();}
|
||||
@gplx.Internal @Override protected GxwComboBox comboBox_() {return null;}
|
||||
@gplx.Internal @Override protected GxwListBox listBox_() {return null;}
|
||||
}
|
||||
|
||||
@@ -23,13 +23,13 @@ public class Gxw_html_load_tid_ {
|
||||
switch (v) {
|
||||
case Tid_mem: return Key_mem;
|
||||
case Tid_url: return Key_url;
|
||||
default: throw Exc_.new_unimplemented();
|
||||
default: throw Err_.new_unimplemented();
|
||||
}
|
||||
}
|
||||
public static byte Xto_tid(String s) {
|
||||
if (String_.Eq(s, Key_mem)) return Tid_mem;
|
||||
else if (String_.Eq(s, Key_url)) return Tid_url;
|
||||
else throw Exc_.new_unimplemented();
|
||||
else throw Err_.new_unimplemented();
|
||||
}
|
||||
public static KeyVal[] Options__list = KeyVal_.Ary(KeyVal_.new_(Key_mem), KeyVal_.new_(Key_url));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user