private void properties(SComponent c) { if (properties.size() > 0) { PropertyManager propManager = TemplateIntegrationLayout.getPropertyManager(c.getClass()); if (propManager != null) { for (String key : properties.keySet()) { String value = properties.get(key); propManager.setProperty(c, key, value); } } } }
@Override public void removeComponent(SComponent component) { super.removeComponent(component); TemplateSource source = getTemplateSource(); if (source != null) { TemplateIntegrationLayout.ComponentSet componentSet = componentSets.get(source.getCanonicalName()); componentSet.contained.remove(component); componentSet.notContained.remove(component); } }
super.setTemplate(source); Set<String> names = org.wings.plaf.css.TemplateIntegrationLayoutCG.getContainedComponents(this); final SContainer container = getContainer(); Map<String, String> properties = componentSet.componentProperties.get(component.getName()); if (properties.size() > 0) { PropertyManager propManager = TemplateIntegrationLayout.getPropertyManager(component.getClass());
@Override protected void initialize() { templateLayout = new TemplateIntegrationLayout(); setContentPane(new TemplateIntegrationForm(templateLayout)); super.initialize(); }
/** * */ public IntegrationContainer(String name) { layout = new TemplateIntegrationLayout(); setLayout(layout); adapter = (AbstractTemplateIntegrationAdapter) SessionManager.getSession().getProperty("AbstractTemplateIntegrationAdapter"); try { setTemplate(name); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
@Override public void addComponent(SComponent component, Object constraint, int index) { component.setName((String)constraint); super.addComponent(component, constraint, index); TemplateSource source = getTemplateSource(); if (source != null) { TemplateIntegrationLayout.ComponentSet componentSet = componentSets.get(source.getCanonicalName()); boolean contained = componentSet.names.contains(component.getName()); component.setVisible(contained); if (contained) componentSet.contained.add(component); else componentSet.notContained.add(component); } }
private static void write(Device device, TemplateIntegrationLayout layout) throws IOException { final TemplateSource source = layout.getTemplateSource(); if (source == null) { device.print("The cms server is not reachable at the moment or the connection data is wrong. Please check your <em>integration.xml</em>"); } else { IntegrationTemplateParseContext context = new IntegrationTemplateParseContext(device, layout); parser.process(source, context); } }
public static Map<String, Map<String, String>> getComponentProperties(TemplateIntegrationLayout layout) throws IOException { final TemplateSource source = layout.getTemplateSource(); IntegrationTemplateParseContext context = new IntegrationTemplateParseContext(new NullDevice(), layout); return TemplateIntegrationLayoutCG.parser.getComponentProperties(source, context); }
public static Set<String> getContainedComponents(TemplateIntegrationLayout layout) throws IOException { final TemplateSource source = layout.getTemplateSource(); IntegrationTemplateParseContext context = new IntegrationTemplateParseContext(new NullDevice(), layout); return TemplateIntegrationLayoutCG.parser.getContainedComponents(source, context); }