-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
260 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
76 changes: 38 additions & 38 deletions
76
...ain/java/io/github/mmm/ui/demo/shared/place/content/binding/editor/BindingEditorView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |
Oops, something went wrong.