/** * Reads a set of {@link DockLayoutComposition}s that were stored earlier. * @param root the xml element from which to read * @return the set of compositions */ public Map<String, DockLayoutComposition> readCompositionsXML( XElement root ){ Map<String, DockLayoutComposition> result = new HashMap<String, DockLayoutComposition>(); for( XElement xelement : root.getElements( "element" )){ String name = xelement.getString( "name" ); DockLayoutComposition composition = readCompositionXML( xelement ); if( composition != null ){ result.put( name, composition ); } } return result; }
/** * Reads a set of {@link DockStation}s that were stored earlier. * @param root the xml element from which to read * @return the set of station */ public Map<String, DockStation> readXML( XElement root ){ Map<String, DockStation> result = new HashMap<String, DockStation>(); for( XElement xelement : root.getElements( "element" )){ String name = xelement.getString( "name" ); DockLayoutComposition composition = readCompositionXML( xelement ); DockElement element = composition == null ? null : convert( composition ); DockStation station = element == null ? null : element.asDockStation(); if( station != null ) result.put( name, station ); } return result; }
ignore = xchildren.getBoolean( "ignore" ); for( XElement xchild : xchildren.getElements( "child" )){ children.add( readCompositionXML( xchild ));
for( XElement xroot : xroots.getElements( "root" )){ String name = xroot.getString( "name" ); DockLayoutComposition composition = situation.readCompositionXML( xroot ); if( composition != null ){ putRoot( name, composition ); layout = situation.readCompositionXML( xlayout );
for( XElement xroot : xroots.getElements( "root" )){ String name = xroot.getString( "name" ); DockLayoutComposition composition = situation.readCompositionXML( xroot ); if( composition != null ){ putRoot( name, composition ); layout = situation.readCompositionXML( xlayout );
XElement xcontent = xdockable.getElement( "content" ); if( xcontent != null ){ PerspectiveElement element = conversion.convert( conversion.getSituation().readCompositionXML( xcontent ) ); if( element instanceof CommonElementPerspective ){ dockable = ((CommonElementPerspective)element).getElement().asDockable();
XElement xcontent = xdockable.getElement( "content" ); if( xcontent != null ){ PerspectiveElement element = conversion.convert( conversion.getSituation().readCompositionXML( xcontent ) ); if( element instanceof CommonElementPerspective ){ dockable = ((CommonElementPerspective)element).getElement().asDockable();