use of org.csstudio.opibuilder.properties.PointListProperty in project yamcs-studio by yamcs.
the class AbstractPolyModel method configureProperties.
/**
* {@inheritDoc}
*/
@Override
protected void configureProperties() {
super.configureProperties();
addProperty(new DoubleProperty(PROP_ROTATION, "Rotation Angle", WidgetPropertyCategory.Display, 0, 0, 360));
addProperty(new PointListProperty(PROP_POINTS, "Points", WidgetPropertyCategory.Display, new PointList()));
}
use of org.csstudio.opibuilder.properties.PointListProperty in project yamcs-studio by yamcs.
the class ConnectionModel method configureProperties.
@Override
protected void configureProperties() {
addProperty(new IntegerProperty(PROP_LINE_WIDTH, "Line Width", WidgetPropertyCategory.Display, 1, 1, 100));
addProperty(new ComboProperty(PROP_LINE_STYLE, "Line Style", WidgetPropertyCategory.Display, LineStyle.stringValues(), 0));
addProperty(new ColorProperty(PROP_LINE_COLOR, "Line Color", WidgetPropertyCategory.Display, CustomMediaFactory.COLOR_BLACK));
addProperty(new ComboProperty(PROP_ROUTER, "Router", WidgetPropertyCategory.Display, RouterType.stringValues(), 0));
addProperty(new ComboProperty(PROP_ARROW_TYPE, "Arrows", WidgetPropertyCategory.Display, ArrowType.stringValues(), 0));
addProperty(new BooleanProperty(PROP_FILL_ARROW, "Fill Arrow", WidgetPropertyCategory.Display, true));
addProperty(new IntegerProperty(PROP_ARROW_LENGTH, "Arrow Length", WidgetPropertyCategory.Display, 15, 5, 1000));
addProperty(new BooleanProperty(PROP_ANTIALIAS, "Anti Alias", WidgetPropertyCategory.Display, true));
addProperty(new StringProperty(PROP_SRC_TERM, "Source Terminal", WidgetPropertyCategory.Display, ""));
addProperty(new StringProperty(PROP_TGT_TERM, "Target Terminal", WidgetPropertyCategory.Display, ""));
addProperty(new PointListProperty(PROP_POINTS, "Points", WidgetPropertyCategory.Display, new PointList()));
addProperty(new ComboProperty(PROP_LINE_JUMP_ADD, "Add Line Jump To", WidgetPropertyCategory.Display, LineJumpAdd.stringValues(), 0));
addProperty(new ComboProperty(PROP_LINE_JUMP_STYLE, "Line Jump Style", WidgetPropertyCategory.Display, LineJumpStyle.stringValues(), 0));
addProperty(new IntegerProperty(PROP_LINE_JUMP_SIZE, "Line Jump Size", WidgetPropertyCategory.Display, 10, 1, 100));
AbstractWidgetProperty loadedFromLinkingContainer = new StringProperty(PROP_IS_LOADED_FROM_LINKING_CONTAINER, "Is Loaded From Linking Container", WidgetPropertyCategory.Behavior, "false");
addProperty(loadedFromLinkingContainer);
setPropertyVisibleAndSavable(PROP_IS_LOADED_FROM_LINKING_CONTAINER, false, false);
setPropertyVisibleAndSavable(PROP_POINTS, false, true);
AbstractWidgetProperty srcWUIDProp = new StringProperty(PROP_SRC_WUID, "Source WUID", WidgetPropertyCategory.Display, "");
addProperty(srcWUIDProp);
srcWUIDProp.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (displayModel == null)
return;
String wuid = evt.getNewValue().toString();
String path = getPropertyValue(PROP_SRC_PATH).toString();
AbstractWidgetModel w = null;
if (path == null || path.equals("")) {
w = getTerminal(displayModel, null, wuid);
} else {
List<String> paths = Arrays.asList(path.split(PATH_DELIMITER));
w = getTerminal(displayModel, paths, wuid);
}
if (w != null) {
source = w;
reconnect();
} else
throw new IllegalArgumentException("Non exist widget PATH:[" + path + "],\nWUID:[" + wuid + "]");
}
});
AbstractWidgetProperty tgtWUIDProp = new StringProperty(PROP_TGT_WUID, "Target WUID", WidgetPropertyCategory.Display, "");
addProperty(tgtWUIDProp);
tgtWUIDProp.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (displayModel == null)
return;
String wuid = evt.getNewValue().toString();
String path = getPropertyValue(PROP_TGT_PATH).toString();
AbstractWidgetModel w = null;
if (path == null || path.equals("")) {
w = getTerminal(displayModel, null, wuid);
} else {
List<String> paths = Arrays.asList(path.split(PATH_DELIMITER));
w = getTerminal(displayModel, paths, wuid);
}
if (w != null) {
target = w;
reconnect();
} else
throw new IllegalArgumentException("Non exist widget PATH:[" + path + "],\nWUID:[" + wuid + "]");
}
});
AbstractWidgetProperty srcPathProp = new StringProperty(PROP_SRC_PATH, "Source Path", WidgetPropertyCategory.Display, "");
addProperty(srcPathProp);
AbstractWidgetProperty tgtPathProp = new StringProperty(PROP_TGT_PATH, "Target Path", WidgetPropertyCategory.Display, "");
addProperty(tgtPathProp);
setPropertyVisibleAndSavable(PROP_SRC_WUID, false, true);
setPropertyVisibleAndSavable(PROP_TGT_WUID, false, true);
setPropertyVisibleAndSavable(PROP_SRC_PATH, false, true);
setPropertyVisibleAndSavable(PROP_TGT_PATH, false, true);
setPropertyVisibleAndSavable(PROP_SRC_TERM, false, true);
setPropertyVisibleAndSavable(PROP_TGT_TERM, false, true);
removeProperty(PROP_BORDER_COLOR);
removeProperty(PROP_BORDER_STYLE);
removeProperty(PROP_BORDER_WIDTH);
removeProperty(PROP_VISIBLE);
removeProperty(PROP_ENABLED);
removeProperty(PROP_TOOLTIP);
removeProperty(PROP_ACTIONS);
removeProperty(PROP_FONT);
removeProperty(PROP_XPOS);
removeProperty(PROP_YPOS);
removeProperty(PROP_WIDTH);
removeProperty(PROP_HEIGHT);
removeProperty(PROP_RULES);
removeProperty(PROP_ACTIONS);
removeProperty(PROP_SCRIPTS);
removeProperty(PROP_COLOR_BACKGROUND);
removeProperty(PROP_COLOR_FOREGROUND);
removeProperty(PROP_SCALE_OPTIONS);
}
Aggregations