You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2020/06/22 07:31:59 UTC
[isis] branch master updated: ISIS-2342 Overlay scale button [+|-]
onto SVG, analogous to OSM map. Copyright added, minor code polishing.
This is an automated email from the ASF dual-hosted git repository.
joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 4c0f530 ISIS-2342 Overlay scale button [+|-] onto SVG, analogous to OSM map. Copyright added, minor code polishing.
4c0f530 is described below
commit 4c0f5304df6a6c493cffb12551859111d97ef8a6
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Mon Jun 22 09:31:27 2020 +0200
ISIS-2342 Overlay scale button [+|-] onto SVG, analogous to OSM map.
Copyright added, minor code polishing.
---
.../org/apache/isis/client/kroviz/ui/FormItem.kt | 34 +++++++++++++---------
.../apache/isis/client/kroviz/ui/ImageDialog.kt | 18 ++++++++++++
.../apache/isis/client/kroviz/ui/PumlBuilder.kt | 6 ++--
.../isis/client/kroviz/ui/kv/FormPanelFactory.kt | 18 ++++++++++++
.../apache/isis/client/kroviz/ui/kv/RoDialog.kt | 20 ++++++++++++-
.../client/kroviz/utils/ScalableVectorGraphic.kt | 18 ++++++++++++
6 files changed, 97 insertions(+), 17 deletions(-)
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/FormItem.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/FormItem.kt
index 2ba3ed6..82f35e1 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/FormItem.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/FormItem.kt
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.isis.client.kroviz.ui
import org.apache.isis.client.kroviz.to.Member
@@ -16,27 +34,17 @@ class FormItem(
var readOnly = false
init {
- if (member != null) {
- readOnly = member.isReadOnly()
- }
+ if (member != null) readOnly = member.isReadOnly()
}
fun changed(value: String?) {
dspl?.setDirty(true)
- if (member != null) {
- member.value?.content = value
- }
+ if (member != null) member.value?.content = value
}
fun reset() {
dspl?.setDirty(false)
- if (member != null) {
- content = originalContent
- }
- }
-
- fun setDisplay(displayable: Displayable) {
- dspl = displayable
+ if (member != null) content = originalContent
}
}
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/ImageDialog.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/ImageDialog.kt
index e9bc31b..87c82c5 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/ImageDialog.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/ImageDialog.kt
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.isis.client.kroviz.ui
import org.apache.isis.client.kroviz.to.ValueType
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilder.kt
index 2b2113e..fcb10b1 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilder.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilder.kt
@@ -74,10 +74,10 @@ class PumlBuilder {
"class $cls$NL"
domainType.members.forEach { m ->
val memberName = m.name()
- when {
- m.isProperty() -> pumlCode += "$cls : $memberName$NL"
+ pumlCode += when {
+ m.isProperty() -> "$cls : $memberName$NL"
else -> {
- pumlCode += "$cls : $memberName()$NL"
+ "$cls : $memberName()$NL"
}
}
}
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt
index d04df81..4e5a263 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.isis.client.kroviz.ui.kv
import org.apache.isis.client.kroviz.to.ValueType
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt
index 1ea6181..087de98 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.isis.client.kroviz.ui.kv
import org.apache.isis.client.kroviz.to.ValueType
@@ -100,7 +118,7 @@ class RoDialog(
fun open(at: Point = Point(100, 100)): Widget {
left = CssSize(at.x, UNIT.px)
- top = CssSize(at.x, UNIT.px)
+ top = CssSize(at.y, UNIT.px)
UiManager.openDialog(this)
super.show()
okButton.focus()
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/ScalableVectorGraphic.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/ScalableVectorGraphic.kt
index 7be6484..c22ef59 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/ScalableVectorGraphic.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/utils/ScalableVectorGraphic.kt
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.isis.client.kroviz.utils
import org.w3c.dom.Document