DGP - merged printing support from branch
[debian/openrocket] / src / net / sf / openrocket / rocketcomponent / Stage.java
index 361f50232fcd1cd4c3b2d9aec694018e9c348763..b16cd4b660e96a39c42d99533f66061cea79080f 100644 (file)
@@ -2,10 +2,10 @@ package net.sf.openrocket.rocketcomponent;
 
 public class Stage extends ComponentAssembly {
        
-       @Override
-       public String getComponentName() {
-               return "Stage";
-       }
+    @Override
+    public String getComponentName () {
+        return "Stage";
+    }
        
        
        @Override
@@ -13,16 +13,26 @@ public class Stage extends ComponentAssembly {
                return true;
        }
        
-       /**
+    /**
         * Check whether the given type can be added to this component.  A Stage allows 
         * only BodyComponents to be added.
-        * 
-        * @param type  The RocketComponent class type to add.
-        * @return      Whether such a component can be added.
-        */
-       @Override
-       public boolean isCompatible(Class<? extends RocketComponent> type) {
-               return BodyComponent.class.isAssignableFrom(type);
-       }
-       
+     *
+     * @param type The RocketComponent class type to add.
+     *
+     * @return Whether such a component can be added.
+     */
+    @Override
+    public boolean isCompatible (Class<? extends RocketComponent> type) {
+        return BodyComponent.class.isAssignableFrom(type);
+    }
+
+    /**
+     * Accept a visitor to this Stage in the component hierarchy.
+     * 
+     * @param theVisitor  the visitor that will be called back with a reference to this Stage
+     */    
+    @Override 
+    public void accept (final ComponentVisitor theVisitor) {
+        theVisitor.visit(this);
+    }
 }