forked from eclipse-sirius/sirius-web
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: eclipse-sirius#2077 Signed-off-by: Florian Rouëné <florian.rouene@obeosoft.com>
- Loading branch information
Showing
56 changed files
with
3,719 additions
and
238 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
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
2 changes: 1 addition & 1 deletion
2
...g/eclipse/sirius/components/compatibility/emf/properties/NumberIfDescriptionProvider.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
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
22 changes: 22 additions & 0 deletions
22
...nts-forms/src/main/java/org/eclipse/sirius/components/forms/ContainerBorderLineStyle.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Obeo. | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Obeo - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.sirius.components.forms; | ||
|
||
/** | ||
* Line style possibility for the border of a container. | ||
* | ||
* @author frouene | ||
*/ | ||
public enum ContainerBorderLineStyle { | ||
Solid, Dashed, Dotted | ||
} |
112 changes: 112 additions & 0 deletions
112
...ponents-forms/src/main/java/org/eclipse/sirius/components/forms/ContainerBorderStyle.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 |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Obeo. | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Obeo - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.sirius.components.forms; | ||
|
||
import java.util.Objects; | ||
|
||
import org.eclipse.sirius.components.annotations.Immutable; | ||
|
||
/** | ||
* The style of the borders for a container. | ||
* | ||
* @author frouene | ||
*/ | ||
@Immutable | ||
public final class ContainerBorderStyle { | ||
|
||
private String color; | ||
|
||
private int radius; | ||
|
||
private int size; | ||
|
||
private ContainerBorderLineStyle lineStyle; | ||
|
||
private ContainerBorderStyle() { | ||
// Prevent instantiation | ||
} | ||
|
||
public static Builder newCheckboxStyle() { | ||
return new Builder(); | ||
} | ||
|
||
public String getColor() { | ||
return this.color; | ||
} | ||
|
||
public int getRadius() { | ||
return this.radius; | ||
} | ||
|
||
public int getSize() { | ||
return this.size; | ||
} | ||
|
||
public ContainerBorderLineStyle getLineStyle() { | ||
return this.lineStyle; | ||
} | ||
|
||
public static Builder newContainerBorderStyle() { | ||
return new Builder(); | ||
} | ||
|
||
/** | ||
* Builder used to create the Container border style. | ||
* | ||
* @author frouene | ||
*/ | ||
@SuppressWarnings("checkstyle:HiddenField") | ||
public static final class Builder { | ||
|
||
private String color; | ||
|
||
private int radius; | ||
|
||
private int size; | ||
|
||
private ContainerBorderLineStyle lineStyle; | ||
|
||
private Builder() { | ||
} | ||
|
||
public Builder color(String color) { | ||
this.color = Objects.requireNonNull(color); | ||
return this; | ||
} | ||
|
||
public Builder radius(int radius) { | ||
this.radius = radius; | ||
return this; | ||
} | ||
|
||
public Builder size(int size) { | ||
this.size = size; | ||
return this; | ||
} | ||
|
||
public Builder lineStyle(ContainerBorderLineStyle lineStyle) { | ||
this.lineStyle = Objects.requireNonNull(lineStyle); | ||
return this; | ||
} | ||
|
||
public ContainerBorderStyle build() { | ||
ContainerBorderStyle borderStyle = new ContainerBorderStyle(); | ||
borderStyle.color = this.color; // Optional on purpose | ||
borderStyle.radius = Objects.requireNonNull(this.radius); | ||
borderStyle.size = Objects.requireNonNull(this.size); | ||
borderStyle.lineStyle = Objects.requireNonNull(this.lineStyle); | ||
return borderStyle; | ||
} | ||
|
||
} | ||
} |
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
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
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
Oops, something went wrong.