Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Apr 11, 2024
1 parent ccdb1f2 commit 7c6594b
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 256 deletions.
51 changes: 28 additions & 23 deletions fx/pom.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.m-m-m</groupId>
<artifactId>mmm-ui-demo</artifactId>
<version>${revision}</version>
</parent>

<artifactId>mmm-ui-demo-fx</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mmm-ui-demo-shared</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mmm-ui-fx-all</artifactId>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.m-m-m</groupId>
<artifactId>mmm-ui-demo</artifactId>
<version>${revision}</version>
</parent>

<artifactId>mmm-ui-demo-fx</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mmm-ui-demo-shared</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mmm-ui-fx-all</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
</dependencies>
</project>
161 changes: 82 additions & 79 deletions fx/src/main/resources/css/site.css
Original file line number Diff line number Diff line change
@@ -1,79 +1,82 @@
* {
-ui-border-radius: 5px;
}
.root {
-fx-font-family: "Arial";
}
.text {
-fx-font-smoothing-type: gray;
}
*:invalid {
-fx-border-color: red;
}
.ui-validation-failure {
-fx-shape: "M 25 17 L 0 17 L 0 0 L 4 0 L 7 -5 L 11 0 L 25 0 L 25 17 Z";
-fx-border-color: red;
-fx-background-color: #FF2020A0;
-fx-wrap-text: true;
}
.label.mandatory {
-fx-font-weight: bold;
}
.ui-buttons {
-fx-alignment: center;
-fx-padding: 0.5em;
-fx-spacing: 1em;
}
.ui-button {
-fx-min-width: 10em;
}
.ui-inputcontainer {
-fx-padding: 0 0 0.5em 0;
}
.ui-form > .ui-inputcontainer {
-fx-padding: 0.25em 1em 0.25em 1em;
}
.ui-inputcontainer .slider {
-fx-padding: 0 1em 0 1em;
}
.ui-suffix {
-fx-background-color: #dddddd;
-fx-border-color: grey;
-fx-padding: 4;
-fx-border-radius: 0 5 5 0;
-fx-background-radius: 0 5 5 0;
}
.ui-prefix {
-fx-background-color: #dddddd;
-fx-border-color: grey;
-fx-padding: 4;
-fx-border-radius: 5 0 0 5;
-fx-background-radius: 5 0 0 5;
}
.with-prefix {
-fx-border-radius: 0 5 5 0;
-fx-background-radius: 0 5 5 0;
}
.with-suffix {
-fx-border-radius: 5 0 0 5;
-fx-background-radius: 5 0 0 5;
}
.with-prefix.with-suffix {
-fx-border-radius: 0;
-fx-background-radius: 0;
}
.ui-media-controls {
-fx-spacing: 0.5em;
-fx-padding: 0.5em 0.5em 0.5em 0.25em;
}
.grid-borders {
-fx-background-color: black, white;
-fx-padding: 10;
-fx-vgap: 1;
-fx-hgap: 1;
}
.grid-borders > * {
-fx-background-color: black, white;
-fx-border-color: dimgray;
-fx-background-insets: 0, 1;
}
* {
-ui-border-radius: 5px;
}
.root {
-fx-font-family: "Arial";
}
.text {
-fx-font-smoothing-type: gray;
}
*:invalid {
-fx-border-color: red;
}
.ui-validation-failure {
-fx-shape: "M 25 17 L 0 17 L 0 0 L 4 0 L 7 -5 L 11 0 L 25 0 L 25 17 Z";
-fx-border-color: red;
-fx-background-color: #FF2020A0;
-fx-wrap-text: true;
}
.label.mandatory {
-fx-font-weight: bold;
}
.ui-buttons {
-fx-alignment: center;
-fx-padding: 0.5em;
-fx-spacing: 1em;
}
.ui-button {
-fx-min-width: 10em;
}
.ui-inputcontainer {
-fx-padding: 0 0 0.5em 0;
}
.ui-form > .ui-inputcontainer {
-fx-padding: 0.25em 1em 0.25em 1em;
}
.ui-inputcontainer .slider {
-fx-padding: 0 1em 0 1em;
}
.ui-suffix {
-fx-background-color: #dddddd;
-fx-border-color: grey;
-fx-padding: 4;
-fx-border-radius: 0 5 5 0;
-fx-background-radius: 0 5 5 0;
}
.ui-prefix {
-fx-background-color: #dddddd;
-fx-border-color: grey;
-fx-padding: 4;
-fx-border-radius: 5 0 0 5;
-fx-background-radius: 5 0 0 5;
}
.spinner.ui-input .text-field {
-fx-padding: 5;
}
.with-prefix {
-fx-border-radius: 0 5 5 0;
-fx-background-radius: 0 5 5 0;
}
.with-suffix {
-fx-border-radius: 5 0 0 5;
-fx-background-radius: 5 0 0 5;
}
.with-prefix.with-suffix {
-fx-border-radius: 0;
-fx-background-radius: 0;
}
.ui-media-controls {
-fx-spacing: 0.5em;
-fx-padding: 0.5em 0.5em 0.5em 0.25em;
}
.grid-borders {
-fx-background-color: black, white;
-fx-padding: 10;
-fx-vgap: 1;
-fx-hgap: 1;
}
.grid-borders > * {
-fx-background-color: black, white;
-fx-border-color: dimgray;
-fx-background-insets: 0, 1;
}
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.ui.demo.shared.place.content.binding.editor;

import io.github.mmm.ui.api.widget.panel.UiCustomVerticalPanel;

/**
* View of {@link BindingEditorController}.
*/
public class BindingEditorView extends UiCustomVerticalPanel {

private final JsonEditor jsonEditor;

private final PersonEditor personEditor;

/**
* The constructor.
*/
public BindingEditorView() {

super();
this.jsonEditor = new JsonEditor(this::updatePerson);
addChild(this.jsonEditor);
this.personEditor = new PersonEditor(this::updateJson);
addChild(this.personEditor);
}

private void updateJson(Person person) {

this.jsonEditor.setValue(person);
}

private void updatePerson(Person person) {

this.personEditor.setValue(person);
}

}
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.ui.demo.shared.place.content.binding.editor;

import io.github.mmm.ui.api.widget.panel.UiCustomVerticalPanel;

/**
* View of {@link BindingEditorController}.
*/
public class BindingEditorView extends UiCustomVerticalPanel {

private final JsonEditor jsonEditor;

private final PersonEditor personEditor;

/**
* The constructor.
*/
public BindingEditorView() {

super();
this.jsonEditor = new JsonEditor(this::updatePerson);
addChild(this.jsonEditor);
this.personEditor = new PersonEditor(this::updateJson);
addChild(this.personEditor);
}

private void updateJson(Person person) {

this.jsonEditor.setValue(person);
}

private void updatePerson(Person person) {

this.personEditor.setValue(person);
}

}
Loading

0 comments on commit 7c6594b

Please sign in to comment.