use of org.csstudio.display.builder.model.macros.Macros in project org.csstudio.display.builder by kasemir.
the class GroupWidget method defineProperties.
@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
super.defineProperties(properties);
properties.add(macros = propMacros.createProperty(this, new Macros()));
properties.add(children = new ChildrenProperty(this));
properties.add(style = propStyle.createProperty(this, Style.GROUP));
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.BACKGROUND)));
properties.add(transparent = propTransparent.createProperty(this, false));
properties.add(insets = runtimePropExtendedInsets.createProperty(this, new int[] { 0, 0, 0, 0 }));
}
use of org.csstudio.display.builder.model.macros.Macros in project org.csstudio.display.builder by kasemir.
the class GroupWidget method getEffectiveMacros.
/**
* Group widget extends parent macros
* @return {@link Macros}
*/
@Override
public Macros getEffectiveMacros() {
final Macros base = super.getEffectiveMacros();
final Macros my_macros = propMacros().getValue();
return Macros.merge(base, my_macros);
}
use of org.csstudio.display.builder.model.macros.Macros in project org.csstudio.display.builder by kasemir.
the class RuntimeLauncher method open.
@Override
public void open(final IPath location) {
String path = location.toOSString();
// If possible, convert to workspace resource
final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
URI uri = URIUtil.toURI(location);
final IFile[] files = root.findFilesForLocationURI(uri);
if (files != null && files.length > 0)
path = files[0].getFullPath().toOSString();
final DisplayInfo info = new DisplayInfo(path, "Navigator File", new Macros());
new OpenDisplayAction(info).run();
}
use of org.csstudio.display.builder.model.macros.Macros in project org.csstudio.display.builder by kasemir.
the class TabsWidget method defineProperties.
@Override
protected void defineProperties(final List<WidgetProperty<?>> properties) {
super.defineProperties(properties);
properties.add(macros = propMacros.createProperty(this, new Macros()));
properties.add(font = propFont.createProperty(this, WidgetFontService.get(NamedWidgetFonts.DEFAULT)));
properties.add(background = propBackgroundColor.createProperty(this, WidgetColorService.getColor(NamedWidgetColors.BACKGROUND)));
properties.add(active = propActiveTab.createProperty(this, 0));
properties.add(tabs = propTabs.createProperty(this, Arrays.asList(new TabItemProperty(this, 0), new TabItemProperty(this, 1))));
properties.add(direction = propDirection.createProperty(this, Direction.HORIZONTAL));
properties.add(tab_height = propTabHeight.createProperty(this, 30));
properties.add(insets = runtimePropInsets.createProperty(this, new int[] { 0, 0 }));
// Initial size
propWidth().setValue(300);
propHeight().setValue(200);
}
use of org.csstudio.display.builder.model.macros.Macros in project org.csstudio.display.builder by kasemir.
the class TabsWidget method getEffectiveMacros.
/**
* Group widget extends parent macros
* @return {@link Macros}
*/
@Override
public Macros getEffectiveMacros() {
final Macros base = super.getEffectiveMacros();
final Macros my_macros = widgetMacros().getValue();
return Macros.merge(base, my_macros);
}
Aggregations