Search in sources :

Example 21 with WidgetColor

use of org.csstudio.display.builder.model.properties.WidgetColor in project org.csstudio.display.builder by kasemir.

the class LEDWidget method defineProperties.

@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
    super.defineProperties(properties);
    properties.add(bit = propBit.createProperty(this, -1));
    properties.add(off_label = propOffLabel.createProperty(this, ""));
    properties.add(off_color = propOffColor.createProperty(this, new WidgetColor(60, 100, 60)));
    properties.add(on_label = propOnLabel.createProperty(this, ""));
    properties.add(on_color = propOnColor.createProperty(this, new WidgetColor(60, 255, 60)));
    properties.add(font = propFont.createProperty(this, WidgetFontService.get(NamedWidgetFonts.DEFAULT)));
    properties.add(foreground = propForegroundColor.createProperty(this, WidgetColorService.getColor(NamedWidgetColors.TEXT)));
    properties.add(square = propSquare.createProperty(this, false));
    // Ideally, widgets should fetch their information from a PV,
    // but the LED does not allow much room for text,
    // so the default text from the PV is likely too large..
    properties.add(labels_from_pv = propLabelsFromPV.createProperty(this, false));
}
Also used : WidgetColor(org.csstudio.display.builder.model.properties.WidgetColor)

Example 22 with WidgetColor

use of org.csstudio.display.builder.model.properties.WidgetColor in project org.csstudio.display.builder by kasemir.

the class LinearMeterWidget method defineProperties.

@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
    super.defineProperties(properties);
    properties.add(orientation = propOrientation.createProperty(this, Orientation.HORIZONTAL));
    properties.add(bar_color = propBarColor.createProperty(this, new WidgetColor(0, 183, 0)));
    properties.add(flat_bar = propFlatBar.createProperty(this, false));
}
Also used : WidgetColor(org.csstudio.display.builder.model.properties.WidgetColor)

Example 23 with WidgetColor

use of org.csstudio.display.builder.model.properties.WidgetColor in project org.csstudio.display.builder by kasemir.

the class PolygonWidget method defineProperties.

@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
    super.defineProperties(properties);
    properties.add(line_width = propLineWidth.createProperty(this, 3));
    properties.add(line_color = propLineColor.createProperty(this, new WidgetColor(0, 0, 255)));
    properties.add(background_color = propBackgroundColor.createProperty(this, new WidgetColor(50, 50, 255)));
    properties.add(points = propPoints.createProperty(this, new Points()));
}
Also used : CommonWidgetProperties.propPoints(org.csstudio.display.builder.model.properties.CommonWidgetProperties.propPoints) Points(org.csstudio.display.builder.model.properties.Points) WidgetColor(org.csstudio.display.builder.model.properties.WidgetColor)

Example 24 with WidgetColor

use of org.csstudio.display.builder.model.properties.WidgetColor in project org.csstudio.display.builder by kasemir.

the class RectangleWidget method defineProperties.

@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
    super.defineProperties(properties);
    properties.add(line_width = propLineWidth.createProperty(this, 3));
    properties.add(line_color = propLineColor.createProperty(this, new WidgetColor(0, 0, 255)));
    properties.add(background = propBackgroundColor.createProperty(this, new WidgetColor(30, 144, 255)));
    properties.add(transparent = propTransparent.createProperty(this, false));
    properties.add(corner_width = propCornerWidth.createProperty(this, 0));
    properties.add(corner_height = propCornerHeight.createProperty(this, 0));
}
Also used : WidgetColor(org.csstudio.display.builder.model.properties.WidgetColor)

Example 25 with WidgetColor

use of org.csstudio.display.builder.model.properties.WidgetColor in project org.csstudio.display.builder by kasemir.

the class TankWidget method defineProperties.

@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
    super.defineProperties(properties);
    properties.add(font = propFont.createProperty(this, WidgetFontService.get(NamedWidgetFonts.DEFAULT)));
    properties.add(foreground = propForegroundColor.createProperty(this, WidgetColorService.getColor(NamedWidgetColors.TEXT)));
    properties.add(background = propBackgroundColor.createProperty(this, WidgetColorService.getColor(NamedWidgetColors.READ_BACKGROUND)));
    properties.add(fill_color = propFillColor.createProperty(this, new WidgetColor(0, 0, 255)));
    properties.add(empty_color = propEmptyColor.createProperty(this, new WidgetColor(192, 192, 192)));
    properties.add(limits_from_pv = propLimitsFromPV.createProperty(this, true));
    properties.add(minimum = propMinimum.createProperty(this, 0.0));
    properties.add(maximum = propMaximum.createProperty(this, 100.0));
}
Also used : WidgetColor(org.csstudio.display.builder.model.properties.WidgetColor)

Aggregations

WidgetColor (org.csstudio.display.builder.model.properties.WidgetColor)27 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)3 Test (org.junit.Test)3 Background (javafx.scene.layout.Background)2 BackgroundFill (javafx.scene.layout.BackgroundFill)2 CommonWidgetProperties.propPoints (org.csstudio.display.builder.model.properties.CommonWidgetProperties.propPoints)2 Points (org.csstudio.display.builder.model.properties.Points)2 BasicStroke (java.awt.BasicStroke)1 Color (java.awt.Color)1 Graphics2D (java.awt.Graphics2D)1 BufferedImage (java.awt.image.BufferedImage)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Scene (javafx.scene.Scene)1 Label (javafx.scene.control.Label)1 MenuButton (javafx.scene.control.MenuButton)1 MenuItem (javafx.scene.control.MenuItem)1 TextArea (javafx.scene.control.TextArea)1 WritableImage (javafx.scene.image.WritableImage)1