throw new IOException( "Unknown factory-id: " + id ); DockableProperty temp = factory.createProperty();
throw new IOException( "Unknown factory-id: " + id ); DockableProperty temp = factory.createProperty();
/** * Reads a {@link DockableProperty} and its successors from an xml element. * @param element the element to read from * @return the property or <code>null</code> if <code>element</code> is empty * @throws IllegalArgumentException if a {@link DockablePropertyFactory} is missing. */ public DockableProperty readXML( XElement element ){ DockableProperty base = null; DockableProperty property = null; for (XElement xnode : element.getElements( "property" )) { DockablePropertyFactory factory = factories.get( xnode.getString( "factory" ) ); if (factory == null) throw new IllegalArgumentException( "Missing factory: " + xnode.getString( "factory" ) ); DockableProperty next = factory.createProperty(); next.load( xnode ); if (property == null) { property = next; base = next; } else { property.setSuccessor( next ); property = next; } } return base; } }
/** * Reads a {@link DockableProperty} and its successors from an xml element. * @param element the element to read from * @return the property or <code>null</code> if <code>element</code> is empty * @throws IllegalArgumentException if a {@link DockablePropertyFactory} is missing. */ public DockableProperty readXML( XElement element ){ DockableProperty base = null; DockableProperty property = null; for (XElement xnode : element.getElements( "property" )) { DockablePropertyFactory factory = factories.get( xnode.getString( "factory" ) ); if (factory == null) throw new IllegalArgumentException( "Missing factory: " + xnode.getString( "factory" ) ); DockableProperty next = factory.createProperty(); next.load( xnode ); if (property == null) { property = next; base = next; } else { property.setSuccessor( next ); property = next; } } return base; } }