use of org.eclipse.bpmn2.Group in project ORCID-Source by ORCID.
the class PublicAPISecurityManagerV2Test method setVisibility.
private void setVisibility(GroupsContainer container, Visibility... vs) {
assertEquals(container.retrieveGroups().size(), vs.length);
int idx = 0;
for (Group g : container.retrieveGroups()) {
// Every group have just one element
assertEquals(1, g.getActivities().size());
for (Filterable f : g.getActivities()) {
f.setVisibility(vs[idx++]);
}
}
}
use of org.eclipse.bpmn2.Group in project sirix by sirixdb.
the class AbstractSunburstGUI method style.
/**
* Style menu.
*/
protected void style() {
final Group ctrl = mControlP5.addGroup("menu", 15, 25, 35);
ctrl.setColorLabel(mParent.color(255));
ctrl.setColorBackground(mParent.color(100));
ctrl.close();
mParent.colorMode(PConstants.RGB, 255, 255, 255);
final int backgroundColor = 0x99ffffff;
int i = 0;
for (final Slider slider : mSliders) {
slider.setGroup(ctrl);
slider.setId(i);
final Label label = slider.getCaptionLabel();
label.toUpperCase(true);
label.setColor(mParent.color(0));
label.setColorBackground(backgroundColor);
final ControllerStyle style = label.getStyle();
style.padding(4, 0, 1, 3);
style.marginTop = -4;
style.marginLeft = 0;
style.marginRight = -14;
slider.plugTo(mControl);
i++;
}
i = 0;
for (final Range range : mRanges) {
range.setGroup(ctrl);
range.setId(i);
final Label label = range.getCaptionLabel();
label.toUpperCase(true);
label.setColor(mParent.color(0));
label.setColorBackground(backgroundColor);
final ControllerStyle style = label.getStyle();
style.padding(4, 0, 1, 3);
style.marginTop = -4;
range.plugTo(mControl);
i++;
}
i = 0;
for (final Toggle toggle : mToggles) {
toggle.setGroup(ctrl);
toggle.setId(i);
final Label label = toggle.getCaptionLabel();
label.setColor(mParent.color(0));
label.setColorBackground(backgroundColor);
final ControllerStyle style = label.getStyle();
style.padding(4, 3, 1, 3);
style.marginTop = -19;
style.marginLeft = 18;
style.marginRight = 5;
toggle.plugTo(mControl);
i++;
}
mParent.colorMode(PConstants.HSB, 360, 100, 100);
mParent.textLeading(14);
mParent.textAlign(PConstants.LEFT, PConstants.TOP);
mParent.cursor(PConstants.CROSS);
}
use of org.eclipse.bpmn2.Group in project sis by apache.
the class DecoderWrapper method setSearchPath.
/**
* Defines the groups where to search for named attributes, in preference order.
* The {@code null} group name stands for the global attributes.
*/
@Override
public void setSearchPath(final String... groupNames) {
final Group[] groups = new Group[groupNames.length];
int count = 0;
for (final String name : groupNames) {
if (name != null) {
final Group group = file.findGroup(name);
if (group == null) {
// Group not found - do not increment the counter.
continue;
}
groups[count] = group;
}
count++;
}
this.groups = ArraysExt.resize(groups, count);
}
use of org.eclipse.bpmn2.Group in project bioformats by openmicroscopy.
the class NetCDFServiceImpl method parseAttributesAndVariables.
// -- Helper methods --
/**
* Recursively parses attribute and variable paths, filling
* <code>attributeList</code> and <code>variableList</code>.
* @param groups List of groups to recursively parse.
*/
private void parseAttributesAndVariables(List<Group> groups) {
for (Group group : groups) {
String groupName = group.getName();
List<Attribute> attributes = group.getAttributes();
for (Attribute attribute : attributes) {
String attributeName = attribute.getName();
if (!groupName.endsWith("/"))
attributeName = "/" + attributeName;
attributeList.add(groupName + attributeName);
}
List<Variable> variables = group.getVariables();
for (Variable variable : variables) {
String variableName = variable.getName();
if (!groupName.endsWith("/"))
variableName = "/" + variableName;
variableList.add(variableName);
}
groups = group.getGroups();
parseAttributesAndVariables(groups);
}
}
use of org.eclipse.bpmn2.Group in project bioformats by openmicroscopy.
the class NetCDFServiceImpl method getVariableAttributes.
/* (non-Javadoc)
* @see loci.formats.NetCDFService#getVariableAttributes(java.lang.String)
*/
@Override
public Hashtable<String, Object> getVariableAttributes(String name) {
String groupName = getDirectory(name);
String variableName = getName(name);
Group group = getGroup(groupName);
Variable variable = group.findVariable(variableName);
Hashtable<String, Object> toReturn = new Hashtable<String, Object>();
if (variable != null) {
List<Attribute> attributes = variable.getAttributes();
for (Attribute attribute : attributes) {
toReturn.put(attribute.getName(), arrayToString(attribute.getValues()));
}
}
return toReturn;
}
Aggregations