Ignore:
Timestamp:
09/20/12 17:01:25 (12 years ago)
Author:
fglaser
Message:
  • OutputFormat? of JFCMonitor changed:
  • Components are printed, when they are created
  • Events hold hash values for components instead of full source path
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-jfcmonitor/src/main/java/de/ugoe/cs/quest/jfcmonitor/JFCComponent.java

    r825 r842  
    2323 * </p> 
    2424 *  
    25  * @author Steffen Herbold 
     25 * @author Steffen Herbold, Fabian Glaser 
    2626 * @version 1.0 
    2727 */ 
     
    199199        setTitle(); 
    200200        StringBuilder builder = new StringBuilder(); 
    201         if (parent != null) { 
    202             builder.append(parent.getXML()); 
    203         } 
    204         builder.append("  <component>" + StringTools.ENDLINE); 
     201        builder.append("  <component"); 
     202        if (parent != null){ 
     203                builder.append(" parent=" + Integer.toHexString(parent.component.hashCode())); 
     204        } 
     205        builder.append(">"+ StringTools.ENDLINE); 
    205206        builder.append("   <param name=\"title\" value=\"" + title + "\" />" + StringTools.ENDLINE); 
    206207        builder.append("   <param name=\"class\" value=\"" + componentClass + "\" />" + 
     
    212213        builder.append("  </component>" + StringTools.ENDLINE); 
    213214        return builder.toString(); 
     215    } 
     216     
     217    /** 
     218     * <p> 
     219     * Returns an XML representation of the components children. 
     220     * </p> 
     221     * @return XML representation of children 
     222     */ 
     223    public String printChildren(){ 
     224        StringBuilder builder = new StringBuilder(); 
     225        for (JFCComponent child: children){ 
     226                builder.append(child.getXML()); 
     227                builder.append(child.printChildren()); 
     228        } 
     229        return builder.toString(); 
    214230    } 
    215231 
Note: See TracChangeset for help on using the changeset viewer.