diff --git a/lib/ant/swttable/swttable-0.0.1.jar b/lib/ant/swttable/swttable-0.0.1.jar index e18c72d538..7b48cc166e 100644 Binary files a/lib/ant/swttable/swttable-0.0.1.jar and b/lib/ant/swttable/swttable-0.0.1.jar differ diff --git a/lib/ant/swttiles/swttiles-0.0.1.jar b/lib/ant/swttiles/swttiles-0.0.1.jar index 16775796bb..71ab916ef8 100644 Binary files a/lib/ant/swttiles/swttiles-0.0.1.jar and b/lib/ant/swttiles/swttiles-0.0.1.jar differ diff --git a/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar b/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar index e18c72d538..7b48cc166e 100644 Binary files a/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar and b/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar differ diff --git a/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.md5 b/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.md5 index d4f1ba23ae..452660a89b 100644 --- a/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.md5 +++ b/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.md5 @@ -1 +1 @@ -a7d2184dbe46824b1ae322486f1b91fd \ No newline at end of file +63e94f1807cc947953211fea02c9667f \ No newline at end of file diff --git a/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.sha1 b/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.sha1 index 2fa220b0ed..f852a52c0a 100644 --- a/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.sha1 +++ b/lib/de/linearbits/swt/swttable/0.0.1/swttable-0.0.1.jar.sha1 @@ -1 +1 @@ -ae9dc157cbd84ca87427768530ca07ba6cd58f1e \ No newline at end of file +e3e14f7cf86d0ce3002b3eaa91e246e6bd89de36 \ No newline at end of file diff --git a/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar b/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar index 16775796bb..71ab916ef8 100644 Binary files a/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar and b/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar differ diff --git a/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.md5 b/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.md5 index 1754020cd6..3de18c9d46 100644 --- a/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.md5 +++ b/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.md5 @@ -1 +1 @@ -5b7bd2040a10c79a99ff473ab4da2359 \ No newline at end of file +db35dca953993a1123b5cf861692deb5 \ No newline at end of file diff --git a/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.sha1 b/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.sha1 index 3287c4b0c9..2b762cf065 100644 --- a/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.sha1 +++ b/lib/de/linearbits/swt/swttiles/0.0.1/swttiles-0.0.1.jar.sha1 @@ -1 +1 @@ -786dd231ed5692dcc92180efe838f64e3698663f \ No newline at end of file +95cb1059ef69d3159c9cbdd461cf65e22e1a0f87 \ No newline at end of file diff --git a/pom.xml b/pom.xml index cd75710d79..e5b6c10602 100644 --- a/pom.xml +++ b/pom.xml @@ -286,7 +286,7 @@ mysql mysql-connector-java - 5.1.38 + 8.0.16 * diff --git a/src/gui/org/deidentifier/arx/gui/view/impl/MainToolBar.java b/src/gui/org/deidentifier/arx/gui/view/impl/MainToolBar.java index 4855cd656c..20cfc0c294 100644 --- a/src/gui/org/deidentifier/arx/gui/view/impl/MainToolBar.java +++ b/src/gui/org/deidentifier/arx/gui/view/impl/MainToolBar.java @@ -160,13 +160,11 @@ public void update(final ModelEvent event) { if (model.getSelectedNode() != null) { toolbar.setRedraw(false); labelSelected.setText(Resources.getMessage("MainToolBar.3") + //$NON-NLS-1$ - Arrays.toString(model.getSelectedNode().getTransformation())); - labelSelected.pack(); + Arrays.toString(model.getSelectedNode().getTransformation())); layout(); toolbar.setRedraw(true); } } else if (event.part == ModelPart.OUTPUT) { - if (model.getOutputTransformation() != null) { // Statistics @@ -179,24 +177,15 @@ public void update(final ModelEvent event) { toolbar.setRedraw(false); labelTransformations.setText(Resources.getMessage("MainToolBar.6") + //$NON-NLS-1$ SWTUtil.getPrettyString(statistics.getTransformationsAvailable())); - labelTransformations.pack(); - labelApplied.setText(Resources.getMessage("MainToolBar.4") + //$NON-NLS-1$ Arrays.toString(model.getOutputTransformation().getTransformation())); - labelApplied.pack(); - - // Layout layout(); - toolbar.setRedraw(true); } else { - reset(); - } } else if (event.part == ModelPart.RESULT) { - if (model.getResult() != null) { // Statistics @@ -209,33 +198,22 @@ public void update(final ModelEvent event) { toolbar.setRedraw(false); labelTransformations.setText(Resources.getMessage("MainToolBar.6") + //$NON-NLS-1$ SWTUtil.getPrettyString(statistics.getTransformationsAvailable())); - labelTransformations.pack(); - labelSelected.setText(Resources.getMessage("MainToolBar.7")); //$NON-NLS-1$ - labelSelected.pack(); - labelApplied.setText(Resources.getMessage("MainToolBar.8")); //$NON-NLS-1$ - labelApplied.pack(); - layout(); - toolbar.setRedraw(true); } - } else if (event.part == ModelPart.SELECTED_ATTRIBUTE) { // Update label String attribute = (String)event.data; toolbar.setRedraw(false); labelAttribute.setText(Resources.getMessage("MainToolBar.50") + trim(attribute)); //$NON-NLS-1$ - labelAttribute.pack(); layout(); toolbar.setRedraw(true); } else if (event.part == ModelPart.MODEL) { - model = (Model) event.data; - } } @@ -298,6 +276,9 @@ public void widgetSelected(final SelectionEvent e) { } } + /** + * Creates the required labels + */ private void createLabels() { // Add status labels @@ -348,12 +329,23 @@ public void controlResized(final ControlEvent arg0) { } /** - * Performs layouting. + * Performs a layout update */ private void layout() { // Disable redrawing toolbar.setRedraw(false); + + // Fix rendering issues on MacOS Catalina + // This seems to enforce an otherwise lost redraw + labelAttribute.setText(labelAttribute.getText()); + labelTransformations.setText(labelTransformations.getText()); + labelApplied.setText(labelApplied.getText()); + labelSelected.setText(labelSelected.getText()); + labelAttribute.pack(); + labelTransformations.pack(); + labelApplied.pack(); + labelSelected.pack(); // Adjust size of items and composite Rectangle bounds = toolbar.getBounds(); @@ -393,6 +385,11 @@ private void layout() { // Redraw toolbar.setRedraw(true); + toolbar.redraw(); + + // Fix rendering issues on MacOS Catalina + // This seems to enforce an otherwise lost redraw + infoComposite.pack(true); } /** diff --git a/src/gui/org/deidentifier/arx/gui/view/impl/define/ViewAttributeList.java b/src/gui/org/deidentifier/arx/gui/view/impl/define/ViewAttributeList.java index a0670df5d7..c286f626c7 100644 --- a/src/gui/org/deidentifier/arx/gui/view/impl/define/ViewAttributeList.java +++ b/src/gui/org/deidentifier/arx/gui/view/impl/define/ViewAttributeList.java @@ -142,7 +142,7 @@ public void dispose() { public void reset() { this.attributes = null; this.table.setCurrentPage(0); - this.table.refreshPage(); + this.refreshTable(); SWTUtil.disable(this.table); } @@ -159,11 +159,11 @@ public void update(final ModelEvent event) { } else if (event.part == ModelPart.ATTRIBUTE_TYPE || event.part == ModelPart.ATTRIBUTE_TYPE_BULK_UPDATE) { if (!attributes.isEmpty()) { - table.refreshPage(); + this.refreshTable(); } } else if (event.part == ModelPart.DATA_TYPE) { if (!attributes.isEmpty()) { - table.refreshPage(); + this.refreshTable(); } } } @@ -243,7 +243,7 @@ private void actionDataTypeChanged(String label) { // Set and update if (changed) { this.model.getInputDefinition().setDataType(attribute, type); - table.refreshPage(); + this.refreshTable(); this.controller.update(new ModelEvent(this, ModelPart.DATA_TYPE, attribute)); } } @@ -375,7 +375,7 @@ else if (i == 3 && e.button == 1) { String attribute = (String)item.getData(); boolean isResponseVariable = !model.getInputDefinition().isResponseVariable(attribute); model.getInputDefinition().setResponseVariable(attribute, isResponseVariable); - table.refreshPage(); + refreshTable(); controller.update(new ModelEvent(this, ModelPart.RESPONSE_VARIABLES, attribute)); return; } @@ -386,7 +386,7 @@ else if (i == 3 && e.button == 1) { } }); this.table.setCurrentPage(0); - this.table.refreshPage(); + this.refreshTable(); } /** @@ -542,6 +542,14 @@ private boolean isValidDataType(DataType type, Collection values) { return true; } + /** + * Refresh the table + */ + private void refreshTable() { + this.table.getViewer().refresh(); + this.table.refreshPage(); + } + /** * Updates the view. * @@ -564,10 +572,10 @@ private void updateEntries() { // Refresh this.table.setCurrentPage(0); - this.table.refreshPage(); + this.refreshTable(); SWTUtil.enable(this.table); } - + /** * Update * @param attribute