diff --git a/app/display/model/src/main/java/org/csstudio/display/builder/model/persist/NamedWidgetColors.java b/app/display/model/src/main/java/org/csstudio/display/builder/model/persist/NamedWidgetColors.java new file mode 100644 index 0000000000..6da2f7f96d --- /dev/null +++ b/app/display/model/src/main/java/org/csstudio/display/builder/model/persist/NamedWidgetColors.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2026 Oak Ridge National Laboratory. + * Copyright (c) 2026 Brookhaven National Laboratory. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.csstudio.display.builder.model.persist; + +/** Legacy compatibility wrapper for {@link org.phoebus.ui.color.NamedWidgetColors}. + * + *
Static constants ({@code TEXT}, {@code ALARM_MAJOR}, {@code BACKGROUND}, etc.) + * and static methods are inherited from the parent and remain accessible via this shim. + * + * @deprecated Use {@link org.phoebus.ui.color.NamedWidgetColors}. + */ +@Deprecated(since = "5.0.3") +public class NamedWidgetColors extends org.phoebus.ui.color.NamedWidgetColors +{ + // No additional members required. + // All public static constants (TEXT, ALARM_MAJOR, BACKGROUND, …) and + // public methods are inherited from org.phoebus.ui.color.NamedWidgetColors. +} + diff --git a/app/display/model/src/main/java/org/csstudio/display/builder/model/persist/WidgetColorService.java b/app/display/model/src/main/java/org/csstudio/display/builder/model/persist/WidgetColorService.java new file mode 100644 index 0000000000..48c68b91cc --- /dev/null +++ b/app/display/model/src/main/java/org/csstudio/display/builder/model/persist/WidgetColorService.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2026 Oak Ridge National Laboratory. + * Copyright (c) 2026 Brookhaven National Laboratory. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.csstudio.display.builder.model.persist; + +/** Legacy compatibility wrapper for {@link org.phoebus.ui.color.WidgetColorService}. + * + *
Static methods ({@code getColor()}, {@code getColors()}, {@code resolve()},
+ * {@code loadColors()}) are inherited from the parent and remain accessible via this shim.
+ *
+ * @deprecated Use {@link org.phoebus.ui.color.WidgetColorService}.
+ */
+@Deprecated(since = "5.0.3")
+public class WidgetColorService extends org.phoebus.ui.color.WidgetColorService
+{
+ // No additional members required.
+ // All public static methods (getColor, getColors, resolve, loadColors)
+ // are inherited from org.phoebus.ui.color.WidgetColorService.
+}
+
diff --git a/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/NamedWidgetColor.java b/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/NamedWidgetColor.java
new file mode 100644
index 0000000000..c02aee8ab9
--- /dev/null
+++ b/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/NamedWidgetColor.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2026 Oak Ridge National Laboratory.
+ * Copyright (c) 2026 Brookhaven National Laboratory.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.csstudio.display.builder.model.properties;
+
+import static org.csstudio.display.builder.model.ModelPlugin.logger;
+
+/** Legacy compatibility wrapper for {@link org.phoebus.ui.color.NamedWidgetColor}.
+ *
+ * @deprecated Use {@link org.phoebus.ui.color.NamedWidgetColor}.
+ */
+@Deprecated(since = "5.0.3")
+public class NamedWidgetColor extends org.phoebus.ui.color.NamedWidgetColor
+{
+ /** Construct named RGB color.
+ * @param name Name of the color
+ * @param red Red component, range {@code 0-255}
+ * @param green Green component, range {@code 0-255}
+ * @param blue Blue component, range {@code 0-255}
+ */
+ public NamedWidgetColor(final String name, final int red, final int green, final int blue)
+ {
+ super(name, red, green, blue);
+ logger.warning("Deprecated wrapper in use: org.csstudio.display.builder.model.properties.NamedWidgetColor. " +
+ "Use org.phoebus.ui.color.NamedWidgetColor.");
+ }
+
+ /** Construct named RGBA color.
+ * @param name Name of the color
+ * @param red Red component, range {@code 0-255}
+ * @param green Green component, range {@code 0-255}
+ * @param blue Blue component, range {@code 0-255}
+ * @param alpha Alpha component, range {@code 0} (transparent) to {@code 255} (opaque)
+ */
+ public NamedWidgetColor(final String name, final int red, final int green, final int blue, final int alpha)
+ {
+ super(name, red, green, blue, alpha);
+ logger.warning("Deprecated wrapper in use: org.csstudio.display.builder.model.properties.NamedWidgetColor. " +
+ "Use org.phoebus.ui.color.NamedWidgetColor.");
+ }
+}
+
diff --git a/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/WidgetColor.java b/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/WidgetColor.java
new file mode 100644
index 0000000000..04f810726e
--- /dev/null
+++ b/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/WidgetColor.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2026 Oak Ridge National Laboratory.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.csstudio.display.builder.model.properties;
+
+import static org.csstudio.display.builder.model.ModelPlugin.logger;
+
+/** Legacy compatibility wrapper for {@link org.phoebus.ui.color.WidgetColor}.
+ *
+ * @deprecated Use {@link org.phoebus.ui.color.WidgetColor}.
+ */
+@Deprecated(since = "5.0.3")
+public class WidgetColor extends org.phoebus.ui.color.WidgetColor
+{
+ /** Construct RGB color.
+ * @param red Red component, range {@code 0-255}
+ * @param green Green component, range {@code 0-255}
+ * @param blue Blue component, range {@code 0-255}
+ */
+ public WidgetColor(final int red, final int green, final int blue)
+ {
+ super(red, green, blue);
+ logger.warning("Deprecated wrapper in use: org.csstudio.display.builder.model.properties.WidgetColor. " +
+ "Use org.phoebus.ui.color.WidgetColor.");
+ }
+
+ /** Construct RGBA color.
+ * @param red Red component, range {@code 0-255}
+ * @param green Green component, range {@code 0-255}
+ * @param blue Blue component, range {@code 0-255}
+ * @param alpha Alpha component, range {@code 0} (transparent) to {@code 255} (opaque)
+ */
+ public WidgetColor(final int red, final int green, final int blue, final int alpha)
+ {
+ super(red, green, blue, alpha);
+ logger.warning("Deprecated wrapper in use: org.csstudio.display.builder.model.properties.WidgetColor. " +
+ "Use org.phoebus.ui.color.WidgetColor.");
+ }
+}
+
+
+
diff --git a/app/display/model/src/main/resources/examples/conway/life_ui.py b/app/display/model/src/main/resources/examples/conway/life_ui.py
index d4272d54b5..ff679a38d4 100644
--- a/app/display/model/src/main/resources/examples/conway/life_ui.py
+++ b/app/display/model/src/main/resources/examples/conway/life_ui.py
@@ -12,7 +12,7 @@
"""
from org.csstudio.display.builder.runtime.script import ScriptUtil, PVUtil
from org.csstudio.display.builder.model import WidgetFactory
-from org.csstudio.display.builder.model.properties import WidgetColor
+from org.phoebus.ui.color import WidgetColor
from time import time, sleep
from life import GameOfLife
diff --git a/app/display/model/src/main/resources/examples/fishtank/scripts/Analyze.py b/app/display/model/src/main/resources/examples/fishtank/scripts/Analyze.py
index f2df47e031..53f186cae2 100644
--- a/app/display/model/src/main/resources/examples/fishtank/scripts/Analyze.py
+++ b/app/display/model/src/main/resources/examples/fishtank/scripts/Analyze.py
@@ -1,5 +1,5 @@
from org.csstudio.display.builder.runtime.script import PVUtil
-from org.csstudio.display.builder.model.properties import WidgetColor
+from org.phoebus.ui.color import WidgetColor
pid_out = PVUtil.getDouble(pvs[0])
sine = PVUtil.getDouble(pvs[1])
diff --git a/app/display/model/src/main/resources/examples/mondrian/mondrian.bob b/app/display/model/src/main/resources/examples/mondrian/mondrian.bob
index 6178d701fa..4cac9f9e45 100644
--- a/app/display/model/src/main/resources/examples/mondrian/mondrian.bob
+++ b/app/display/model/src/main/resources/examples/mondrian/mondrian.bob
@@ -8,7 +8,7 @@