1 package net.sf.openrocket.rocketcomponent;
3 import net.sf.openrocket.l10n.Translator;
4 import net.sf.openrocket.startup.Application;
6 public class Stage extends ComponentAssembly {
8 private static final Translator trans = Application.getTranslator();
11 public String getComponentName () {
13 return trans.get("Stage.Stage");
18 public boolean allowsChildren() {
23 * Check whether the given type can be added to this component. A Stage allows
24 * only BodyComponents to be added.
26 * @param type The RocketComponent class type to add.
28 * @return Whether such a component can be added.
31 public boolean isCompatible (Class<? extends RocketComponent> type) {
32 return BodyComponent.class.isAssignableFrom(type);
36 * Accept a visitor to this Stage in the component hierarchy.
38 * @param theVisitor the visitor that will be called back with a reference to this Stage
41 public void accept (final ComponentVisitor theVisitor) {
42 theVisitor.visit(this);