diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Attributes.java b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Attributes.java index 4b6097dd1..0cc305175 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Attributes.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Attributes.java @@ -123,6 +123,8 @@ public static enum SaveAsType { protected ComboBox dpiSelector; @FXML protected TabPane tabPane; + @FXML + protected CheckBox errorContinueCheck; public void setFileType() { setFileType(FileType.All); diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Interface.java b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Interface.java index 9cca6606b..44e782014 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Interface.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseController_Interface.java @@ -46,7 +46,7 @@ * @License Apache License Version 2.0 */ public abstract class BaseController_Interface extends BaseController_Files { - + protected final int minSize = 200; protected ChangeListener leftDividerListener, rightDividerListener; @@ -61,7 +61,7 @@ public void initBaseControls() { if (thisPane != null) { thisPane.setStyle("-fx-font-size: " + AppVariables.sceneFontSize + "px;"); } - + if (mainMenuController != null) { mainMenuController.SourceFileType = getSourceFileType(); mainMenuController.sourceExtensionFilter = sourceExtensionFilter; @@ -72,7 +72,7 @@ public void initBaseControls() { mainMenuController.AddFileType = AddFileType; mainMenuController.AddPathType = AddPathType; } - + if (sourceFileInput != null) { sourceFileInput.textProperty().addListener( (ObservableValue observable, String oldValue, String newValue) -> { @@ -80,7 +80,7 @@ public void initBaseControls() { }); // sourceFileInput.setText(UserConfig.getString(interfaceName + "SourceFile", null)); } - + if (sourcePathInput != null) { sourcePathInput.textProperty().addListener(new ChangeListener() { @Override @@ -91,7 +91,7 @@ public void changed( }); sourcePathInput.setText(UserConfig.getString(interfaceName + "SourcePath", AppPaths.getGeneratedPath())); } - + if (targetPrefixInput != null) { targetPrefixInput.textProperty().addListener(new ChangeListener() { @Override @@ -103,7 +103,7 @@ public void changed(ObservableValue observable, String oldValu }); targetPrefixInput.setText(UserConfig.getString(interfaceName + "TargetPrefix", "mm")); } - + if (targetFileController != null) { targetFileController.notify.addListener(new ChangeListener() { @Override @@ -113,7 +113,7 @@ public void changed(ObservableValue observable, Boolean oldVa }); targetFileController.baseName(interfaceName).savedName(interfaceName + "TargetFile").type(TargetFileType).initFile(); } - + if (targetPathController != null) { targetPathController.notify.addListener(new ChangeListener() { @Override @@ -123,7 +123,7 @@ public void changed(ObservableValue observable, Boolean oldVa }); targetPathController.baseName(interfaceName).savedName(interfaceName + "TargetPath").type(TargetPathType).initFile(); } - + if (operationBarController != null) { operationBarController.parentController = myController; if (operationBarController.openTargetButton != null) { @@ -138,7 +138,7 @@ public void changed(ObservableValue observable, Boolean oldVa } } } - + saveAsType = BaseController.SaveAsType.Open; if (saveAsGroup != null && saveOpenRadio != null) { String v = UserConfig.getString(interfaceName + "SaveAsType", BaseController.SaveAsType.Open.name()); @@ -189,7 +189,7 @@ public void changed(ObservableValue ov, Toggle oldValue, Toggle newValue) { } }); } - + dpi = UserConfig.getInt(interfaceName + "DPI", 96); if (dpiSelector != null) { List dpiValues = new ArrayList(); @@ -211,13 +211,27 @@ public void changed(ObservableValue ov, Toggle oldValue, Toggle newValue) { checkDPI(); }); } - + if (openSourceButton != null) { openSourceButton.setDisable(true); } - + + if (errorContinueCheck != null) { + errorContinueCheck.setSelected(false); + errorContinueCheck.selectedProperty().addListener(new ChangeListener() { + @Override + public void changed(ObservableValue ov, Boolean oldValue, Boolean newValue) { + if (errorContinueCheck.isSelected()) { + errorContinueCheck.setStyle(NodeStyleTools.darkRedTextStyle()); + } else { + errorContinueCheck.setStyle(null); + } + } + }); + } + initMainArea(); - + if (onTopCheck != null) { onTopCheck.selectedProperty().addListener(new ChangeListener() { @Override @@ -238,7 +252,7 @@ public void changed(ObservableValue v, Boolean ov, Boolean nv } }); } - + if (tipsView != null) { tipsView.setPickOnBounds(true); tipsView.setOnMouseClicked(new EventHandler() { @@ -248,7 +262,7 @@ public void handle(MouseEvent event) { } }); } - + if (rightTipsView != null) { rightTipsView.setPickOnBounds(true); rightTipsView.setOnMouseClicked(new EventHandler() { @@ -258,19 +272,19 @@ public void handle(MouseEvent event) { } }); } - + initLeftPaneControl(); initRightPaneControl(); - + initNodes(thisPane); initSplitPanes(); setControlsStyle(); - + } catch (Exception e) { MyBoxLog.error(e); } } - + public void initMainArea() { if (toolbar == null || toolbarCheck == null || mainAreaBox == null) { return; @@ -285,7 +299,7 @@ public void changed(ObservableValue ov, Boolean oldValue, Boolean newValue) { }); checkToolbar(); } - + public void checkToolbar() { if (toolbar == null || toolbarCheck == null || mainAreaBox == null) { return; @@ -301,7 +315,7 @@ public void checkToolbar() { } refreshStyle(mainAreaBox); } - + public void initLeftPaneControl() { if (splitPane != null && leftPane != null && leftPaneControl != null) { leftPaneControl.setOnMouseClicked(new EventHandler() { @@ -315,7 +329,7 @@ public void handle(MouseEvent event) { leftPane.setVvalue(0); } } - + public void initRightPaneControl() { if (splitPane != null && rightPane != null && rightPaneControl != null) { rightPaneControl.setOnMouseClicked(new EventHandler() { @@ -329,7 +343,7 @@ public void handle(MouseEvent event) { rightPane.setVvalue(0); } } - + private void initNodes(Node node) { if (node == null) { return; @@ -365,11 +379,11 @@ private void initNodes(Node node) { } } } - + public void makeEditContextMenu(Node node) { makeEditContextMenu(node, node); } - + public void makeEditContextMenu(Node node, Node textInput) { try { textInput.setOnContextMenuRequested(new EventHandler() { @@ -382,7 +396,7 @@ public void handle(ContextMenuEvent event) { MyBoxLog.error(e); } } - + public void checkDPI() { try { int v = Integer.parseInt(dpiSelector.getValue()); @@ -397,9 +411,9 @@ public void checkDPI() { dpiSelector.getEditor().setStyle(UserConfig.badStyle()); } } - + public void initControls() { - + } /* @@ -411,18 +425,18 @@ public void afterSceneLoaded() { try { getMyScene(); getMyStage(); - + myStage.setMinWidth(minSize); myStage.setMinHeight(20); - + refreshStyle(); - + if (this instanceof LoadingController) { return; } - + setStageStatus(); - + Rectangle2D screen = NodeTools.getScreen(); if (myStage.getHeight() > screen.getHeight()) { myStage.setHeight(screen.getHeight()); @@ -436,9 +450,9 @@ public void afterSceneLoaded() { if (myStage.getY() < 0) { myStage.setY(0); } - + toFront(); - + if (leftPane != null || rightPane != null) { new Timer().schedule(new TimerTask() { @Override @@ -448,7 +462,7 @@ public void run() { leftPane.setHvalue(0); leftPane.setVvalue(0); } - + if (rightPane != null) { rightPane.setHvalue(0); rightPane.setVvalue(0); @@ -458,32 +472,32 @@ public void run() { } }, 1000); } - + if (onTopCheck != null) { isSettingValues = true; onTopCheck.setSelected(myStage.isAlwaysOnTop()); isSettingValues = false; } - + } catch (Exception e) { MyBoxLog.error(e); } } - + public String interfaceKeysPrefix() { return "Interface_" + interfaceName; } - + public void setStageStatus() { try { if (AppVariables.recordWindowsSizeLocation) { String prefix = interfaceKeysPrefix(); if (UserConfig.getBoolean(prefix + "FullScreen", false)) { myStage.setFullScreen(true); - + } else if (UserConfig.getBoolean(prefix + "Maximized", false)) { NodeTools.setMaximized(myStage, true); - + } else { int mw = UserConfig.getInt(prefix + "StageWidth", -1); int mh = UserConfig.getInt(prefix + "StageHeight", -1); @@ -498,7 +512,7 @@ public void setStageStatus() { myStage.setY(my); } } - + myStage.fullScreenProperty().addListener(new ChangeListener() { @Override public void changed(ObservableValue ov, Boolean old_val, Boolean new_val) { @@ -511,7 +525,7 @@ public void changed(ObservableValue ov, Boolean old_val, Bool UserConfig.setBoolean(prefix + "Maximized", myStage.isMaximized()); } }); - + } else { myStage.sizeToScene(); myStage.centerOnScreen(); @@ -520,7 +534,7 @@ public void changed(ObservableValue ov, Boolean old_val, Bool MyBoxLog.error(e); } } - + public void setMinWidth(int minWidth) { try { if (getMyStage() == null) { @@ -534,7 +548,7 @@ public void setMinWidth(int minWidth) { MyBoxLog.error(e); } } - + public void setInterfaceStyle(Scene scene, String style) { try { if (scene != null && style != null) { @@ -545,7 +559,7 @@ public void setInterfaceStyle(Scene scene, String style) { // MyBoxLog.error(e); } } - + public void setInterfaceStyle(String style) { try { if (thisPane != null && style != null) { @@ -559,7 +573,7 @@ public void setInterfaceStyle(String style) { // MyBoxLog.error(e); } } - + public void refreshStyle() { if (getMyScene() != null) { refreshStyle(myScene.getRoot()); @@ -567,7 +581,7 @@ public void refreshStyle() { refreshStyle(thisPane); } } - + public void refreshStyle(Parent node) { try { NodeStyleTools.refreshStyle(node); @@ -576,7 +590,7 @@ public void refreshStyle(Parent node) { MyBoxLog.error(e); } } - + public void toFront() { try { new Timer().schedule(new TimerTask() { @@ -594,7 +608,7 @@ public void run() { MyBoxLog.error(e); } } - + public void setAlwaysTop(boolean onTop, boolean info) { try { myStage = getMyStage(); @@ -614,7 +628,7 @@ public void setAlwaysTop(boolean onTop, boolean info) { MyBoxLog.error(e); } } - + public void iconified() { try { getMyStage().setIconified(true); @@ -622,7 +636,7 @@ public void iconified() { MyBoxLog.error(e); } } - + public void requestMouse() { try { if (getMyStage() == null || this instanceof MyBoxLogViewerController) { @@ -647,16 +661,16 @@ public void setControlsStyle() { if (tipsLabel != null) { NodeStyleTools.setTooltip(tipsLabel, new Tooltip(message(TipsLabelKey))); } - + if (tipsView != null) { NodeStyleTools.setTooltip(tipsView, new Tooltip(message(TipsLabelKey))); } - + if (rightTipsView != null) { NodeStyleTools.setTooltip(rightTipsView, new Tooltip(message(TipsLabelKey))); } } - + if (copyButton == null) { if (copyToSystemClipboardButton != null) { NodeStyleTools.setTooltip(copyToSystemClipboardButton, new Tooltip(message("CopyToSystemClipboard") + "\nCTRL+c / ALT+c")); @@ -664,7 +678,7 @@ public void setControlsStyle() { NodeStyleTools.setTooltip(copyToMyBoxClipboardButton, new Tooltip(message("CopyToMyBoxClipboard") + "\nCTRL+c / ALT+c")); } } - + if (pasteButton == null) { if (pasteContentInSystemClipboardButton != null) { NodeStyleTools.setTooltip(pasteContentInSystemClipboardButton, new Tooltip(message("PasteContentInSystemClipboard") + "\nCTRL+v / ALT+v")); @@ -672,13 +686,13 @@ public void setControlsStyle() { NodeStyleTools.setTooltip(loadContentInSystemClipboardButton, new Tooltip(message("LoadContentInSystemClipboard") + "\nCTRL+v / ALT+v")); } } - + } catch (Exception e) { MyBoxLog.debug(e); } - + } - + public BaseController reload() { try { if (!checkBeforeNextAction()) { @@ -710,7 +724,7 @@ public BaseController reload() { return myController; } } - + public boolean setSceneFontSize(int size) { if (thisPane == null) { return false; @@ -722,7 +736,7 @@ public boolean setSceneFontSize(int size) { } return true; } - + public boolean setIconSize(int size) { if (thisPane == null) { return false; @@ -734,7 +748,7 @@ public boolean setIconSize(int size) { refreshInterface(); return true; } - + public BaseController refreshInterfaceAndFile() { refreshInterface(); if (checkBeforeNextAction()) { @@ -742,7 +756,7 @@ public BaseController refreshInterfaceAndFile() { } return myController; } - + public BaseController refreshInterface() { try { if (thisPane != null) { @@ -758,7 +772,7 @@ public BaseController refreshInterface() { return null; } } - + public BaseController loadScene(String newFxml) { try { if (!leavingScene()) { @@ -770,23 +784,23 @@ public BaseController loadScene(String newFxml) { return null; } } - + public BaseController openStage(String newFxml) { return WindowTools.openStage(getStage(), newFxml); } - + public BaseController childStage(String newFxml) { return WindowTools.childStage(myController, newFxml); } - + public BaseController branchStage(String newFxml) { return WindowTools.branchStage(myController, newFxml); } - + public BaseController popStage(String newFxml) { return WindowTools.popStage(myController, newFxml); } - + public void updateStageTitle(File file) { try { if (getMyStage() == null) { @@ -820,7 +834,7 @@ public boolean leavingScene() { return false; } } - + public static boolean checkBeforeNextAction(Node node) { if (node == null) { return true; @@ -861,7 +875,7 @@ public static boolean checkBeforeNextAction(Node node) { } return true; } - + public void leaveScene() { try { cleanNode(thisPane); @@ -870,7 +884,7 @@ public void leaveScene() { MyBoxLog.error(e); } } - + public static void cleanNode(Node node) { if (node == null) { return; @@ -899,7 +913,7 @@ public static void cleanNode(Node node) { } node.setUserData(null); } - + public void cleanPane() { try { if (timer != null) { @@ -928,9 +942,9 @@ public void cleanPane() { } catch (Exception e) { MyBoxLog.debug(e); } - + } - + public void cleanWindow() { try { if (myScene != null) { @@ -947,14 +961,14 @@ public void cleanWindow() { UserConfig.setInt(prefix + "StageHeight", (int) myStage.getHeight()); myStage = null; } - + myWindow = null; System.gc(); } catch (Exception e) { MyBoxLog.debug(e); } } - + public boolean close() { if (leavingScene()) { WindowTools.closeWindow(getMyWindow()); @@ -963,7 +977,7 @@ public boolean close() { return false; } } - + public boolean closeStage() { return close(); } @@ -987,9 +1001,9 @@ public void initSplitPanes() { UserConfig.setBoolean(interfaceName + "DisplayRightPane", rightPaneCheck.isSelected()); checkRightPane(); }); - + } - + if (leftPaneCheck != null) { leftPaneCheck.setSelected(UserConfig.getBoolean(interfaceName + "DisplayLeftPane", true)); checkLeftPane(); @@ -1012,7 +1026,7 @@ public void changed(ObservableValue o, Boolean ov, Boolean nv MyBoxLog.error(e); } } - + public void checkLeftPane() { try { if (isSettingValues || splitPane == null || leftPane == null @@ -1034,7 +1048,7 @@ public void checkLeftPane() { MyBoxLog.error(e); } } - + public void checkRightPane() { try { if (isSettingValues || splitPane == null || rightPane == null @@ -1056,7 +1070,7 @@ public void checkRightPane() { MyBoxLog.error(e); } } - + public boolean checkRightPaneHide() { try { if (isSettingValues || splitPane == null || rightPane == null @@ -1076,7 +1090,7 @@ public boolean checkRightPaneHide() { return false; } } - + public void setSplitDividerPositions() { try { if (isSettingValues || splitPane == null) { @@ -1125,7 +1139,7 @@ public void setSplitDividerPositions() { MyBoxLog.error(e); } } - + @FXML public void controlLeftPane() { if (isSettingValues || splitPane == null || leftPane == null @@ -1138,7 +1152,7 @@ public void controlLeftPane() { showLeftPane(); } } - + public void hideLeftPane() { if (isSettingValues || splitPane == null || leftPane == null || (leftPaneControl != null && !leftPaneControl.isVisible()) @@ -1156,7 +1170,7 @@ public void hideLeftPane() { StyleTools.setIconName(leftPaneControl, "iconDoubleRight.png"); } } - + public void showLeftPane() { if (isSettingValues || splitPane == null || leftPane == null || (leftPaneControl != null && !leftPaneControl.isVisible()) @@ -1175,7 +1189,7 @@ public void showLeftPane() { leftPane.setHvalue(0); leftPane.setVvalue(0); } - + @FXML public void controlRightPane() { if (isSettingValues || splitPane == null || rightPane == null @@ -1188,7 +1202,7 @@ public void controlRightPane() { showRightPane(); } } - + public void hideRightPane() { if (isSettingValues || splitPane == null || rightPane == null || (rightPaneControl != null && !rightPaneControl.isVisible()) @@ -1206,7 +1220,7 @@ public void hideRightPane() { StyleTools.setIconName(rightPaneControl, "iconDoubleLeft.png"); } } - + public void showRightPane() { try { if (isSettingValues || splitPane == null || rightPane == null @@ -1229,5 +1243,5 @@ public void showRightPane() { MyBoxLog.error(e); } } - + } diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DSourceRowsController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DSourceRowsController.java index 10d9acec1..acbd5014f 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DSourceRowsController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DSourceRowsController.java @@ -48,6 +48,9 @@ public void setParameters(BaseData2DTaskController taskController) { filterController = taskController.filterController; filterTab = taskController.filterTab; dataTab = taskController.sourceTab; + if (tabPane == null) { + tabPane = taskController.tabPane; + } initParameters(); @@ -223,7 +226,7 @@ public boolean checkRowsFilter() { && !filterController.checkExpression(isAllPages())) { String ferror = filterController.error; if (ferror != null && !ferror.isBlank()) { - if (filterTab != null) { + if (filterTab != null && tabPane != null) { tabPane.getSelectionModel().select(filterTab); } alertError(ferror); diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DTableController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DTableController.java index 0cbe2472c..89510aeb3 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DTableController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DTableController.java @@ -60,7 +60,7 @@ public class BaseData2DTableController extends BaseTablePagesController() { + @Override + public void changed(ObservableValue o, Number ov, Number nv) { + if (nv == null) { + return; + } + widthChanged = true; + dataColumn.setWidth(nv.intValue()); + } + }); } } catch (Exception e) { diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DViewController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DViewController.java index 7f808ae7c..abc515f78 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DViewController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/BaseData2DViewController.java @@ -22,10 +22,13 @@ import javafx.scene.layout.FlowPane; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; +import javafx.scene.web.WebEngine; +import javafx.scene.web.WebView; import mara.mybox.data2d.tools.Data2DPageTools; import mara.mybox.dev.MyBoxLog; import mara.mybox.fxml.FxSingletonTask; import mara.mybox.fxml.FxTask; +import mara.mybox.fxml.WebViewTools; import mara.mybox.fxml.style.StyleTools; import static mara.mybox.value.Languages.message; import mara.mybox.value.UserConfig; @@ -39,6 +42,7 @@ public class BaseData2DViewController extends BaseData2DLoadController { protected FxTask loadTask; protected String delimiterName; + protected WebEngine webEngine; @FXML protected ToggleGroup formatGroup; @@ -51,13 +55,13 @@ public class BaseData2DViewController extends BaseData2DLoadController { @FXML protected TextArea textsArea, csvArea; @FXML - protected ControlWebView webViewController; + protected WebView webView; @FXML protected Label columnsLabel; @FXML protected FlowPane buttonsPane; @FXML - protected Button delimiterButton, viewDataButton; + protected Button delimiterButton, viewDataButton, editHtmlButton; @FXML protected CheckBox wrapCheck, formCheck, titleCheck, columnCheck, rowCheck; @@ -94,6 +98,10 @@ public void initMoreControls() { toolbar.getChildren().remove(leftPaneControl); refreshStyle(mainAreaBox); + webEngine = webView.getEngine(); + webView.setCache(false); + webEngine.setJavaScriptEnabled(true); + wrapCheck.selectedProperty().addListener(new ChangeListener() { @Override public void changed(ObservableValue v, Boolean ov, Boolean nv) { @@ -210,7 +218,8 @@ public void switchFormat() { isSettingValues = true; buttonsPane.getChildren().clear(); pageBox.getChildren().clear(); - webViewController.loadContents(""); + webEngine.getLoadWorker().cancel(); + webEngine.loadContent(""); textsArea.clear(); tableView.setItems(null); if (csvRadio != null) { @@ -258,7 +267,7 @@ public void showHtml() { } public void showHtmlButtons() { - buttonsPane.getChildren().setAll(menuButton, viewDataButton, dataManufactureButton); + buttonsPane.getChildren().setAll(editHtmlButton, viewDataButton, dataManufactureButton); } public void loadHtml(boolean pop) { @@ -266,7 +275,8 @@ public void loadHtml(boolean pop) { if (pop) { popError(message("NoData")); } else { - webViewController.loadContents(""); + webEngine.getLoadWorker().cancel(); + webEngine.loadContent(""); } return; } @@ -299,7 +309,8 @@ protected void whenSucceeded() { if (pop) { HtmlPopController.openHtml(myController, html); } else { - webViewController.loadContents(html); + webEngine.getLoadWorker().cancel(); + webEngine.loadContent(html); } } @@ -441,9 +452,39 @@ public void updateTable(List> data) { } } + @Override + public boolean checkBeforeLoadingTableData() { + return checkBeforeNextAction(); + } + + @Override + public boolean checkBeforeNextAction() { + saveWidths(); + return true; + } + + public void saveWidths() { + try { + if (data2D == null || !dataSizeLoaded + || !isValidPageData() || !widthChanged) { + return; + } + data2D.saveAttributes(); + } catch (Exception e) { + MyBoxLog.error(e); + } + } + /* action */ + @FXML + public void editHtml() { + if (htmlRadio.isSelected()) { + HtmlEditorController.openHtml(WebViewTools.getHtml(webEngine)); + } + } + @Override public boolean controlAltB() { saveAsAction(); @@ -482,8 +523,7 @@ public boolean menuAction() { } if (htmlRadio.isSelected()) { - webViewController.menuAction(); - return true; + return false; } else if (tableRadio.isSelected()) { popTableMenu(); @@ -515,7 +555,7 @@ public boolean popAction() { } if (htmlRadio.isSelected()) { - HtmlPopController.openWebView(this, webViewController.webView); + HtmlPopController.openWebView(this, webView); return true; } else if (tableRadio.isSelected()) { diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/ControlData2DSetValue.java b/alpha/MyBox/src/main/java/mara/mybox/controller/ControlData2DSetValue.java index 430f42ecd..d54d695bd 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/ControlData2DSetValue.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/ControlData2DSetValue.java @@ -47,7 +47,7 @@ public class ControlData2DSetValue extends BaseController { @FXML protected ControlData2DRowExpression expressionController; @FXML - protected CheckBox errorContinueCheck, fillZeroCheck; + protected CheckBox fillZeroCheck; @FXML protected VBox expBox; diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/ControlSynchronizeOptions.java b/alpha/MyBox/src/main/java/mara/mybox/controller/ControlSynchronizeOptions.java index 2aa7431bd..a19b6cb93 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/ControlSynchronizeOptions.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/ControlSynchronizeOptions.java @@ -45,7 +45,7 @@ public class ControlSynchronizeOptions extends BaseController { protected CheckBox copySubdirCheck, copyEmptyCheck, copyNewCheck, copyHiddenCheck, copyReadonlyCheck, copyExistedCheck, copyModifiedCheck, deleteNonExistedCheck, notCopyCheck, copyAttrCheck, copyMtimeCheck, permissionCheck, - continueCheck, deleteSourceCheck; + deleteSourceCheck; @FXML protected DatePicker modifyAfterInput; @@ -180,14 +180,6 @@ public void changed(ObservableValue v, Boolean ov, Boolean nv permissionInput.setText(UserConfig.getString(baseName + "Permissions", "755")); } - continueCheck.setSelected(UserConfig.getBoolean(baseName + "Continue", true)); - continueCheck.selectedProperty().addListener(new ChangeListener() { - @Override - public void changed(ObservableValue v, Boolean ov, Boolean nv) { - UserConfig.setBoolean(baseName + "Continue", nv); - } - }); - deleteSourceCheck.selectedProperty().addListener(new ChangeListener() { @Override public void changed(ObservableValue v, Boolean ov, Boolean nv) { @@ -233,7 +225,7 @@ protected FileSynchronizeAttributes pickOptions() { } else { copyAttr.setModifyAfter(-Long.MAX_VALUE); } - copyAttr.setContinueWhenError(continueCheck.isSelected()); + copyAttr.setContinueWhenError(errorContinueCheck.isSelected()); copyAttr.setCopyAttrinutes(copyAttrCheck != null ? copyAttrCheck.isSelected() : true); copyAttr.setCopyMTime(copyMtimeCheck != null ? copyMtimeCheck.isSelected() : true); copyAttr.setSetPermissions(permissionCheck != null ? permissionCheck.isSelected() : false); diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DDeleteController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DDeleteController.java index fec75ec71..2dad4e4db 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DDeleteController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DDeleteController.java @@ -2,8 +2,6 @@ import java.util.ArrayList; import java.util.List; -import javafx.fxml.FXML; -import javafx.scene.control.CheckBox; import mara.mybox.dev.MyBoxLog; import mara.mybox.fxml.FxSingletonTask; import mara.mybox.fxml.PopTools; @@ -21,9 +19,6 @@ public class Data2DDeleteController extends BaseData2DTaskTargetsController { protected Data2DManufactureController editor; protected boolean clearAll; - @FXML - protected CheckBox errorContinueCheck; - public Data2DDeleteController() { baseTitle = message("Delete"); } diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DManufactureController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DManufactureController.java index c10ac9da6..e8afe26db 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DManufactureController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DManufactureController.java @@ -82,7 +82,6 @@ public void changed(ObservableValue v, Boolean ov, Boolean nv tableChanged(); } }); - } catch (Exception e) { MyBoxLog.error(e); } @@ -154,7 +153,7 @@ public void switchFormat() { @Override public void showHtmlButtons() { buttonsPane.getChildren().setAll(formCheck, titleCheck, columnCheck, rowCheck, - infoButton); + editHtmlButton, infoButton); isSettingValues = true; formCheck.setSelected(UserConfig.getBoolean(baseName + "HtmlShowForm", false)); columnCheck.setSelected(UserConfig.getBoolean(baseName + "HtmlShowColumns", true)); @@ -364,15 +363,9 @@ public boolean isDataChanged() { /* table */ - @Override - public boolean checkBeforeLoadingTableData() { - return checkBeforeNextAction(); - } - @Override public boolean checkBeforeNextAction() { boolean goOn; - if (!isDataChanged()) { goOn = true; } else { @@ -452,7 +445,8 @@ public boolean leavingScene() { alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); ButtonType buttonSaveAs = new ButtonType(message("SaveAs")); ButtonType buttonNotSave = new ButtonType(message("NotSave")); - alert.getButtonTypes().setAll(buttonSaveAs, buttonNotSave); + ButtonType buttonCancel = new ButtonType(message("Cancel")); + alert.getButtonTypes().setAll(buttonSaveAs, buttonNotSave, buttonCancel); Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); stage.setAlwaysOnTop(true); stage.toFront(); @@ -738,7 +732,8 @@ protected boolean handle() { backup = addBackup(this, data2D.getFile()); } data2D.startTask(this, null); - return data2D.savePageData(this) >= 0; + dataSize = data2D.savePageData(this); + return dataSize >= 0; } catch (Exception e) { error = e.toString(); return false; @@ -816,11 +811,13 @@ public int addRows(int index, List> list) { @FXML @Override public void editAction() { - int index = selectedIndix(); - if (index < 0) { - return; + if (tableRadio.isSelected()) { + int index = selectedIndix(); + if (index < 0) { + return; + } + Data2DRowEditController.open(this, index); } - Data2DRowEditController.open(this, index); } @FXML diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DRowExpressionController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DRowExpressionController.java index 402e038cb..2624e3fe1 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DRowExpressionController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DRowExpressionController.java @@ -4,7 +4,6 @@ import java.util.List; import javafx.event.Event; import javafx.fxml.FXML; -import javafx.scene.control.CheckBox; import javafx.scene.control.Tab; import javafx.scene.control.TextField; import mara.mybox.data2d.writer.Data2DWriter; @@ -34,8 +33,6 @@ public class Data2DRowExpressionController extends BaseData2DTaskTargetsControll @FXML protected ControlData2DRowExpression expressionController; @FXML - protected CheckBox errorContinueCheck; - @FXML protected Tab valuesTab; public Data2DRowExpressionController() { diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DSetValuesController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DSetValuesController.java index 58bbf70e1..56f83ebbe 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DSetValuesController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/Data2DSetValuesController.java @@ -388,11 +388,15 @@ public void expression() { for (int row : sourceController.filteredRowsIndices) { List values = dataController.tableData.get(row); if (!data2D.calculateTableRowExpression(script, values, row)) { + error = data2D.getError(); if (valueController.errorContinueCheck.isSelected()) { + if (error != null) { + MyBoxLog.console(error); + } continue; } else { - if (data2D.getError() != null) { - popError(data2D.getError()); + if (error != null) { + popError(error); } return; } diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/FilesRenameController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/FilesRenameController.java index fb2664e21..682ed3f2a 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/FilesRenameController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/FilesRenameController.java @@ -15,7 +15,7 @@ import javafx.scene.control.TextField; import javafx.scene.control.Toggle; import javafx.scene.control.ToggleGroup; -import javafx.scene.layout.FlowPane; +import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import mara.mybox.data.FileInformation; import mara.mybox.data.FindReplaceString; @@ -45,7 +45,7 @@ public class FilesRenameController extends BaseBatchFileController { @FXML protected VBox renameOptionsBox, numberBox, replaceBox; @FXML - protected FlowPane suffixPane, prefixPane, extensionPane; + protected HBox suffixBox, prefixBox, extensionPane; @FXML protected CheckBox fillZeroCheck, originalCheck, stringCheck, accumCheck, suffixCheck, descentCheck, recountCheck, regexCheck; @@ -107,11 +107,11 @@ private void checkRenameType() { } else if (message("AppendSuffix").equals(selected.getText())) { renameType = RenameType.AppendSuffix; - renameOptionsBox.getChildren().addAll(suffixPane); + renameOptionsBox.getChildren().addAll(suffixBox); } else if (message("AddPrefix").equals(selected.getText())) { renameType = RenameType.AddPrefix; - renameOptionsBox.getChildren().addAll(prefixPane); + renameOptionsBox.getChildren().addAll(prefixBox); } else if (message("AddSequenceNumber").equals(selected.getText())) { renameType = RenameType.AddSequenceNumber; diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathGetController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathGetController.java index a455dc0d3..f84d329ea 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathGetController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathGetController.java @@ -127,7 +127,7 @@ public boolean downDirectory(FxTask currentTask, String srcfile, File path) { } else { ok = downFile(currentTask, child, attrs, target); } - if (!ok && !continueCheck.isSelected()) { + if (!ok && !errorContinueCheck.isSelected()) { if (currentTask != null) { currentTask.cancel(); } diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathHandleFilesController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathHandleFilesController.java index 44115d691..8b9e33315 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathHandleFilesController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathHandleFilesController.java @@ -38,7 +38,7 @@ public abstract class RemotePathHandleFilesController extends BaseTaskController @FXML protected Label hostLabel; @FXML - protected CheckBox wrapCheck, continueCheck; + protected CheckBox wrapCheck; public void setParameters(RemotePathManageController manageController) { try { @@ -66,14 +66,6 @@ public void changed(ObservableValue v, Boolean ov, Boolean nv }); namesArea.setWrapText(wrapCheck.isSelected()); - continueCheck.setSelected(UserConfig.getBoolean("RemotePathFilesErrorContinue", true)); - continueCheck.selectedProperty().addListener(new ChangeListener() { - @Override - public void changed(ObservableValue v, Boolean ov, Boolean nv) { - UserConfig.setBoolean("RemotePathFilesErrorContinue", nv); - } - }); - } catch (Exception e) { MyBoxLog.error(e); popError(e.toString()); @@ -134,7 +126,7 @@ public boolean doTask(FxTask currentTask) { showLogs(doneString + ": " + name); } else { showLogs(message("Failed") + ": " + name); - if (!continueCheck.isSelected()) { + if (!errorContinueCheck.isSelected()) { return false; } } diff --git a/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathPermissionController.java b/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathPermissionController.java index f94c41c20..7a81c7bd3 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathPermissionController.java +++ b/alpha/MyBox/src/main/java/mara/mybox/controller/RemotePathPermissionController.java @@ -183,7 +183,7 @@ public boolean changeFilesInDirectory(FxTask currentTask, String dir) { ok = changeFilesInDirectory(currentTask, child); } } - if (!ok && !continueCheck.isSelected()) { + if (!ok && !errorContinueCheck.isSelected()) { if (currentTask != null) { currentTask.cancel(); } diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/DataFilter.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/DataFilter.java index 64ef2908e..c1811be08 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/DataFilter.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/DataFilter.java @@ -129,10 +129,10 @@ public String getResult() { } public void handleError(String error) { - if (task != null) { - task.setError(error); - } if (error != null && AppValues.Alpha) { + if (task != null) { + task.setError(error); + } MyBoxLog.debug(error + "\n" + sourceScript); } } diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/DataTable.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/DataTable.java index 6d49f8d96..4bf466442 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/DataTable.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/DataTable.java @@ -387,10 +387,12 @@ public Data2DRow makeRow(List values, InvalidAs invalidAs) { } } Data2DRow data2DRow = tableData2D.newRow(); + int rowSize = values.size(); for (int i = 0; i < values.size(); i++) { Data2DColumn column = vColumns.get(i); String name = column.getColumnName(); - data2DRow.setColumnValue(name, column.fromString(values.get(i), invalidAs)); + String value = i < rowSize ? values.get(i) : null; + data2DRow.setColumnValue(name, column.fromString(value, invalidAs)); } return data2DRow; } catch (Exception e) { diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/TmpTable.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/TmpTable.java index 78f45fe22..f1130155d 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/TmpTable.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/TmpTable.java @@ -247,10 +247,10 @@ public Data2DRow makeRow(List sourceRow, InvalidAs invalidAs) { index = -1; values = sourceRow; } - int len = values.size(); + int rowSize = values.size(); for (int i = 0; i < sourceReferIndice.size(); i++) { int col = sourceReferIndice.get(i); - if (col < 0 || col >= len) { + if (col < 0 || col >= rowSize) { continue; } Data2DColumn targetColumn = column(i + valueIndexOffset); diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DDelete.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DDelete.java index 15f78104d..60d753513 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DDelete.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DDelete.java @@ -32,16 +32,17 @@ public void handleRow(List row, long index) { targetRow = null; passFilter = sourceData.filterDataRow(sourceRow, sourceRowIndex); reachMax = sourceData.filterReachMaxPassed(); + boolean handle = passFilter && !reachMax; if (sourceData.error != null) { if (errorContinue) { showError(sourceData.error); - return; + handle = false; } else { failStop(sourceData.error); return; } } - deleteRow(passFilter && !reachMax); + deleteRow(handle); } catch (Exception e) { MyBoxLog.console(e); } diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DSetValue.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DSetValue.java index c301051f5..6296294e8 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DSetValue.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/Data2DSetValue.java @@ -59,12 +59,13 @@ public void handleRow(List row, long index) { String expResult = null, currentValue; if (handle) { if (setValue.isExpression() && dataValue != null) { - sourceData.calculateDataRowExpression(dataValue, sourceRow, sourceRowIndex); - expResult = sourceData.expressionResult(); - sourceData.error = sourceData.expressionError(); - if (sourceData.error != null) { + if (sourceData.calculateDataRowExpression(dataValue, sourceRow, sourceRowIndex)) { + expResult = sourceData.expressionResult(); + } else { + sourceData.error = sourceData.expressionError(); if (errorContinue) { - return; + showError(sourceData.error); + handle = false; } else { failStop(sourceData.error); return; @@ -76,8 +77,9 @@ public void handleRow(List row, long index) { return; } targetRow = new ArrayList<>(); + int rowSize = sourceRow.size(); for (int i = 0; i < sourceData.columns.size(); i++) { - if (i < sourceRow.size()) { + if (i < rowSize) { currentValue = sourceRow.get(i); } else { currentValue = null; diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/DataTableSetValue.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/DataTableSetValue.java index 59191cd36..9e9236ec4 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/DataTableSetValue.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/modify/DataTableSetValue.java @@ -8,7 +8,6 @@ import mara.mybox.data2d.DataTable; import mara.mybox.db.Database; import mara.mybox.db.DerbyBase; -import mara.mybox.db.data.ColumnDefinition; import mara.mybox.db.data.Data2DColumn; import mara.mybox.db.data.Data2DRow; import mara.mybox.db.table.TableData2D; @@ -76,7 +75,7 @@ public void writeRow() { for (int i = 0; i < columnsNumber; ++i) { Data2DColumn column = columns.get(i); String name = column.getColumnName(); - sourceTableRow.setColumnValue(name, column.fromString(targetRow.get(i), ColumnDefinition.InvalidAs.Empty)); + sourceTableRow.setColumnValue(name, column.fromString(targetRow.get(i))); } if (tableData2D.setUpdateStatement(conn, update, sourceTableRow)) { update.addBatch(); diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DRowExpression.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DRowExpression.java index a6d38d942..869299f72 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DRowExpression.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DRowExpression.java @@ -32,8 +32,9 @@ public boolean handleRow() { return false; } targetRow = new ArrayList<>(); + int rowSize = sourceRow.size(); for (int col : cols) { - if (col >= 0 && col < sourceRow.size()) { + if (col >= 0 && col < rowSize) { targetRow.add(sourceRow.get(col)); } else { targetRow.add(null); diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DVerify.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DVerify.java index 1b94f90a0..b9c87f23e 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DVerify.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/operate/Data2DVerify.java @@ -99,12 +99,13 @@ public static List columnNames() { public static List> verify(Data2D data, long rowIndex, List row) { try { List< List> invalids = new ArrayList<>(); + int rowSize = row.size(); for (int c = 0; c < data.columnsNumber(); c++) { Data2DColumn column = data.column(c); if (column.isAuto()) { continue; } - String value = row.get(c); + String value = c < rowSize ? row.get(c) : null; String item = null; if (column.isNotNull() && (value == null || value.isBlank())) { item = message("Null"); diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/tools/Data2DExampleTools.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/tools/Data2DExampleTools.java index 4c5ee018e..06deaf1be 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/tools/Data2DExampleTools.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/tools/Data2DExampleTools.java @@ -1679,16 +1679,17 @@ public static DataFileCSV DetailedTesting(boolean isChinese) { DataFileCSV data = new DataFileCSV(); List columns = new ArrayList<>(); columns.add(new Data2DColumn(message(lang, "TestEnvironment"), ColumnType.String)); - columns.add(new Data2DColumn(message(lang, "Title"), ColumnType.String)); columns.add(new Data2DColumn(message(lang, "Type"), ColumnType.EnumerationEditable) .setFormat("\n" + message(lang, "Function") + "\n" + message(lang, "UserInterface") + "\n" + message(lang, "Bundary") + "\n" - + message(lang, "InvalidValue") + "\n" + + message(lang, "Invalid") + "\n" + message(lang, "Data") + "\n" + message(lang, "API") + "\n" + message(lang, "IO") + "\n" + message(lang, "Exception") + "\n" + message(lang, "Performance") + "\n" + message(lang, "Robustness") + "\n" + message(lang, "Usability") + "\n" + message(lang, "Compatibility") + "\n" + message(lang, "Security") + "\n" + message(lang, "Document"))); + columns.add(new Data2DColumn(message(lang, "Object"), ColumnType.String)); + columns.add(new Data2DColumn(message(lang, "Title"), ColumnType.String)); columns.add(new Data2DColumn(message(lang, "Steps"), ColumnType.String)); columns.add(new Data2DColumn(message(lang, "Status"), ColumnType.EnumerationEditable) .setFormat("\n" + message(lang, "NotTested") + "\n" diff --git a/alpha/MyBox/src/main/java/mara/mybox/data2d/writer/Data2DWriter.java b/alpha/MyBox/src/main/java/mara/mybox/data2d/writer/Data2DWriter.java index ed41cdc95..f0e145533 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/data2d/writer/Data2DWriter.java +++ b/alpha/MyBox/src/main/java/mara/mybox/data2d/writer/Data2DWriter.java @@ -50,7 +50,7 @@ public abstract class Data2DWriter { protected String indent = " ", dataName, fileSuffix, value; protected long targetRowIndex; protected Connection conn; - protected int rowEnd; + protected int rowSize; protected InvalidAs invalidAs; public Data2DWriter() { @@ -94,13 +94,9 @@ public void writeRow(List inRow) { return; } printRow = new ArrayList<>(); - rowEnd = inRow.size() - 1; + rowSize = inRow.size(); for (int i = 0; i < columns.size(); i++) { - if (i > rowEnd) { - value = null; - } else { - value = inRow.get(i); - } + value = i < rowSize ? inRow.get(i) : null; if (formatValues) { value = columns.get(i).format(value, invalidAs, validateValue); } diff --git a/alpha/MyBox/src/main/java/mara/mybox/db/data/ColumnDefinition.java b/alpha/MyBox/src/main/java/mara/mybox/db/data/ColumnDefinition.java index 3d79dba9b..e19791b04 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/db/data/ColumnDefinition.java +++ b/alpha/MyBox/src/main/java/mara/mybox/db/data/ColumnDefinition.java @@ -634,10 +634,6 @@ public String savedValue(String string, boolean validate) { return string; } - public String filterValue(String string) { - return toString(fromString(string)); - } - public boolean valueQuoted() { return !isNumberType() && type != ColumnType.Boolean; } diff --git a/alpha/MyBox/src/main/java/mara/mybox/fxml/ExpressionCalculator.java b/alpha/MyBox/src/main/java/mara/mybox/fxml/ExpressionCalculator.java index 3b0bdef91..16950704f 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/fxml/ExpressionCalculator.java +++ b/alpha/MyBox/src/main/java/mara/mybox/fxml/ExpressionCalculator.java @@ -1,15 +1,17 @@ package mara.mybox.fxml; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import javax.script.Bindings; +import javax.script.ScriptContext; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import mara.mybox.calculation.DescriptiveStatistic.StatisticType; import mara.mybox.data.FindReplaceString; import mara.mybox.data2d.Data2D; import mara.mybox.db.data.Data2DColumn; -import mara.mybox.dev.MyBoxLog; -import mara.mybox.value.AppValues; import static mara.mybox.value.Languages.message; import org.openjdk.nashorn.api.scripting.NashornScriptEngineFactory; @@ -20,9 +22,13 @@ */ public class ExpressionCalculator { + public final static String VariablePrefix = "__MyBox_VRB_"; public static ScriptEngine scriptEngine; - public FindReplaceString findReplace; + public String expression, result, error; + public Map variableNames; + public Bindings variableValues; + public FindReplaceString replaceHandler; public ExpressionCalculator() { // https://github.com/Mararsh/MyBox/issues/1568 @@ -31,6 +37,8 @@ public ExpressionCalculator() { factory.registerEngineName("nashorn", new NashornScriptEngineFactory()); scriptEngine = factory.getEngineByName("nashorn"); } + variableValues = scriptEngine.createBindings(); + variableNames = new HashMap<>(); reset(); } @@ -38,6 +46,11 @@ final public void reset() { expression = null; result = null; error = null; + variableNames.clear(); + variableValues.clear(); + if (replaceHandler == null) { + replaceHandler = createReplaceAll(); + } } /* @@ -50,6 +63,7 @@ private boolean executeScript() { if (expression == null || expression.isBlank()) { return true; } + scriptEngine.setBindings(variableValues, ScriptContext.ENGINE_SCOPE); Object o = scriptEngine.eval(expression); if (o != null) { result = o.toString(); @@ -62,6 +76,7 @@ private boolean executeScript() { } public String calculate(String script) { + reset(); this.expression = script; if (executeScript()) { return result; @@ -77,104 +92,111 @@ public boolean condition(String script) { public void handleError(String e) { error = e; - if (e != null && AppValues.Alpha) { - MyBoxLog.debug(error + "\n" + expression); - } +// if (e != null && AppValues.Alpha) { +// MyBoxLog.debug(error + "\n" + info()); +// } } - public static String eval(String script) { - ExpressionCalculator calculator = new ExpressionCalculator(); - return calculator.calculate(script); + public String info() { + String info = "expression: " + expression; + for (String variable : variableValues.keySet()) { + info += "\n" + variable + ": " + variableValues.get(variable); + } + return info; } /* - "dataRowNumber" is 1-based + "dataRowNumber" is 1-based */ - public String dataRowExpression(Data2D data2D, String script, List dataRow, long dataRowNumber) { + public boolean makeExpression(Data2D data2D, + String script, List rowValues, long dataRowNumber) { + try { + reset(); if (script == null || script.isBlank() - || dataRow == null || dataRow.isEmpty() + || rowValues == null || rowValues.isEmpty() || data2D == null || !data2D.isValidDefinition()) { - return script; + handleError(message("invalidParameter")); + return false; } - - String filledScript = script; - if (filledScript.contains("#{" + message("TableRowNumber") + "}")) { - filledScript = message("NoTableRowNumberWhenAllPages"); - } else { - for (int i = 0; i < data2D.columnsNumber(); i++) { - Data2DColumn column = data2D.getColumns().get(i); - String name = column.getColumnName(); - String value = fixQuotes(column.filterValue(dataRow.get(i))); - filledScript = replaceAll(filledScript, "#{" + name + "}", value); + if (script.contains("#{" + message("TableRowNumber") + "}")) { + handleError(message("NoTableRowNumberWhenAllPages")); + return false; + } + expression = script; + int index = 1, rowSize = rowValues.size(); + String value; + for (int i = 0; i < data2D.columnsNumber(); i++) { + Data2DColumn column = data2D.getColumns().get(i); + String name = column.getColumnName(); + value = i < rowSize ? rowValues.get(i) : null; + String placeholder = "#{" + name + "}"; + String placeholderQuoted = "'" + placeholder + "'"; + String variableName = VariablePrefix + index++; + if (expression.contains(placeholderQuoted)) { + expression = replaceAll(expression, placeholderQuoted, variableName); } - filledScript = replaceAll(filledScript, "#{" + message("DataRowNumber") + "}", dataRowNumber + ""); + expression = replaceAll(expression, placeholder, variableName); + variableNames.put(placeholderQuoted, variableName); + variableValues.put(variableName, value); } - return filledScript; + expression = replaceAll(expression, "#{" + message("DataRowNumber") + "}", dataRowNumber + ""); +// MyBoxLog.console(info()); + return true; } catch (Exception e) { handleError(e.toString()); - return null; + return false; } } /* first value of "tableRow" should be "dataRowNumber" - "tableRowNumber" is 0-based while "dataRowNumber" is 1-based + "tableRowNumber" is 0-based */ - public String tableRowExpression(Data2D data2D, String script, List tableRow, long tableRowNumber) { + public boolean calculateTableRowExpression(Data2D data2D, + String script, List tableRow, long tableRowNumber) { try { - if (script == null || script.isBlank() - || tableRow == null || tableRow.isEmpty() - || data2D == null || !data2D.isValidDefinition()) { - return script; + reset(); + if (tableRow == null || tableRow.isEmpty()) { + handleError(message("invalidParameter")); + return false; } - - String filledScript = script; - for (int i = 0; i < data2D.columnsNumber(); i++) { - Data2DColumn column = data2D.getColumns().get(i); - String name = column.getColumnName(); - String value = fixQuotes(column.filterValue(tableRow.get(i + 1))); - filledScript = replaceAll(filledScript, "#{" + name + "}", value); + if (tableRowNumber < 0) { + handleError(message("NoTableRowNumberWhenAllPages")); + return false; } - filledScript = replaceAll(filledScript, "#{" + message("DataRowNumber") + "}", tableRow.get(0) + ""); - filledScript = replaceAll(filledScript, "#{" + message("TableRowNumber") + "}", - tableRowNumber >= 0 ? (tableRowNumber + 1) + "" : message("NoTableRowNumberWhenAllPages")); - return filledScript; + if (!makeExpression(data2D, script, + tableRow.subList(1, tableRow.size()), + Long.parseLong(tableRow.get(0)))) { + return false; + } + expression = replaceAll(expression, "#{" + message("TableRowNumber") + "}", + (tableRowNumber + 1) + ""); + return executeScript(); + } catch (Exception e) { handleError(e.toString()); - return null; - } - } - - public String fixQuotes(String value) { - if (value != null) { - value = replaceAll(value, "'", "\\'"); - value = replaceAll(value, "\"", "\\\""); - } - return value; - } - - /* - calculate - */ - public boolean calculateTableRowExpression(Data2D data2D, - String script, List tableRow, long tableRowNumber) { - expression = tableRowExpression(data2D, script, tableRow, tableRowNumber); - if (expression == null || expression.isBlank()) { - handleError(message("InvalidExpression")); return false; } - return calculate(expression) != null; } public boolean calculateDataRowExpression(Data2D data2D, String script, List dataRow, long dataRowNumber) { - expression = dataRowExpression(data2D, script, dataRow, dataRowNumber); - if (expression == null || expression.isBlank()) { - handleError(message("InvalidExpression")); + + try { + reset(); + if (script != null && script.contains("#{" + message("TableRowNumber") + "}")) { + handleError(message("NoTableRowNumberWhenAllPages")); + return false; + } + if (!makeExpression(data2D, script, dataRow, dataRowNumber)) { + return false; + } + return executeScript(); + } catch (Exception e) { + handleError(e.toString()); return false; } - return calculate(expression) != null; } public boolean validateExpression(Data2D data2D, String script, boolean allPages) { @@ -222,32 +244,13 @@ public String replaceDummyStatistic(Data2D data2D, String script) { } public String replaceAll(String script, String string, String replaced) { - return getFindReplace().replace(null, script, string, replaced); - } - - /* - set - */ - public ExpressionCalculator setFindReplace(FindReplaceString findReplace) { - this.findReplace = findReplace; - return this; + return replaceHandler.replace(null, script, string, replaced); } - public ExpressionCalculator setExpression(String expression) { - this.expression = expression; - return this; - } /* get */ - public FindReplaceString getFindReplace() { - if (findReplace == null) { - findReplace = createReplaceAll(); - } - return findReplace; - } - public String getResult() { return result; } @@ -260,7 +263,11 @@ public String getError() { static */ public static FindReplaceString createReplaceAll() { - return FindReplaceString.create().setOperation(FindReplaceString.Operation.ReplaceAll) - .setIsRegex(false).setCaseInsensitive(false).setMultiline(false); + return FindReplaceString.create() + .setOperation(FindReplaceString.Operation.ReplaceAll) + .setIsRegex(false) + .setCaseInsensitive(false) + .setMultiline(false); } + } diff --git a/alpha/MyBox/src/main/java/mara/mybox/tools/LocationTools.java b/alpha/MyBox/src/main/java/mara/mybox/tools/LocationTools.java index e00237c23..cda7e847e 100644 --- a/alpha/MyBox/src/main/java/mara/mybox/tools/LocationTools.java +++ b/alpha/MyBox/src/main/java/mara/mybox/tools/LocationTools.java @@ -17,7 +17,8 @@ public static File tiandituFile(boolean geodetic) { try { File map = FxFileTools.getInternalFile("/js/tianditu.html", "js", "tianditu.html"); String html = TextFileTools.readTexts(null, map); - html = html.replace("0ddeb917def62b4691500526cc30a9b1", UserConfig.getString("TianDiTuWebKey", AppValues.TianDiTuWebKey)); + html = html.replace(AppValues.TianDiTuWebKey, + UserConfig.getString("TianDiTuWebKey", AppValues.TianDiTuWebKey)); if (geodetic) { html = html.replace("'EPSG:900913", "EPSG:4326"); } @@ -33,7 +34,8 @@ public static String gaodeMap() { try { File map = FxFileTools.getInternalFile("/js/GaoDeMap.html", "js", "GaoDeMap.html"); String html = TextFileTools.readTexts(null, map); - html = html.replace("06b9e078a51325a843dfefd57ffd876c", UserConfig.getString("GaoDeMapWebKey", AppValues.GaoDeMapJavascriptKey)); + html = html.replace(AppValues.GaoDeMapJavascriptKey, + UserConfig.getString("GaoDeMapWebKey", AppValues.GaoDeMapJavascriptKey)); return html; } catch (Exception e) { MyBoxLog.error(e.toString()); diff --git a/alpha/MyBox/src/main/resources/bundles/Messages_en.properties b/alpha/MyBox/src/main/resources/bundles/Messages_en.properties index b7be08aba..1a7e58647 100644 --- a/alpha/MyBox/src/main/resources/bundles/Messages_en.properties +++ b/alpha/MyBox/src/main/resources/bundles/Messages_en.properties @@ -4390,7 +4390,7 @@ RowStartComments=Blank, zero, or negative means no limitation to row number StyleColumnComments=No selection means all columns SetStylesTips=Manage the list of data styles:\n- Add/Edit/Delete styles.\n- Define conditions to determine which data cells to apply the style:\n - Range of data rows\n - Column names\n - Row filter\n Notice, data of a row number may be changed when some rows are added or deleted. \n Example, when insert 2 rows before "row 6", original "row 12" becomes "row 14" while current "row 12" was "row 10". \n So "row number" is not right way to locate a specific data row while rows number is changing. \n A way to refer sepcial rows is the expression composed of column values.\n- Define values of the style:\n - Font size, colors, bold, etc.\n - More values in format of JavaFx CSS.\n- Define title and sequence number of the style.\n- Set whether the style marks abnormal values.\n- All styles are applied to the data one by one in order of their sequence number. ClearAndPaste=Clear and paste -NoTableRowNumberWhenAllPages=ShouldNotIncludeTableRowNumberWhenAllPages +NoTableRowNumberWhenAllPages=Should not include table row number when handl all pages DropExisted=Drop if existed SureReplaceExistedDatabaseTable=This database table is existed. Sure to replace it? MaxFilteredDataTake=Maximum filtered rows to take(Empty/zero/negative to unlimit) diff --git a/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_en.csv b/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_en.csv index 74e68d6d2..0cdb2bf04 100644 --- a/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_en.csv +++ b/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_en.csv @@ -1,83 +1,94 @@ -Test Environment,Title,Type,Steps,Status,Modify Time,Description -win,Manufacture Data - create data,Function,all data types: CSV/Excel/texts/database table/MyBox clipboard/matrix,,, -win,Manufacture Data - table - normal values,Function,"1.commit -2.cancel",,, -win,Manufacture Data - table - null,bundary,"1.permit +Test environment,Type,Object,Title,Steps,Status,Modify time,Description +win,Function,Manufacture Data,create data,data types: CSV/Excel/texts/database table/MyBox clipboard/matrix,,, +win,Function,Manufacture Data,select file,data file types: CSV/Excel/texts,,, +win,Function,Manufacture Data,select data,data types: CSV/Excel/texts/database table/MyBox clipboard/matrix,,, +win,Function,Manufacture Data,Load contents in System Clipboard,,,, +win,Function,Manufacture Data,Import examples,"1.import data +2.only import definition",,, +win,Function,Manufacture Data,table - normal values,"1.commit +2.cancel +3.single line string +4.multiple lines string +5.number +6.enumeration +7.time +8.boolean",,, +win,bundary,Manufacture Data,table - null,"1.permit 2.not permit",,, -win,Manufacture Data - table - invalid values,Invalid value,"1.commit +win,Invalid,Manufacture Data,table - invalid values,"1.commit 2.cancel",,, -win,Manufacture Data - CSV - normal,Function,"1.commit +win,Function,Manufacture Data,CSV - normal,"1.commit 2.cancel",,, -win,Manufacture Data - CSV - null,Invalid value,"1.permit +win,Invalid,Manufacture Data,CSV - null,"1.permit 2.not permit",,, -win,Manufacture Data - CSV - invalid,Invalid value,"1.commit +win,Invalid,Manufacture Data,CSV - invalid,"1.commit 2.cancel",,, -win,Manufacture Data - switch mode - normal values,Function,"1.html to table +win,Function,Manufacture Data,switch mode - normal values,"1.html to table 2.table to html 3.html to csv 4.csv to texts 5.texts to html",,, -win,Manufacture Data - switch mode - null - permit,Function,"1.html to table +win,Function,Manufacture Data,switch mode - null - permit,"1.html to table 2.table to html 3.html to csv 4.csv to texts 5.texts to html",,, -win,Manufacture Data - switch mode - null - not permit,Invalid value,"1.html to table +win,Invalid,Manufacture Data,switch mode - null - not permit,"1.html to table 2.table to html 3.html to csv 4.csv to texts 5.texts to html",,, -win,Manufacture Data - switch mode - invalid values,Invalid value,"1.html to table +win,Invalid,Manufacture Data,switch mode - invalid values,"1.html to table 2.table to html 3.html to csv 4.csv to texts 5.texts to html",,, -win,Manufacture Data - switch mode - interfaces,interface,"1.shortcuts +win,interface,Manufacture Data,switch mode - interfaces,"1.shortcuts 2.tips 3.layouts 4.responses 5.menus",,, -win,Manufacture Data - modify data - temporary data,Function,"1.add/delete/change rows +win,Function,Manufacture Data,modify data - temporary data,"1.add/delete/change rows 2.move rows 3.clear rows",,, -win,Manufacture Data - modify data - one page,Function,"1.add/delete/change rows +win,Function,Manufacture Data,modify data - one page,"1.add/delete/change rows 2.move rows 3.clear rows",,, -win,Manufacture Data - modify data - multiple pages,Function,"1.add/delete/change rows +win,Function,Manufacture Data,modify data - multiple pages,"1.add/delete/change rows 2.move rows 3.clear rows",,, -win,Manufacture Data - interfaces,interface,"1.shortcuts +win,interface,Manufacture Data,interfaces,"1.shortcuts 2.tips 3.layouts 4.responses 5.menus",,, -win,Manufacture Data - define data - add/delete/change columns,Function,"1.all types +win,Function,Manufacture Data,define data - add/delete/change columns,"1.all types 2.all formats 3.invalid",,, -win,Manufacture Data - define data - move columns,Function,,,, -win,Manufacture Data - define data - clear columns,Invalid value,,,, -win,Manufacture Data - define data - modify attributes - temporary data,Function,,,, -win,Manufacture Data - define data - modify attributes - save data,Function,,,, -win,Manufacture Data - define data - modify attributes - cancel data,Function,,,, -win,Manufacture Data - define data - modify attributes - one page,Function,,,, -win,Manufacture Data - define data - modify attributes - multiple pages,Function,,,, -win,Manufacture Data - define data - interfaces,interface,"1.shortcuts +win,Function,Manufacture Data,define data - move columns,,,, +win,Invalid,Manufacture Data,define data - clear columns,,,, +win,Function,Manufacture Data,define data - modify attributes - temporary data,,,, +win,Function,Manufacture Data,define data - modify attributes - save data,,,, +win,Function,Manufacture Data,define data - modify attributes - cancel data,,,, +win,Function,Manufacture Data,define data - modify attributes - one page,,,, +win,Function,Manufacture Data,define data - modify attributes - multiple pages,,,, +win,interface,Manufacture Data,define data - interfaces,"1.shortcuts 2.tips 3.layouts 4.responses 5.menus",,, -win,Manufacture Data - save data - temporary data,Function,"1.save +win,Function,Manufacture Data,save data - temporary data,"1.save 2.cancel",,, -win,Manufacture Data - save data - one page,Function,"1.save +win,Function,Manufacture Data,save data - one page,"1.save 2.cancel",,, -win,Manufacture Data - save data - multiple pages,Function,"1.save +win,Function,Manufacture Data,save data - multiple pages,"1.save 2.cancel",,, -win,Manufacture Data - save as - data status,Function,"1.temporary data +win,Function,Manufacture Data,save as - source data types,CSV/Excel/texts/database table/clipboard/matrix,,, +win,Function,Manufacture Data,save as - target formats,CSV/Excel/texts/database table/MyBox clipboard/matrix/System clipboard/JSON/XML/HTML/PDF,,, +win,Function,Manufacture Data,save as - data status,"1.temporary data 2.one page 3.multiple pages",,, -win,Manufacture Data - save as - source data types,Function,CSV/Excel/texts/database table/clipboard/matrix,,, -win,Manufacture Data - save as - target formats,Function,CSV/Excel/texts/database table/MyBox clipboard/matrix/System clipboard/JSON/XML/HTML/PDF,,, -win,Manufacture Data - save as - interfaces,interface,"1.shortcuts +win,interface,Manufacture Data,save as - interfaces,"1.shortcuts 2.tips 3.layouts 4.responses diff --git a/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_zh.csv b/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_zh.csv index ed3285bb2..a9d497dde 100644 --- a/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_zh.csv +++ b/alpha/MyBox/src/main/resources/data/examples/ST_DetailedTesting_zh.csv @@ -1,83 +1,94 @@ -测试环境,标题,类型,步骤,状态,修改时间,说明 -win,数据处理-创建数据,功能,各种数据类型:CSV、Excel、文本、数据库表、粘贴板、矩阵,,, -win,数据处理-表格编辑-正常值,功能,"1.提交 -2.放弃",,, -win,数据处理-表格编辑-空值,边界,"1.允许 +测试环境,类型,对象,标题,步骤,状态,修改时间,描述 +win,功能,数据处理,创建数据,数据类型:CSV、Excel、文本、数据库表、粘贴板、矩阵,,, +win,功能,数据处理,选择文件,数据文件类型:CSV、Excel、文本,,, +win,功能,数据处理,选择数据,数据类型:CSV、Excel、文本、数据库表、粘贴板、矩阵,,, +win,功能,数据处理,加载系统粘贴板的内容,,,, +win,功能,数据处理,导入示例,"1.导入数据 +2.只导入定义",,, +win,边界,数据处理,表格编辑-空值,"1.允许 2.不允许",,, -win,数据处理-表格编辑-非法值,非法值,"1.提交 -2.放弃",,, -win,数据处理-CSV编辑-正常值,功能,"1.提交 +win,功能,数据处理,表格编辑-正常值,"1.提交 +2.放弃 +3.单行字串 +4.多行字串 +5.数值 +6.枚举型 +7.时间 +8.布尔",,, +win,非法值,数据处理,表格编辑-非法值,"1.提交 2.放弃",,, -win,数据处理-CSV编辑-空值,边界,"1.允许 +win,边界,数据处理,CSV编辑-空值,"1.允许 2.不允许",,, -win,数据处理-CSV编辑-非法值,非法值,"1.提交 +win,功能,数据处理,CSV编辑-正常值,"1.提交 +2.放弃",,, +win,非法值,数据处理,CSV编辑-非法值,"1.提交 2.放弃",,, -win,数据处理-模式切换-正常值,功能,"1.html到表格 +win,功能,数据处理,模式切换-正常值,"1.html到表格 2.表格到html 3.html到csv 4.csv到文本 5.文本到html",,, -win,数据处理-模式切换-空值-允许,功能,"1.html到表格 +win,功能,数据处理,模式切换-空值-允许,"1.html到表格 2.表格到html 3.html到csv 4.csv到文本 5.文本到html",,, -win,数据处理-模式切换-空值-不允许,非法值,"1.html到表格 +win,非法值,数据处理,模式切换-空值-不允许,"1.html到表格 2.表格到html 3.html到csv 4.csv到文本 5.文本到html",,, -win,数据处理-模式切换-非法值,非法值,"1.html到表格 +win,非法值,数据处理,模式切换-非法值,"1.html到表格 2.表格到html 3.html到csv 4.csv到文本 5.文本到html",,, -win,数据处理-模式切换-界面,界面,"1.快捷键 +win,界面,数据处理,模式切换-界面,"1.快捷键 2.提示 3.布局 4.响应 5.菜单",,, -win,数据处理-修改数据-临时数据,功能,"1.增删改数据行 +win,功能,数据处理,修改数据-临时数据,"1.增删改数据行 2.移动数据行 3.清空数据",,, -win,数据处理-修改数据-一页数据,功能,"1.增删改数据行 +win,功能,数据处理,修改数据-一页数据,"1.增删改数据行 2.移动数据行 3.清空数据",,, -win,数据处理-修改数据-多页数据,功能,"1.增删改数据行 +win,功能,数据处理,修改数据-多页数据,"1.增删改数据行 2.移动数据行 3.清空数据",,, -win,数据处理-界面,界面,"1.快捷键 +win,界面,数据处理,界面,"1.快捷键 2.提示 3.布局 4.响应 5.菜单",,, -win,数据处理-定义数据-增删改列,功能,"1.各种列类型 +win,功能,数据处理,定义数据-增删改列,"1.各种列类型 2.各种格式 3.处理非法值",,, -win,数据处理-定义数据-移动列,功能,,,, -win,数据处理-定义数据-清空列,非法值,,,, -win,数据处理-定义数据-修改属性-临时数据,功能,,,, -win,数据处理-定义数据-修改属性-保存数据,功能,,,, -win,数据处理-定义数据-修改属性-不保存数据,功能,,,, -win,数据处理-定义数据-修改属性-一页数据,功能,,,, -win,数据处理-定义数据-修改属性-多页数据,功能,,,, -win,数据处理-定义数据-界面,界面,"1.快捷键 +win,功能,数据处理,定义数据-移动列,,,, +win,非法值,数据处理,定义数据-清空列,,,, +win,功能,数据处理,定义数据-修改属性-临时数据,,,, +win,功能,数据处理,定义数据-修改属性-一页数据,,,, +win,功能,数据处理,定义数据-修改属性-多页数据,,,, +win,功能,数据处理,定义数据-修改属性-保存数据,,,, +win,功能,数据处理,定义数据-修改属性-不保存数据,,,, +win,界面,数据处理,定义数据-界面,"1.快捷键 2.提示 3.布局 4.响应 5.菜单",,, -win,数据处理-保存数据-临时数据,功能,"1.保存 +win,功能,数据处理,保存数据-临时数据,"1.保存 2.放弃",,, -win,数据处理-保存数据-一页数据,功能,"1.保存 +win,功能,数据处理,保存数据-一页数据,"1.保存 2.放弃",,, -win,数据处理-保存数据-多页数据,功能,"1.保存 +win,功能,数据处理,保存数据-多页数据,"1.保存 2.放弃",,, -win,数据处理-另存数据-数据状态,功能,"1.临时数据 +win,功能,数据处理,另存数据-源数据类型,CSV、Excel、文本、数据库表、粘贴板、矩阵,,, +win,功能,数据处理,另存数据-目标格式,CSV、Excel、文本、MyBox粘贴板、矩阵、数据库表、系统粘贴板、JSON、XML、HTML、PDF,,, +win,功能,数据处理,另存数据-数据状态,"1.临时数据 2.一页数据 3.多页数据",,, -win,数据处理-另存数据-源数据类型,功能,CSV、Excel、文本、数据库表、粘贴板、矩阵,,, -win,数据处理-另存数据-目标格式,功能,CSV、Excel、文本、MyBox粘贴板、矩阵、数据库表、系统粘贴板、JSON、XML、HTML、PDF,,, -win,数据处理-另存数据-界面,界面,"1.快捷键 +win,界面,数据处理,另存数据-界面,"1.快捷键 2.提示 3.布局 4.响应 diff --git a/alpha/MyBox/src/main/resources/doc/en/README.md b/alpha/MyBox/src/main/resources/doc/en/README.md index d19b0974c..5fef07cec 100644 --- a/alpha/MyBox/src/main/resources/doc/en/README.md +++ b/alpha/MyBox/src/main/resources/doc/en/README.md @@ -4,21 +4,24 @@ This is compute application to provide simple and easy functions. It's free and open sources. ## What's New -2024-5-5 v6.8.1 +2024-5-10 v6.8.1 * Add: - Write watermarks in PDF files in batch. - New data column type: Editable enumeration. * Improve: - Redesign and implement "Data manufacture". The base framework is: reader + operate + writers. + - Options: Verify types when edit data; Verify types when save data. + - Implement row expresion with bindings. - Simplify interface of "Data manufacture". - Transparent can be set when customized colors. - "rtbufsize" and rotation can be set for ffmpeg. - Notes: Node can be any html which can include head. * Solved problems: + - Fail to switch language when default locale is not Chinese. - Errors popped when edit data row. + - Row expression is messed when value is string of multiple lines. - Icon is displayed as blank. - - Many internal errors when view html in webview. - "Era" is converted wrongly when import data in database table. - Options of "Target file" in some interfaces do not work. - Transparent background is set wrongly when draw shape in SVG. @@ -27,9 +30,6 @@ This is compute application to provide simple and easy functions. It's free and [Closed requirements/bugs in this version](http://github.com/Mararsh/MyBox/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av6.8.1) -## Software Quality -[Verification list in this version](https://mara-mybox.sourceforge.io/mybox_verification_list_en.html) - # Download and Execution @@ -152,6 +152,10 @@ In MyBox: | User Guide - Network Tools | 6.7.2 | 2023-4-16 | [html](https://mara-mybox.sourceforge.io/guide/en/MyBox-NetworkTools-en/MyBox-NetworkTools-en.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-en.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-en.odt) | [html](https://mara-mybox.sourceforge.io/guide/zh/MyBox-NetworkTools-zh/MyBox-NetworkTools-zh.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-zh.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-zh.odt) | | User Guide - Media Tools | 6.7.1 | 2023-3-13 | [html](https://mara-mybox.sourceforge.io/guide/en/MyBox-MediaTools-en/MyBox-MediaTools-en.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-en.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-en.odt) | [html](https://mara-mybox.sourceforge.io/guide/zh/MyBox-MediaTools-zh/MyBox-MediaTools-zh.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-zh.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-zh.odt) | | User Guide - Development Tools | 6.7.1 | 2023-3-13 | [html](https://mara-mybox.sourceforge.io/guide/en/MyBox-DevTools-en/MyBox-DevTools-en.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-en.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-en.odt) | [html](https://mara-mybox.sourceforge.io/guide/zh/MyBox-DevTools-zh/MyBox-DevTools-zh.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-zh.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-zh.odt) | +| Software Testing - Test Environment | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_TestEnvironment_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_TestEnvironment_zh.html) | +| Software Testing - Base Functions' Verification List | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_BaseVerificationList_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_BaseVerificationList_zh.html) | +| Software Testing - Compatibility Testing | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_CompatibilityTesting_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_CompatibilityTesting_zh.html) | +| Software Testing - Detailed Testing | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_DetailedTesting_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_DetailedTesting_zh.html) | | Tips in Interfaces | 6.8.1 | 2024-5-5 | [html](https://mara-mybox.sourceforge.io/mybox_interface_tips_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_interface_tips_zh.html) | | About - Tree Information | 6.8.1 | 2024-5-5 | [html](https://mara-mybox.sourceforge.io/mybox_about_tree_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_about_tree_zh.html) | | About - Data in Two-dimensional Storage Structure | 6.8.1 | 2024-5-5 | [html](https://mara-mybox.sourceforge.io/mybox_about_data2d_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_about_data2d_zh.html) | diff --git a/alpha/MyBox/src/main/resources/doc/en/mybox_about_data2d_en.html b/alpha/MyBox/src/main/resources/doc/en/mybox_about_data2d_en.html index 8c3136b56..07ab34e9c 100644 --- a/alpha/MyBox/src/main/resources/doc/en/mybox_about_data2d_en.html +++ b/alpha/MyBox/src/main/resources/doc/en/mybox_about_data2d_en.html @@ -5,7 +5,7 @@

Data in Two-dimensional Storage Structure

-

1. Data Objects

+

1 Data Objects

1.1 External Formats

Following objects can be edited in consistent way:

    @@ -21,20 +21,23 @@

    1.2 Storage Structure

  • "Rows" store instances of data and extend data set in vertical direction.
  • Data should be in same width. That is all rows have equal number of columns.
-

2. Create Data

+ +

2 Create Data

Data can be created by one of following ways:

  • Click or hover button "Create Data", and select data type: CSV, Excel, Texts, MyBox Clipboard, Matrix, Database Table.
  • Click button "Load contents in System Clipboard", and select rows and columns.
  • Click or hover button "Examples", and select example data. Option "Only import definition".
-

3. Open Data

+ +

3 Open Data

Existed data can be opened by one of following ways:

  • Click or hover button "Select File" to load data in extrenal data file.
  • Click button "Select"(CTRL+T or ALT+T) to load data managed by MyBox.
-

4. Four Modes

+ +

4 Four Modes

4.1 Page data in html - read only

  • Display data of current page in html.
  • @@ -71,8 +74,10 @@

    4.4 Page data in texts - read only

  • Can view data definition.
  • Click button "Delimiter" to reload data and apply different delimiter. This delimiter does not affect source file.
-

5. Define Data

+ +

5 Define Data

In mode "Table - edit" or mode "CSV - edit", click button "Define Data".

+

5.1 Interface of Columns Management

Under tab "Columns", add/delete/change columns in table view:

    @@ -83,15 +88,17 @@

    5.1 Interface of Columns Management

  1. Can set random colors.

  2. Can adjust orders of columns.

  3. Click button "OK" to apply modifications of columns to "Table" of current data.

  4. -
  5. Click button "Cancel" to discard modifications of columns and pick data from "Table" of current data.

  6. -
  7. When changes have not been saved, if modifications have not been applied to data, "**" is displayed in tab header, or else "*" is displayed in tab header.

  8. +
  9. Click button "Recover" to discard modifications of columns and pick data from "Table" of current data.

+

5.2 Types of Columns

    -
  1. Types of columns include: String, Double, Float, Long, Integer, Short, Boolean, Datetime, Date, Era, Longitude, Latitude, Enumeration, Color.

  2. +
  3. Types of columns include: String, Double, Float, Long, Integer, Short, Boolean, Datetime, Date, Era, Longitude, Latitude, + Enumeration, Editable Enumeration, Color.

  4. This attribute is used to display, edit, calculate, and save data.

  5. Longitutde and Latitude are defined together generally.

+

5.3 Format of Column

  1. This attribute is mainly for display. When data are inputted/edited, formats are not applied automatically and original inputs are kept.

  2. @@ -105,19 +112,60 @@

    5.3.3 Format for Era

    To Era, following are supported in formats: MM/dd/yy, yy-MM-dd, milliseconds, time zone, T separator, patch century, prefix/suffix of "AD" and "BC" in Chinese and English,etc..

    5.3.4 Define Enumeration

    To Enumeration, list of values can be defined.

    +

    5.4 Handle Invalid Values

    1. How columns handle invalid values, including: skip, count as empty, and count as zero.

    2. In some context, "count as empty" equals to "skip".

    3. This attribute is only used for display or calculation. When data are inputted/edited, invalid values are not handled automatically.

    -

    5.5 Attributes of Data

    + +

    5.5 Color of Column

    +

    Column color is mainly used for data charts.

    +

    When chart is generated, elements in it are displayed in colors as their columns' definitions. Then user can set chart in random colors.

    + +

    5.6 Attributes of Data

    Under tab "Attributes", set: data name, decimal scale, maximum value of random, and description.

    -

    6. Usages of Columns

    + +

    6 Verify Data Values

    +
      +
    1. The verified objects can be either rows in current page or all rows.

    2. +
    +
      +
    1. Following are checked:

    2. +
    +
      +
        +
      • If a column is defined as "not null", then null values are invalid for this column.

      • +
      • If a value is not satisfied with the column type, then the value is invalid.

      • +
      +
    +
      +
        +
      • Click button "Verify data in current page".

      • +
      • Option: Verify values automatically when save data.

      • +
      +
    +
      +
    1. +

      Options:

      +
        +
      • +

        Validate data when edit.

      • +
      • +

        Validate data when save.

      • +
      +
    2. +
    + + +

    7 Edit Data

    Principle of column usages is "Most tolerability and least manufacture".

    -

    6.1 Load Data

    + +

    7.1 Load Data

    When load data, types of columns are not checked, and original values are read and imported.

    -

    6.2 Display Data

    + +

    7.2 Display Data

    1. Parse values as columns' types.

    2. Handle invalid values as columns' definitions.

    3. @@ -131,14 +179,16 @@

      6.2 Display Data

    4. If skip or count invalid as empty, then display it as "abc".

    5. -

      6.3 Controls for editing

      + +

      7.3 Controls for editing

      • To Boolean, checkbox is provided.

      • To Enumeration, list view is provided with selections.

      • To Color, palette is provided.

      • To Longitude and Latitude, map can be popped to locate coordinate.

      -

      6.4 Edit Data Cell

      + +

      7.4 Edit Data Cell

      1. Click editable cell to start editing.

      2. When editing is started, its original value is displayed, while both type and format of column are ignored.

      3. @@ -187,121 +237,105 @@

        6.4 Edit Data Cell

        1. Other data cells are not affected. That is, data cells are always in originial values if they are not changed.

        -

        6.5 Verify Data Values

        -
          -
        1. The verified objects are rows in current page.

        2. -
        3. To start the verification:

        4. +
            +
          1. Option: Validate data when edit. That is, data are not validated when edit if this option is not selected.

          + +

          8 Save Data

          + +

          8.1 Interface

            -
              -
            • Click button "Verify data in current page".

            • -
            • Option: Verify values automatically when save data.

            • -
            -
          -
            -
          1. Following are checked:

          2. -
          -
            -
              -
            • If a column is defined as "not null", then null values are invalid for this column.

            • -
            • If a value is not satisfied with the column type, then the value is invalid.

            • -
            +
          • Click button "Save"(CTRL+S or ALT+S) to write modification in data.
          • +
          • Changes of rows in "Table", including modify/add/delete/sort, affect rows of current page in file.
          • +
          • Changes in columns and attributes, including modify/add/delete/sort, affect all rows in file.
          • +
          • Changes of attributes and columns are saved in database.
          • +
          • Click button "Save As"(F5 or CTRL+B or ALT+B) to write data in other format: + CSV, Excel, Texts, MyBox Clipboard, Matrix, Database Table, System Clipboard, JSON, XML, HTML, PDF.
          -
            -
          1. The results of verification are displayed in a html table.

          2. -
          -

          6.6 Save Data

          -
            -
          1. Values are written into file of CSV/Texts/Excel as strings.

          2. -
          3. Values are written into database table as nearest types:

          4. -
          -
            -

            -
          -
          -
          -
          -
          -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

          Column Type of MyBox

          Data Type of JDBC

          String

          VARCHAR

          Double

          DOUBLE

          Float

          FLOAT

          Long

          BIGINT

          Integer

          INT

          Short

          SMALLINT

          Boolean

          BOOLEAN

          Datetime

          TIMESTAMP

          Date

          DATE

          Era

          BIGINT

          Longitude

          DOUBLE

          Latitude

          DOUBLE

          Enumeration

          VARCHAR

          Color

          VARCHAR

          -
          -
          -
          -
          -
          -



          + +

          8.2 Save Data File

          +

          Values are written into file of CSV/Texts/Excel as strings.

          +

          Option: Validate data when save. That is, data are not validated when save if this option is not selected.

          + +

          8.3 Save Database Table

          +

          Values in database table are always validated.

          +

          Values are written into database table as nearest types:

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

          Column Type of MyBox

          Data Type of JDBC

          String

          VARCHAR

          Double

          DOUBLE

          Float

          FLOAT

          Long

          BIGINT

          Integer

          INT

          Short

          SMALLINT

          Boolean

          BOOLEAN

          Datetime

          TIMESTAMP

          Date

          DATE

          Era

          BIGINT

          Longitude

          DOUBLE

          Latitude

          DOUBLE

          Enumeration

          VARCHAR

          Color

          VARCHAR

          Notice: derby does not support negative date, so Ear is saved as long.

          -
            -
          1. All values in Matrix are saved as Double.

          2. -
          -

          6.7 Calculate Data

          + +

          8.4 Save Matrix

          +

          Values in matrix are always validated.

          +

          All values in Matrix are saved as Double.

          + + +

          9 Calculate Data

          1. Data are handled as original values, without concern about types and formats of columns.

          2. Values are parsed as need. Example, if the calculation requires double values, then try to convert values as doubles.

          3. @@ -318,24 +352,15 @@

            6.7 Calculate Data

          4. If "count invalid value as empty", then invalid values cause results of all calculations as invalid(Double.NaN).

          5. -

            6.8 Sort Data

            + + +

            10 Sort Data

            1. For any calculations involved in sorting, data will be translated into a temporary database table, and be sorted by database system.

            2. Results of sorting are related to columns' types. Example, string "124" is smaller than string "18", while number "124" is bigger than number "18".

            -

            6.9 Color of Column

            -

            Column color is mainly used for data charts.

            -

            When chart is generated, elements in it are displayed in colors as their columns' definitions.. Then user can set chart in random colors.

            -

            7 Save Data

            -
              -
            • Click button "Save"(CTRL+S or ALT+S) to write modification in data.
            • -
            • Changes of rows in "Table", including modify/add/delete/sort, affect rows of current page in file.
            • -
            • Changes in columns and attributes, including modify/add/delete/sort, affect all rows in file.
            • -
            • Changes of attributes and columns are saved in database.
            • -
            • Click button "Save As"(F5 or CTRL+B or ALT+B) to write data in other format: - CSV, Excel, Texts, MyBox Clipboard, Matrix, Database Table, System Clipboard, JSON, XML, HTML, PDF.
            • -
            -

            8. Manage Data

            + +

            11 Manage Data

            MyBox records definition of data objects in its internal table:

            @@ -376,10 +401,12 @@

            8. Manage Data


            -

            9. Data File

            -

            Data files are external data. MyBox records their definition and keeps their independence. - After read/write by MyBox, data files should be able to read/write by other ways properly.

            -

            9.1 CSV File

            + +

            12 Data File

            +

            Data files are external data. MyBox records their definition and keeps their independence.

            +

            After read/write by MyBox, data files should be able to read/write by other ways properly.

            + +

            12.1 CSV File

            In CSV file:

            • In general, the first line(header) defines column names, and each of followed lines defines a row of data.
            • @@ -393,7 +420,8 @@

              9.1 CSV File

            • If file is read abnormally, use menu "File - Format" to change options and click button "OK".
            • Data can be saved as different charsets and delimiters.
            -

            9.2 Excel File

            + +

            12.2 Excel File

            In Excel file:

            • In general, the first line(header) defines column names, and each of followed lines defines a row of data.
            • @@ -406,7 +434,8 @@

              9.2 Excel File

            Notice: Tool can only handle base data in Excel file. If file includes format, style, formula, or chart, suggest to save changes as new file to avoid data loss.

            -

            9.3 Texts File

            + +

            12.3 Texts File

            In texts file:

            • In general, the first line(header) defines column names, and each of followed lines defines a row of data.
            • @@ -421,6 +450,7 @@

              9.3 Texts File

            • Not support multiple lines in values.
            • Data can be saved as different charsets and delimiters.
            +

            More details can be referred in "User Guide - Data Tools"


            diff --git a/alpha/MyBox/src/main/resources/doc/en/mybox_about_row_expression_en.html b/alpha/MyBox/src/main/resources/doc/en/mybox_about_row_expression_en.html index 9e4acb728..94f2cfd8a 100644 --- a/alpha/MyBox/src/main/resources/doc/en/mybox_about_row_expression_en.html +++ b/alpha/MyBox/src/main/resources/doc/en/mybox_about_row_expression_en.html @@ -52,7 +52,7 @@

            2 Edit Row Expression

          6. If the script is blank, then return empty string.

          7. It can include any valid elments which Nashorn can parse(ECMAScript 5.1).

          8. It should be a value finally.

          9. -
          10. It can include following placeholders:

            +
          11. It can include following placeholders which can be regarded as variables in the script:

            #{TableRowNumber}
            #{DataRowNumber}
            #{<column_name>}
            #{<column_name>- <statistic-name>}

          12. All valid placeholders are listed in left.

          13. @@ -63,9 +63,8 @@

            2 Edit Row Expression

            3 Calculate Row Expression

            When MyBox evaluates the expression:

              -
            1. Placeholders are replaced with actual values of each data row.

            2. +
            3. Placeholders are replaced with internal variables which are mapped as actual values of each data row.

            4. Statistic values are calculated by all data.

            5. -
            6. '#{xxx}' is handled as string while #{xxx} is handled as number.

            7. When handles all pages, script fails when it includes "#{TableRowNumber}" .

            4 Examples

            @@ -90,15 +89,15 @@

            4 Examples

            calculation - '#{v1}'.replace(/hello/ig, 'Hello') + #{v1}.replace(/hello/ig, 'Hello') replace all "hello"(case-insensitive) as "Hello" in column "v1" - '#{v1}'.toLowerCase() + #{v1}.toLowerCase() lower case of value of column "v1" - '#{v1}'.split(',') + #{v1}.split(',') split value of column "v1" by comma @@ -106,7 +105,7 @@

            4 Examples

            difference between value of column "v1" and mean of column "v1" - new Date('#{time}'.replace(/-/g,'/')).getFullYear() + new Date(#{time}.replace(/-/g,'/')).getFullYear() year of value of column "time" @@ -150,23 +149,27 @@

            3 Exmaples

            difference between values of "v1" and "v2" is less than 100 - '#{v1}' == '' - value of column "v1" is null or empty + #{v1} == '' + value of column "v1" is empty - '#{v1}'.length > 0 + #{v1} == null + value of column "v1" is null + + + #{v1}.length > 0 value of column "v1" is not empty - '#{v1}'.search(/Hello/ig) >= 0 + #{v1}.search(/Hello/ig) >= 0 value of column "v1" includes "Hello"(case-insensitive) - '#{v1}'.startsWith('Hello') + #{v1}.startsWith('Hello') value of column "v1" starts with "Hello" - var array = [ 'A', 'B', 'C'];array.includes('#{v1}') + var array = [ 'A', 'B', 'C'];array.includes(#{v1}) value of column "v1" is one of "A", "B", "C" @@ -174,7 +177,7 @@

            3 Exmaples

            value of column "v1" is less than mean of column "v1" - new Date('#{time}'.replace(/-/g,'/')).getTime() > new Date('2016/05/19 09:23:12').getTime() + new Date(#{time}.replace(/-/g,'/')).getTime() > new Date('2016/05/19 09:23:12').getTime() value of column "time" is later than '2016/05/19 09:23:12' diff --git a/alpha/MyBox/src/main/resources/doc/zh/README.md b/alpha/MyBox/src/main/resources/doc/zh/README.md index 805897850..a994eba81 100644 --- a/alpha/MyBox/src/main/resources/doc/zh/README.md +++ b/alpha/MyBox/src/main/resources/doc/zh/README.md @@ -5,22 +5,25 @@ ## 新内容 -2024-5-5 版本6.8.1 +2024-5-10 版本6.8.1 * 新增: - 对PDF批量添加水印。 - 数据的列类型:可编辑的枚举型。 * 改进: - - 重新设计和实现"处理数据",基础框架为:读构件+处理构件+写构件。 + - 重新设计和实现"处理数据",基础框架为:读+处理+写。 + - 可选:编辑数据时检验类型、保存数据时检验类型。 + - 行表达式的实现:以bindings代入参数值。 - 简化"处理数据"的界面。 - 定制颜色时可以设置透明度。 - ffmpeg可以设置"rtbufsize"和旋转。 - 笔记:节点是任何html,可以包含head。 * 解决问题: + - 缺省locale非中文时无法切换语言。 - 编辑数据行时弹出错误。 - - icon图片显示为空白。 - - 用webview查看网页时出现大量内部错误。 + - 当数据值为多行字串时行表达式会解析混乱。 - 对数据库表导入数据时,类型“纪元”转换错误。 + - icon图片显示为空白。 - 一些界面中“目标文件”的选项未生效。 - 对SVG绘制形状时,透明背景未正确设置。 - SVG的“查看”选项未生效。 @@ -28,10 +31,6 @@ [此版本关闭的需求/问题列表](http://github.com/Mararsh/MyBox/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av6.8.1) - -## 软件质量 -[此版本的检验列表](https://mara-mybox.sourceforge.io/mybox_verification_list_zh.html) - # 下载与运行 @@ -154,6 +153,10 @@ | 用户手册-网络工具 | 6.7.2 | 2023-4-16 | [html](https://mara-mybox.sourceforge.io/guide/en/MyBox-NetworkTools-en/MyBox-NetworkTools-en.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-en.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-en.odt) | [html](https://mara-mybox.sourceforge.io/guide/zh/MyBox-NetworkTools-zh/MyBox-NetworkTools-zh.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-zh.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-NetworkTools-zh.odt) | | 用户手册-媒体工具 | 6.7.1 | 2023-3-13 | [html](https://mara-mybox.sourceforge.io/guide/en/MyBox-MediaTools-en/MyBox-MediaTools-en.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-en.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-en.odt) | [html](https://mara-mybox.sourceforge.io/guide/zh/MyBox-MediaTools-zh/MyBox-MediaTools-zh.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-zh.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-MediaTools-zh.odt) | | 用户手册-开发工具 | 6.7.1 | 2023-3-13 | [html](https://mara-mybox.sourceforge.io/guide/en/MyBox-DevTools-en/MyBox-DevTools-en.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-en.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-en.odt) | [html](https://mara-mybox.sourceforge.io/guide/zh/MyBox-DevTools-zh/MyBox-DevTools-zh.html) [PDF](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-zh.pdf) [odt](https://mara-mybox.sourceforge.io/guide/MyBox-DevTools-zh.odt) | +| 软件测试-测试环境 | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_TestEnvironment_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_TestEnvironment_zh.html) | +| 软件测试-基本功能验证列表 | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_BaseVerificationList_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_BaseVerificationList_zh.html) | +| 软件测试-兼容性测试 | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_CompatibilityTesting_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_CompatibilityTesting_zh.html) | +| 软件测试-详细测试 | 6.8.1 | 2024-5-10 | [html](https://mara-mybox.sourceforge.io/mybox_DetailedTesting_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_DetailedTesting_zh.html) | | 界面中的提示信息 | 6.8.1 | 2024-5-5 | [html](https://mara-mybox.sourceforge.io/mybox_interface_tips_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_interface_tips_zh.html) | | 关于-树形信息 | 6.8.1 | 2024-5-5 | [html](https://mara-mybox.sourceforge.io/mybox_about_tree_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_about_tree_zh.html) | | 关于-二维存储结构的数据 | 6.8.1 | 2024-5-5 | [html](https://mara-mybox.sourceforge.io/mybox_about_data2d_en.html) | [html](https://mara-mybox.sourceforge.io/mybox_about_data2d_zh.html) | diff --git a/alpha/MyBox/src/main/resources/doc/zh/mybox_about_data2d_zh.html b/alpha/MyBox/src/main/resources/doc/zh/mybox_about_data2d_zh.html index 6224be50f..7827d3a70 100644 --- a/alpha/MyBox/src/main/resources/doc/zh/mybox_about_data2d_zh.html +++ b/alpha/MyBox/src/main/resources/doc/zh/mybox_about_data2d_zh.html @@ -5,7 +5,7 @@

            二维存储结构的数据

            -

            1. 数据对象

            +

            1 数据对象

            1.1 外部形式

            以下对象可以以一致的方式来编辑和计算:

              @@ -21,20 +21,23 @@

              1.2 存储结构

            • “行”保存数据的实例,纵向延展数据的集合。
            • 数据应当等宽,即所有行的列数都相同。
            -

            2. 创建数据

            + +

            2 创建数据

            可以用以下方式之一来创建新数据:

            • 点击或悬停按钮“创建数据”,选择数据的类型:CSV、Excel、文本、MyBox粘贴板、矩阵、数据库表。
            • 点击按钮“加载系统粘贴板中的数据”,选择行列。
            • 点击或悬停按钮“示例”,选择示例数据。可选“只导入定义”。
            -

            3. 打开数据

            + +

            3 打开数据

            可以用以下方式之一来打开已存在的数据:

            • 点击或悬停按钮“选择文件”,以加载外部文件的数据。
            • 点击按钮“选择”(CTRL+T或ALT+T),以加载被MyBox管理的数据。
            -

            4. 四种处理模式

            + +

            4 四种处理模式

            4.1 页数据的网页-只读

            • 显示当前页的网页格式。
            • @@ -67,8 +70,10 @@

              4.4 页数据的文本-只读

            • 可查看数据的定义。
            • 点击按钮“分隔符”,以重新读取数据并应用新的分隔符。此分隔符不影响源文件。
            -

            5. 定义数据

            -

            在模式“表格-编辑”或模式“CSV-编辑”下, 点击按钮“定义数据”。

            + +

            5 定义数据

            +

            在模式“表格-编辑”或模式“CSV-编辑”下, 点击按钮或菜单“定义数据”。

            +

            5.1 数据列的管理界面

            在“列”页签下,在表格中增/删/改数据的列:

              @@ -87,19 +92,19 @@

              5.1 数据列的管理界面

            1. 点击按钮“确定”以把列的修改应用于当前数据。

            2. -

              点击按钮“取消”以丢弃修改并从当前数据读取列的定义。

            3. -
            4. -

              修改未保存时,若修改未应用于数据,则页签头显示**,否则页签头显示*。

            5. +

              点击按钮“恢复”以丢弃修改并从当前数据读取列的定义。

            +

            5.2 列的类型

            1. -

              列的类型包括:字串、双精度、浮点、长整型、整型、短整型、布尔型、日期时间、日期、纪元、经度、纬度、枚举型、色彩。

            2. +

              列的类型包括:字串、双精度、浮点、长整型、整型、短整型、布尔型、日期时间、日期、纪元、经度、纬度、枚举型、可编辑枚举型、色彩。

            3. 此属性用于数据的显示、编辑、计算、和保存。

            4. 通常应成对定义经度和纬度。

            +

            5.3 列的格式

            1. @@ -116,6 +121,7 @@

              5.3.3 纪元的格式

              对于纪元类型,支持:M/d/y、y-M-d、毫秒、时区、T分隔、补全世纪、中文前后缀(“公元”、“公元前”)、英文前后缀(“AD”、“BC”)。

              5.3.4 定义枚举型

              对于枚举型,可定义数值列表。

              +

              5.4 对于非法值的处理

              1. @@ -125,16 +131,53 @@

                5.4 对于非法值的处理

              2. 此属性只用于显示或者计算,在编辑输入数值时不会自动处理非法值。

              -

              5.5 数据的属性

              + +

              5.5 列的颜色

              +

              列的颜色主要用于数据图。

              +

              当数据图初始生成时,与列相关的图元素显示为列的颜色。其后用户可以设置为随机颜色。

              + +

              5.6 数据的属性

              在“属性”页签下,设置:数据名、小数位数、随机数的最大值、描述。

              -

              6. 列的应用

              + +

              6 检验数据值

              +
                +
              1. +

                检验的对象可以是当前页中的数据行、也可以是全部数据。

                +
              2. +
              +
                +
              1. +

                以下内容被检验:

                +
                  +
                • +

                  若列被定义为非空,则此列的空值为非法。

                • +
                • +

                  若数值不符合列的类型,则为非法。

                • +
                +
              2. +
              +
                +
              1. +

                选项:

                +
                  +
                • +

                  编辑时检验数据。

                • +
                • +

                  保存时检验数据。

                • +
                +
              2. +
              + +

              7 编辑数据

              列的应用原则为:“最大包容、最少处理”。

              -

              6.1 加载数据

              + +

              7.1 加载数据

              加载数据时,不检查列类型,原样读取和导入。

              -

              6.2 显示数据

              + +

              7.2 显示数据

              1. -

                按列类型解析数值

              2. +

                若选择“编辑时检验数据”,则按列类型解析数值

              3. 按列的定义来处理非法值

              4. @@ -152,7 +195,8 @@

                6.2 显示数据

                若非法值略过或计为空,则显示为“abc”。

              5. -

                6.3 编辑的控件

                + +

                7.3 编辑的控件

                1. 对于布尔类型,显示选择框。

                2. @@ -163,7 +207,8 @@

                  6.3 编辑的控件

                3. 对于经度/纬度,可在地图上选择位置。

                -

                6.4 编辑数据单元

                + +

                7.4 编辑数据单元

                1. 点击可编辑的数据单元,开始编辑。

                2. @@ -234,159 +279,134 @@

                  6.4 编辑数据单元

                3. 其它数据单元不受影响。即只要不修改数据单元,它们就一直保持原样。

                -

                6.5 检验数据值

                -
                  -
                1. -

                  检验的对象是当前页中的数据行。

                2. -
                3. -

                  开启方式:

                4. -
                -
                  -
                    -
                  • -

                    点击按钮“检验当前页的数据”。

                  • -
                  • -

                    选项:在保存时自动检验数据值。

                  • -
                  -
                -
                  +
                  1. -

                    以下内容被检验:

                  2. +

                    选项:编辑时检验数据。即,不选此项时,编辑时不检查数据。

                  + +

                  8 保存数据

                  + +

                  8.1 界面操作

                    -
                      -
                    • -

                      若列被定义为非空,则此列的空值为非法。

                    • -
                    • -

                      若数值不符合列的类型,则为非法。

                    • -
                    +
                  • 点击按钮“保存”(CTRL+S或ALT+S)以把修改写入数据。
                  • +
                  • 行的变化,包括修改/添加/删除/排序,影响当前页的行。
                  • +
                  • 属性和列的变化,包括修改/添加/删除/排序,影响所有行。
                  • +
                  • 数据的定义(属性和列)被保存到内部数据库中。
                  • +
                  • 点击按钮“保存为”(F5或CTRL+B或ALT+B)以把数据写为其它格式:CSV、Excel、文本、MyBox粘贴板、矩阵、数据库表、系统粘贴板、JSON、XML、HTML、PDF。
                  -
                    -
                  1. -

                    检验结果被显示为html表格。

                  2. -
                  -

                  6.6 保存数据

                  -
                    -
                  1. -

                    CSV/文本/Excel文件的数值都按字符串写入。

                  2. -
                  3. -

                    数据库表的数值按“就近类型”写入:

                    -

                  4. -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  -

                  MyBox的列类型

                  -

                  JDBC的数据类型

                  -

                  字串(String)

                  -

                  VARCHAR

                  -

                  双精度(Double)

                  -

                  DOUBLE

                  -

                  浮点(Float)

                  -

                  FLOAT

                  -

                  长整型(Long)

                  -

                  BIGINT

                  -

                  整型(Integer)

                  -

                  INT

                  -

                  短整型(Short)

                  -

                  SMALLINT

                  -

                  布尔型(Boolean)

                  -

                  BOOLEAN

                  -

                  日期时间(Datetime)

                  -

                  TIMESTAMP

                  -

                  日期(Date)

                  -

                  DATE

                  -

                  纪元(Era)

                  -

                  BIGINT

                  -

                  经度(Longitude)

                  -

                  DOUBLE

                  -

                  纬度(Latitude)

                  -

                  DOUBLE

                  -

                  枚举型(Enumeration)

                  -

                  VARCHAR

                  -

                  颜色(Color)

                  -

                  VARCHAR

                  -
                  -
                  -
                  -
                  -
                  + +

                  8.2 保存数据文件

                  +

                  CSV/文本/Excel文件的数值都按字符串写入。

                  +

                  选项:保存时检验数据。即,不选此项时,保存时不检查数据。

                  + +

                  8.3 保存数据库表

                  +

                  对于数据库表的数值,总是检查类型和非空。

                  +

                  数据库表的数按“就近类型”写入:

                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                  +

                  MyBox的列类型

                  +

                  JDBC的数据类型

                  +

                  字串(String)

                  +

                  VARCHAR

                  +

                  双精度(Double)

                  +

                  DOUBLE

                  +

                  浮点(Float)

                  +

                  FLOAT

                  +

                  长整型(Long)

                  +

                  BIGINT

                  +

                  整型(Integer)

                  +

                  INT

                  +

                  短整型(Short)

                  +

                  SMALLINT

                  +

                  布尔型(Boolean)

                  +

                  BOOLEAN

                  +

                  日期时间(Datetime)

                  +

                  TIMESTAMP

                  +

                  日期(Date)

                  +

                  DATE

                  +

                  纪元(Era)

                  +

                  BIGINT

                  +

                  经度(Longitude)

                  +

                  DOUBLE

                  +

                  纬度(Latitude)

                  +

                  DOUBLE

                  +

                  枚举型(Enumeration)

                  +

                  VARCHAR

                  +

                  颜色(Color)

                  +

                  VARCHAR

                  注: derby不支持负数的时间类型,所以只能用长整型保存纪元。

                  -
                    -
                  1. -

                    矩阵的所有数值都按双精度写入。

                  2. -
                  -

                  6.7 计算数据

                  + +

                  8.4 保存矩阵

                  +

                  对于矩阵的数值,总是检查类型和非空。

                  +

                  所有数值都按双精度写入。

                  + +

                  9 计算数据

                  1. 忽略列类型和列格式,用数据原值来处理,

                  2. @@ -413,25 +433,16 @@

                    6.7 计算数据

                    若非法值计为空,则非法值导致所有计算的结果都非法(Double.NaN)。

                    -

                    6.8 数据排序

                    + +

                    10 数据排序

                    1. 所有涉及到排序的计算,数据都会转换为临时数据库表,然后利用数据库系统来排序。

                    2. 排序结果与列的类型有关。例如,字串“123”小于字串“18”,而数字“123”大于数字“18”。

                    -

                    6.9 列的颜色

                    -

                    列的颜色主要用于数据图。

                    -

                    当数据图初始生成时,与列相关的图元素显示为列的颜色。其后用户可以设置为随机颜色。

                    -

                    7 保存数据

                    -
                      -
                    • 点击按钮“保存”(CTRL+S或ALT+S)以把修改写入数据。
                    • -
                    • 行的变化,包括修改/添加/删除/排序,影响当前页的行。
                    • -
                    • 属性和列的变化,包括修改/添加/删除/排序,影响所有行。
                    • -
                    • 数据的定义(属性和列)被保存到内部数据库中。
                    • -
                    • 点击按钮“保存为”(F5或CTRL+B或ALT+B)以把数据写为其它格式:CSV、Excel、文本、MyBox粘贴板、矩阵、数据库表、系统粘贴板、JSON、XML、HTML、PDF。
                    • -
                    -

                    8. 管理数据

                    + +

                    11 管理数据

                    在内部数据表中记录数据对象的定义:

                    @@ -492,9 +503,12 @@

                    8. 管理数据

                    -

                    9. 数据文件

                    -

                    数据文件是外部数据,即:MyBox记录数据文件的定义、同时保持它的独立性。在MyBox读写数据文件之后,它仍然可以被其它方式正常读写。

                    -

                    9.1 CSV文件

                    + +

                    12 数据文件

                    +

                    数据文件是外部数据,即:MyBox记录数据文件的定义、同时保持它的独立性。

                    +

                    在MyBox读写数据文件之后,数据文件应当仍然可以被其它方式正常读写。

                    + +

                    12.1 CSV文件

                    在CSV文件中:

                    • 一般地,首行(头)定义列名,其余每行定义一行数据。
                    • @@ -508,7 +522,8 @@

                      9.1 CSV文件

                    • 当文件读取异常时,使用菜单“文件 - 格式”、改变选项并点击按钮“确定”。
                    • 数据可以保存为不同的字符集和换行符。
                    -

                    9.2 Excel文件

                    + +

                    12.2 Excel文件

                    在Excel文件中:

                    • 一般地,首行(头)定义列名,其余每行定义一行数据。
                    • @@ -520,7 +535,8 @@

                      9.2 Excel文件

                    • 数据可以只保存当前表单、或者保存全部表单。

                    注意:工具只能处理Excel文件的基本数据。如果文件包含格式、风格、公式、或图,建议把修改保存为新文件以免数据丢失。

                    -

                    9.3 文本文件

                    + +

                    12.3 文本文件

                    在文本文件中:

                    • 一般地,首行(头)定义列名,其余每行定义一行数据。
                    • @@ -535,6 +551,7 @@

                      9.3 文本文件

                    • 不支持数据值多行。
                    • 数据可以保存为不同的字符集和换行符。
                    +

                    更详细的说明见《用户手册-数据工具》


                    diff --git a/alpha/MyBox/src/main/resources/doc/zh/mybox_about_row_expression_zh.html b/alpha/MyBox/src/main/resources/doc/zh/mybox_about_row_expression_zh.html index 9cc843e0f..c1475428f 100644 --- a/alpha/MyBox/src/main/resources/doc/zh/mybox_about_row_expression_zh.html +++ b/alpha/MyBox/src/main/resources/doc/zh/mybox_about_row_expression_zh.html @@ -52,7 +52,7 @@

                    2 编辑行表达式

                  3. 若脚本为空,则返回空字符串。

                  4. 脚本可以包含Nashorn可以解析的任何合法元素(ECMAScript 5.1)。

                  5. 脚本应当最终是一个数值。

                  6. -
                  7. 脚本可以包含以下占位符:

                    +
                  8. 脚本可以包含以下占位符:(占位符相当于脚本的变量名)

                    #{表行号}
                    #{数据行号}
                    #{<列名>}
                    #{<列名>-<统计名>}

                  9. 左边显示所有合法的占位符。

                  10. @@ -63,9 +63,8 @@

                    2 编辑行表达式

                    3 计算行表达式

                    在MyBox计算表达式时:

                      -
                    1. 占位符被数据行的实际值替换。

                    2. +
                    3. 占位符被内部变量替换,然后内部变量被映射为每行中列的实际数据值。

                    4. 统计值是用所有数据来计算的。

                    5. -
                    6. ’#{xxx}’被处理为字符串而#{xxx}被处理为数字。

                    7. 当处理所有数据时,若脚本包含"#{表行号}"则它会失败。

                    4 行表达式的示例

                    @@ -90,15 +89,15 @@

                    4 行表达式的示例

                    数学计算 - ‘#{字段1}’.replace(/hello/ig, ‘Hello’) + #{字段1}.replace(/hello/ig,'Hello') 把列"字段1"的值中所有"hello"(忽略大小写)替换"Hello" - ‘#{字段1}’.toLowerCase() + #{字段1}.toLowerCase() 列"字段1"的值的小写 - ‘#{字段1}’.split(‘,’) + #{字段1}.split(',') 把列"字段1"的值按逗号分隔 @@ -106,8 +105,8 @@

                    4 行表达式的示例

                    列"字段1"的值与列"字段1"的平均值之间的差值 - new Date(‘#{时间}’.replace(/-/g,‘/’)).getFullYear() - 列"时间"的值的年份 + new Date(#{开始时间}.replace(/-/g,'/')).getFullYear() + 列"开始时间"的值的年份 @@ -150,23 +149,27 @@

                    3 行过滤的示例

                    列"字段1"与"字段2"的值差小于100 - ‘#{字段1}’ == '' - 列"字段1"的值为null或empty + #{字段1} == '' + 列"字段1"的值为empty - ‘#{字段1}’.length > 0 + #{字段1} != null + 列"字段1"的值不为null + + + #{字段1}.length > 0 列"字段1"的值不为空值 - ‘#{字段1}’.search(/Hello/ig) >= 0 + #{字段1}.search(/Hello/ig) >= 0 列"字段1"的值包含字符串"Hello"(忽略大小写) - ‘#{字段1}’.startsWith(‘Hello’) + #{字段1}.startsWith('Hello') 列"字段1"的值以"Hello"开头 - var array = [ ‘A’, ‘B’, ‘C’]; array.includes(‘#{字段1}’) + var array = [ 'A', 'B', 'C']; array.includes(#{字段1}) 列"字段1"的值为’A’或’B’或’C’ @@ -174,8 +177,8 @@

                    3 行过滤的示例

                    列"字段1"的值小于列"字段1"的平均值 - new Date(‘#{时间}’.replace(/-/g,‘/’)).getTime() > new Date(‘2016/05/19 09:23:12’).getTime() - 列"时间"的值晚于’2016/05/19 09:23:12’ + new Date(#{开始时间}.replace(/-/g,'/')).getTime() > new Date('2016/05/19 09:23:12').getTime() + 列"开始时间"的值晚于’2016/05/19 09:23:12’ diff --git a/alpha/MyBox/src/main/resources/fxml/ControlData2DSetValue.fxml b/alpha/MyBox/src/main/resources/fxml/ControlData2DSetValue.fxml index 91617d271..e983c561c 100644 --- a/alpha/MyBox/src/main/resources/fxml/ControlData2DSetValue.fxml +++ b/alpha/MyBox/src/main/resources/fxml/ControlData2DSetValue.fxml @@ -17,9 +17,9 @@ License: Apache License Version 2.0 - + - + @@ -36,12 +36,20 @@ License: Apache License Version 2.0 + + + + + + + + - - + + @@ -98,10 +106,10 @@ License: Apache License Version 2.0 - + - + diff --git a/alpha/MyBox/src/main/resources/fxml/ControlData2DView.fxml b/alpha/MyBox/src/main/resources/fxml/ControlData2DView.fxml index 1e9308900..32072d95f 100644 --- a/alpha/MyBox/src/main/resources/fxml/ControlData2DView.fxml +++ b/alpha/MyBox/src/main/resources/fxml/ControlData2DView.fxml @@ -23,6 +23,7 @@ License: Apache License Version 2.0 + @@ -112,6 +113,15 @@ License: Apache License Version 2.0 + @@ -202,10 +212,13 @@ License: Apache License Version 2.0 - + - + + + + diff --git a/alpha/MyBox/src/main/resources/fxml/ControlRemoteSynchronizeOptions.fxml b/alpha/MyBox/src/main/resources/fxml/ControlRemoteSynchronizeOptions.fxml index 032ebf439..87758ec0f 100644 --- a/alpha/MyBox/src/main/resources/fxml/ControlRemoteSynchronizeOptions.fxml +++ b/alpha/MyBox/src/main/resources/fxml/ControlRemoteSynchronizeOptions.fxml @@ -19,7 +19,7 @@ License: Apache License Version 2.0 - + @@ -100,7 +100,7 @@ License: Apache License Version 2.0 - + diff --git a/alpha/MyBox/src/main/resources/fxml/ControlSynchronizeOptions.fxml b/alpha/MyBox/src/main/resources/fxml/ControlSynchronizeOptions.fxml index 3785cfa9e..f88466bd0 100644 --- a/alpha/MyBox/src/main/resources/fxml/ControlSynchronizeOptions.fxml +++ b/alpha/MyBox/src/main/resources/fxml/ControlSynchronizeOptions.fxml @@ -19,7 +19,7 @@ License: Apache License Version 2.0 - + @@ -94,7 +94,7 @@ License: Apache License Version 2.0 - + diff --git a/alpha/MyBox/src/main/resources/fxml/Data2DDelete.fxml b/alpha/MyBox/src/main/resources/fxml/Data2DDelete.fxml index b9655599e..b244cb3d1 100644 --- a/alpha/MyBox/src/main/resources/fxml/Data2DDelete.fxml +++ b/alpha/MyBox/src/main/resources/fxml/Data2DDelete.fxml @@ -65,7 +65,7 @@ License: Apache License Version 2.0 - + diff --git a/alpha/MyBox/src/main/resources/fxml/Data2DManufacture.fxml b/alpha/MyBox/src/main/resources/fxml/Data2DManufacture.fxml index 268da4962..df678969d 100644 --- a/alpha/MyBox/src/main/resources/fxml/Data2DManufacture.fxml +++ b/alpha/MyBox/src/main/resources/fxml/Data2DManufacture.fxml @@ -24,6 +24,7 @@ License: Apache License Version 2.0 + @@ -361,6 +362,15 @@ License: Apache License Version 2.0 + + @@ -457,10 +467,13 @@ License: Apache License Version 2.0 - + - + + + + diff --git a/alpha/MyBox/src/main/resources/fxml/Data2DRowExpression.fxml b/alpha/MyBox/src/main/resources/fxml/Data2DRowExpression.fxml index 3195ddd21..ee0e1a547 100644 --- a/alpha/MyBox/src/main/resources/fxml/Data2DRowExpression.fxml +++ b/alpha/MyBox/src/main/resources/fxml/Data2DRowExpression.fxml @@ -99,7 +99,7 @@ License: Apache License Version 2.0 - + diff --git a/alpha/MyBox/src/main/resources/fxml/Data2DSetValues.fxml b/alpha/MyBox/src/main/resources/fxml/Data2DSetValues.fxml index ad9036135..f98012e62 100644 --- a/alpha/MyBox/src/main/resources/fxml/Data2DSetValues.fxml +++ b/alpha/MyBox/src/main/resources/fxml/Data2DSetValues.fxml @@ -106,7 +106,7 @@ License: Apache License Version 2.0 - + diff --git a/alpha/MyBox/src/main/resources/fxml/FileRename.fxml b/alpha/MyBox/src/main/resources/fxml/FileRename.fxml index 081df6d8d..344a6d414 100644 --- a/alpha/MyBox/src/main/resources/fxml/FileRename.fxml +++ b/alpha/MyBox/src/main/resources/fxml/FileRename.fxml @@ -6,21 +6,18 @@ License: Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 --> - - - - - - - - - - - - - + + + + + + + + + + - + @@ -36,14 +33,14 @@ License: Apache License Version 2.0 + - - + + - - - + + + + + - + + + - - + + - + + + - diff --git a/alpha/MyBox/src/main/resources/fxml/RemotePathDelete.fxml b/alpha/MyBox/src/main/resources/fxml/RemotePathDelete.fxml index 5cdbb5e95..04bfafa76 100644 --- a/alpha/MyBox/src/main/resources/fxml/RemotePathDelete.fxml +++ b/alpha/MyBox/src/main/resources/fxml/RemotePathDelete.fxml @@ -17,7 +17,7 @@ License: Apache License Version 2.0 - +