mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.5.4.1
This commit is contained in:
@@ -24,8 +24,8 @@ public class GfuiCheckListBox extends GfuiElemBase {
|
||||
public void Items_setAll(boolean v) {checkListBox.Items_setAll(v);}
|
||||
public void Items_clear() {checkListBox.Items_clear();}
|
||||
public void Items_add(Object item, boolean v) {checkListBox.Items_add(item, v);}
|
||||
public ListAdp Items_getAll() {return checkListBox.Items_getAll();}
|
||||
public ListAdp Items_getChecked() {return checkListBox.Items_getChecked();}
|
||||
public List_adp Items_getAll() {return checkListBox.Items_getAll();}
|
||||
public List_adp Items_getChecked() {return checkListBox.Items_getChecked();}
|
||||
|
||||
GxwCheckListBox checkListBox;
|
||||
@Override public GxwElem UnderElem_make(KeyValHash ctorArgs) {return new GxwCheckListBox_lang();}
|
||||
|
||||
@@ -30,8 +30,8 @@ public class GfuiCheckListPanel extends GfuiElemBase {
|
||||
}
|
||||
public void Items_clear() {listBox.Items_clear();}
|
||||
public void Items_add(Object item, boolean checkBoxState) {listBox.Items_add(item, checkBoxState);}
|
||||
public ListAdp Items_getAll() {return listBox.Items_getAll();}
|
||||
public ListAdp Items_getChecked() {return listBox.Items_getChecked();}
|
||||
public List_adp Items_getAll() {return listBox.Items_getAll();}
|
||||
public List_adp Items_getChecked() {return listBox.Items_getChecked();}
|
||||
public void SetAllCheckStates(boolean v) {
|
||||
listBox.Items_setAll(v);
|
||||
}
|
||||
|
||||
@@ -21,23 +21,23 @@ import java.awt.FileDialog;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
public class GfuiIoDialogUtl {
|
||||
public static Io_url SelectDir() {return SelectDir(Io_url_.Null);}
|
||||
public static Io_url SelectDir() {return SelectDir(Io_url_.Empty);}
|
||||
public static Io_url SelectDir(Io_url startingDir) {
|
||||
FileDialog openFileDialog = NewOpenFileDialog(startingDir);
|
||||
// openFileDialog.FileName = @"press enter to select this folder";
|
||||
openFileDialog.setVisible(true);
|
||||
String selectedDir = openFileDialog.getDirectory();
|
||||
if (selectedDir == null) return Io_url_.Null; // nothing selected
|
||||
if (selectedDir == null) return Io_url_.Empty; // nothing selected
|
||||
Io_url selected = Io_url_.new_any_(selectedDir);
|
||||
Io_url selectedFil = selected.GenSubFil(openFileDialog.getFile());
|
||||
return selectedFil.OwnerDir();
|
||||
}
|
||||
public static Io_url SelectFile() {return SelectFile(Io_url_.Null);}
|
||||
public static Io_url SelectFile() {return SelectFile(Io_url_.Empty);}
|
||||
public static Io_url SelectFile(Io_url startingDir) {
|
||||
FileDialog openFileDialog = NewOpenFileDialog(startingDir);
|
||||
openFileDialog.setVisible(true);
|
||||
String selectedDir = openFileDialog.getDirectory();
|
||||
if (selectedDir == null) return Io_url_.Null; // nothing selected
|
||||
if (selectedDir == null) return Io_url_.Empty; // nothing selected
|
||||
Io_url selected = Io_url_.new_any_(selectedDir);
|
||||
Io_url selectedFil = selected.GenSubFil(openFileDialog.getFile());
|
||||
return selectedFil;
|
||||
|
||||
@@ -30,7 +30,7 @@ public abstract class GfuiIoUrlSelectBox extends GfuiElemBase {
|
||||
public GfuiLbl Label() {return label;} GfuiLbl label;
|
||||
public Io_url Url() {return Io_url_.new_any_(pathBox.TextMgr().Val());}
|
||||
public Io_url StartingFolder() {return startingFolder;}
|
||||
public void StartingFolder_set(Io_url v) {this.startingFolder = v;} Io_url startingFolder = Io_url_.Null;
|
||||
public void StartingFolder_set(Io_url v) {this.startingFolder = v;} Io_url startingFolder = Io_url_.Empty;
|
||||
@Override public void Focus() {pathBox.Focus();}
|
||||
|
||||
void SelectAction() {
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.gfui; import gplx.*;
|
||||
public class GfuiMoveElemBnd implements IptBnd, GfoInvkAble, InjectAble {
|
||||
public String Key() {return "gplx.gfui.moveWidget";}
|
||||
public ListAdp Ipts() {return args;} ListAdp args = ListAdp_.new_();
|
||||
public List_adp Ipts() {return args;} List_adp args = List_adp_.new_();
|
||||
public IptEventType EventTypes() {return IptEventType_.add_(IptEventType_.KeyDown, IptEventType_.MouseDown, IptEventType_.MouseMove, IptEventType_.MouseUp);}
|
||||
public void Exec(IptEventData iptData) {
|
||||
int val = iptData.EventType().Val();
|
||||
@@ -55,17 +55,17 @@ public class GfuiMoveElemBnd implements IptBnd, GfoInvkAble, InjectAble {
|
||||
}
|
||||
void ExecKeyDown(IptEventData msg) {
|
||||
PointAdp current = targetElem.Pos();
|
||||
PointAdp offset = PointAdp_.cast_(hash.Fetch(msg.EventArg()));
|
||||
PointAdp offset = PointAdp_.cast_(hash.Get_by(msg.EventArg()));
|
||||
targetElem.Pos_(current.Op_add(offset));
|
||||
}
|
||||
@gplx.Internal protected void Key_set(String key) {this.key = key;} private String key;
|
||||
public Object Srl(GfoMsg owner) {return IptBnd_.Srl(owner, this);}
|
||||
|
||||
boolean moving = false;
|
||||
PointAdp anchor = PointAdp_.Zero; HashAdp hash = HashAdp_.new_();
|
||||
PointAdp anchor = PointAdp_.Zero; Hash_adp hash = Hash_adp_.new_();
|
||||
public static GfuiMoveElemBnd new_() {return new GfuiMoveElemBnd();}
|
||||
GfuiMoveElemBnd() {
|
||||
args.AddMany(IptMouseBtn_.Left, IptMouseMove.AnyDirection);
|
||||
args.Add_many(IptMouseBtn_.Left, IptMouseMove.AnyDirection);
|
||||
IptBndArgsBldr.AddWithData(args, hash, IptKey_.Ctrl.Add(IptKey_.Up), PointAdp_.new_(0, -10));
|
||||
IptBndArgsBldr.AddWithData(args, hash, IptKey_.Ctrl.Add(IptKey_.Down), PointAdp_.new_(0, 10));
|
||||
IptBndArgsBldr.AddWithData(args, hash, IptKey_.Ctrl.Add(IptKey_.Left), PointAdp_.new_(-10, 0));
|
||||
@@ -73,7 +73,7 @@ public class GfuiMoveElemBnd implements IptBnd, GfoInvkAble, InjectAble {
|
||||
}
|
||||
}
|
||||
class IptBndArgsBldr {
|
||||
public static void AddWithData(ListAdp list, HashAdp hash, IptArg arg, Object data) {
|
||||
public static void AddWithData(List_adp list, Hash_adp hash, IptArg arg, Object data) {
|
||||
list.Add(arg);
|
||||
hash.Add(arg, data);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GfuiMoveElemBtn extends GfuiBtn { @Override public GxwElem UnderEl
|
||||
}
|
||||
class GfuiResizeFormBnd implements IptBnd {
|
||||
public String Key() {return "gplx.gfui.resizeForm";}
|
||||
public ListAdp Ipts() {return args;} ListAdp args = ListAdp_.new_();
|
||||
public List_adp Ipts() {return args;} List_adp args = List_adp_.new_();
|
||||
public IptEventType EventTypes() {return IptEventType_.KeyDown.Add(IptEventType_.MouseDown).Add(IptEventType_.MouseUp).Add(IptEventType_.MouseMove);}
|
||||
public void Exec(IptEventData iptData) {
|
||||
int val = iptData.EventType().Val();
|
||||
@@ -61,7 +61,7 @@ class GfuiResizeFormBnd implements IptBnd {
|
||||
active = false;
|
||||
}
|
||||
void ExecKeyDown(IptEventData iptData) {
|
||||
SizeAdp deltaSize = (SizeAdp)hash.Fetch(iptData.EventArg());
|
||||
SizeAdp deltaSize = (SizeAdp)hash.Get_by(iptData.EventArg());
|
||||
ResizeForm(iptData.Sender(), deltaSize);
|
||||
}
|
||||
void ResizeForm(GfuiElem elem, SizeAdp deltaSize) {
|
||||
@@ -75,10 +75,10 @@ class GfuiResizeFormBnd implements IptBnd {
|
||||
static SizeAdp Op_add(SizeAdp lhs, SizeAdp rhs) {return SizeAdp_.new_(lhs.Width() + rhs.Width(), lhs.Height() + rhs.Height());}
|
||||
public Object Srl(GfoMsg owner) {return IptBnd_.Srl(owner, this);}
|
||||
|
||||
boolean active = false; PointAdp lastPos = PointAdp_.Zero; HashAdp hash = HashAdp_.new_();
|
||||
boolean active = false; PointAdp lastPos = PointAdp_.Zero; Hash_adp hash = Hash_adp_.new_();
|
||||
public static GfuiResizeFormBnd new_() {return new GfuiResizeFormBnd();}
|
||||
GfuiResizeFormBnd() {
|
||||
args.AddMany(IptMouseBtn_.Right, IptMouseMove.AnyDirection);
|
||||
args.Add_many(IptMouseBtn_.Right, IptMouseMove.AnyDirection);
|
||||
IptBndArgsBldr.AddWithData(args, hash, IptKey_.Ctrl.Add(IptKey_.Shift).Add(IptKey_.Up), SizeAdp_.new_(0, -10));
|
||||
IptBndArgsBldr.AddWithData(args, hash, IptKey_.Ctrl.Add(IptKey_.Shift).Add(IptKey_.Down), SizeAdp_.new_(0, 10));
|
||||
IptBndArgsBldr.AddWithData(args, hash, IptKey_.Ctrl.Add(IptKey_.Shift).Add(IptKey_.Left), SizeAdp_.new_(-10, 0));
|
||||
|
||||
Reference in New Issue
Block a user