Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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}.
*
* <p>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

Check warning on line 19 in app/display/model/src/main/java/org/csstudio/display/builder/model/persist/NamedWidgetColors.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2RbbR7EBbnWdywjCsR&open=AZ2RbbR7EBbnWdywjCsR&pullRequest=3777

Check failure on line 19 in app/display/model/src/main/java/org/csstudio/display/builder/model/persist/NamedWidgetColors.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this class.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2RbbR7EBbnWdywjCsS&open=AZ2RbbR7EBbnWdywjCsS&pullRequest=3777
{
// No additional members required.
// All public static constants (TEXT, ALARM_MAJOR, BACKGROUND, …) and
// public methods are inherited from org.phoebus.ui.color.NamedWidgetColors.
}

Original file line number Diff line number Diff line change
@@ -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}.
*
* <p>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

Check failure on line 19 in app/display/model/src/main/java/org/csstudio/display/builder/model/persist/WidgetColorService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this class.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2RbbRwEBbnWdywjCsQ&open=AZ2RbbRwEBbnWdywjCsQ&pullRequest=3777

Check warning on line 19 in app/display/model/src/main/java/org/csstudio/display/builder/model/persist/WidgetColorService.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2RbbRwEBbnWdywjCsP&open=AZ2RbbRwEBbnWdywjCsP&pullRequest=3777
{
// No additional members required.
// All public static methods (getColor, getColors, resolve, loadColors)
// are inherited from org.phoebus.ui.color.WidgetColorService.
}

Original file line number Diff line number Diff line change
@@ -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

Check failure on line 18 in app/display/model/src/main/java/org/csstudio/display/builder/model/properties/NamedWidgetColor.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this class.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2RbbNREBbnWdywjCsO&open=AZ2RbbNREBbnWdywjCsO&pullRequest=3777

Check warning on line 18 in app/display/model/src/main/java/org/csstudio/display/builder/model/properties/NamedWidgetColor.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2RbbNREBbnWdywjCsN&open=AZ2RbbNREBbnWdywjCsN&pullRequest=3777
{
/** 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.");
}
}

Original file line number Diff line number Diff line change
@@ -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

Check warning on line 17 in app/display/model/src/main/java/org/csstudio/display/builder/model/properties/WidgetColor.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2Nvmeu8vXIT0bFZtJA&open=AZ2Nvmeu8vXIT0bFZtJA&pullRequest=3777

Check failure on line 17 in app/display/model/src/main/java/org/csstudio/display/builder/model/properties/WidgetColor.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this class.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ2Nvmeu8vXIT0bFZtJB&open=AZ2Nvmeu8vXIT0bFZtJB&pullRequest=3777
{
/** 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.");
}
}



Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<text><![CDATA[# Embedded python script
from random import random, randint
from org.csstudio.display.builder.model import WidgetFactory
from org.csstudio.display.builder.model.properties import WidgetColor
from org.phoebus.ui.color import WidgetColor

display = widget.getDisplayModel()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ and writing the result back to the table.</text>
<text><![CDATA[# Example for updating individual cell colors

from org.csstudio.display.builder.runtime.script import ScriptUtil
from org.csstudio.display.builder.model.properties import WidgetColor
from org.phoebus.ui.color import WidgetColor
from java.lang import Math

# 'widget' is the action button that invoked the script
Expand Down Expand Up @@ -389,7 +389,7 @@ table.setCellValue(1, 0, "Thingy")
<text><![CDATA[# This example sets a complete table of colors

from org.csstudio.display.builder.runtime.script import ScriptUtil
from org.csstudio.display.builder.model.properties import WidgetColor
from org.phoebus.ui.color import WidgetColor
from java.lang import Math
from java.util import ArrayList

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def solve():
# ------------ Visualization via display model -------

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

TOP = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def calcPVIndex(row, col):
def calcBlockRange(val):
return range(val-val%3, val-val%3+3)

from org.csstudio.display.builder.model.persist import WidgetColorService
from org.csstudio.display.builder.model.properties import WidgetColor
from org.csstudio.display.builder.model.persist import NamedWidgetColors
from org.phoebus.ui.color import WidgetColor
from org.phoebus.ui.color import WidgetColorService
from org.phoebus.ui.color import NamedWidgetColors

display = widget.getDisplayModel()
text = WidgetColorService.getColor(NamedWidgetColors.TEXT)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil
from org.phoebus.ui.color import WidgetColorService

def findConflicts(row, col, value):
conflicts = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from org.csstudio.display.builder.runtime.script import PVUtil
from java import lang
from org.csstudio.display.builder.model.properties import WidgetColor
from org.phoebus.ui.color import WidgetColor


try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from org.csstudio.display.builder.runtime.script import PVUtil
from java import lang
from org.csstudio.display.builder.model.properties import WidgetColor
from org.phoebus.ui.color import WidgetColor


try:
Expand Down
Loading