private FilterToolbarFactory() {
};
public static JToolBar createFilterToolBar(final SchemaTypeConstraint[] constraints) {
final IconSource iconSource = (IconSource) Application.services().getService(IconSource.class);
final JToggleButton jtbAttributes = new JToggleButton(iconSource.getIcon("attributeHide.icon"));
jtbAttributes.setSelected(false);
jtbAttributes.setPressedIcon(iconSource.getIcon("attribute.icon"));
jtbAttributes.setToolTipText("Hide/show attributes.");
final JToggleButton jtbComplexTypes = new JToggleButton(iconSource.getIcon("complexTypeHide.icon"));
jtbComplexTypes.setSelected(false);
jtbComplexTypes.setPressedIcon(iconSource.getIcon("complexType.icon"));
jtbComplexTypes.setToolTipText("Hide/show complex types.");
final JToggleButton jtbElements = new JToggleButton(iconSource.getIcon("elementHide.icon"));
jtbElements.setSelected(false);
jtbElements.setPressedIcon(iconSource.getIcon("elementType.icon"));
jtbElements.setToolTipText("Hide/show elements.");
final JToggleButton jtbModelGroups = new JToggleButton(iconSource.getIcon("modelGroupHide.icon"));
jtbModelGroups.setSelected(false);
jtbModelGroups.setPressedIcon(iconSource.getIcon("modelGroup.icon"));
jtbModelGroups.setToolTipText("Hide/show model groups.");
final JToggleButton jtbSimpleTypes = new JToggleButton(iconSource.getIcon("simpleTypeHide.icon"));
jtbSimpleTypes.setSelected(false);
jtbSimpleTypes.setPressedIcon(iconSource.getIcon("simpleType.icon"));
jtbSimpleTypes.setToolTipText("Hide/show simple types.");
for (SchemaTypeConstraint constraint : constraints) {
jtbAttributes.addActionListener(new SchemaTypeConstraintActionListener(constraint, XSConstants.ATTRIBUTE_DECLARATION));
jtbComplexTypes.addActionListener(new SchemaTypeConstraintActionListener(constraint, XSTypeDefinition.COMPLEX_TYPE));