1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-08-24 00:32:13 -04:00
parent df10db140c
commit ed911e3de5
220 changed files with 2618 additions and 1569 deletions

View File

@@ -108,12 +108,12 @@ class Swt_lnr_key implements KeyListener {
case 327680: val = IptKey_.Insert.Val(); break;
}
if (Has_ctrl(ev.stateMask)) val |= IptKey_.KeyCode_Ctrl;
if (Enm_.HasInt(ev.stateMask, IptKey_.KeyCode_Shift)) val |= IptKey_.KeyCode_Alt;
if (Enm_.HasInt(ev.stateMask, IptKey_.KeyCode_Ctrl)) val |= IptKey_.KeyCode_Shift;
if (Enm_.Has_int(ev.stateMask, IptKey_.KeyCode_Shift)) val |= IptKey_.KeyCode_Alt;
if (Enm_.Has_int(ev.stateMask, IptKey_.KeyCode_Ctrl)) val |= IptKey_.KeyCode_Shift;
// Tfds.Write(String_.Format("val={4} keyCode={0} stateMask={1} keyLocation={2} character={3}", ev.keyCode, ev.stateMask, ev.keyLocation, ev.character, val));
return IptEvtDataKey.int_(val);
}
public static boolean Has_ctrl(int val) {return Enm_.HasInt(val, IptKey_.KeyCode_Alt);} // NOTE:SWT's ctrl constant is different from SWING's
public static boolean Has_ctrl(int val) {return Enm_.Has_int(val, IptKey_.KeyCode_Alt);} // NOTE:SWT's ctrl constant is different from SWING's
}
class Swt_lnr_mouse implements MouseListener {
public Swt_lnr_mouse(GxwElem elem) {this.elem = elem;} GxwElem elem;

View File

@@ -85,9 +85,9 @@ class Swt_html implements Gxw_html, Swt_control, FocusListener {
Object arg = args[i];
if (i != 0) bfr.Add_byte(Byte_ascii.Comma);
boolean quote_val = true;
if ( ClassAdp_.Eq_typeSafe(arg, Bool_.Cls_ref_type)
|| ClassAdp_.Eq_typeSafe(arg, Int_.Cls_ref_type)
|| ClassAdp_.Eq_typeSafe(arg, Long_.Cls_ref_type)
if ( Type_adp_.Eq_typeSafe(arg, Bool_.Cls_ref_type)
|| Type_adp_.Eq_typeSafe(arg, Int_.Cls_ref_type)
|| Type_adp_.Eq_typeSafe(arg, Long_.Cls_ref_type)
) {
quote_val = false;
}