swarm.defobj
Interface CustomizeC
- All Known Subinterfaces:
- ActionC, ActionCacheC, ActionCallC, ActionChangedC, ActionConcurrentC, ActionForEachC, ActionForEachHomogeneousC, ActionGroupC, ActionToC, ActivationOrderC, ActiveGraphC, ActiveOutFileC, ActivityControlC, ArchivedGeometryWidgetC, ArchiverC, ArgumentsC, ArrayC, AveragerC, BasicRandomGeneratorC, BehaviorPhaseC, BernoulliDistC, BinomialDistC, BooleanDistributionC, C2TAUS1genC, C2TAUS2genC, C2TAUS3genC, C2TAUSgenC, Ca2dC, CanvasAbstractItemC, CanvasC, CanvasItemC, CollectionC, ColormapC, CommonProbeDisplayC, CompleteProbeDisplayC, CompleteProbeMapC, CompleteVarMapC, CompositeItemC, CompoundActionC, ConcurrentGroupC, ConcurrentScheduleC, ControlPanelC, ConwayLife2dC, CreateC, CreatedClassC, CustomProbeMapC, DblBuffer2dC, DefaultProbeMapC, Diffuse2dC, Discrete2dC, DoubleDistributionC, EmptyProbeMapC, EntropyC, ErrorC, EventTypeC, ExponentialDistC, EZAverageSequenceC, EZBinC, EZDistributionC, EZGraphC, EZSequenceC, FActionC, FActionForEachC, FActionForEachHeterogeneousC, FActionForEachHomogeneousC, FArgumentsC, FCallC, GammaDistC, GraphC, GraphElementC, Grid2dC, GUISwarmC, HDF5ArchiverC, HDF5C, HistogramC, Int2dFilerC, IntegerDistributionC, KeyedCollectionC, LinkItemC, LispArchiverC, ListC, ListShufflerC, LogNormalDistC, MapC, MessageProbeC, MT19937genC, MultiVarProbeDisplayC, NodeItemC, NormalC, NormalDistC, NSelectC, Object2dDisplayC, OvalNodeItemC, PermutationC, PermutationItemC, PixmapC, PMMLCG1genC, PMMLCGgenC, PoissonDistC, ProbabilityDistributionC, ProbeC, ProbeDisplayC, ProbeDisplayManagerC, ProbeLibraryC, ProbeMapC, PSWBgenC, QSortC, RandomBitDistC, RasterC, RectangleNodeItemC, ScheduleC, SimpleProbeDisplayC, SimpleRandomGeneratorC, SingleProbeDisplayC, SplitRandomGeneratorC, StringC, SwarmC, SwarmObjectC, SwarmProcessC, SymbolC, UNameC, UniformDoubleDistC, UniformIntegerDistC, UniformUnsignedDistC, UnsignedDistributionC, Value2dDisplayC, VarProbeC, WarningC, WidgetC, ZoneC, ZoomRasterC
- public interface CustomizeC
Create-phase customization..
Some types accept create-time messages not only when creating a new instance, but to customize a new version of the type itself. Objects created from a customized type will have all options preset that create-time messages sent to the customized type object have already set. If many objects all need the same create-time options, it is often simpler (and can also be faster) to create a customized version of a type first, and then create further instances from that type. Customizing a type object does not modify the original type object, but instead creates a new type object that has the customizations built-in. A create: message on the new type object creates a new instance as if the same sequence of create-time messages had been sent to the original type object using createBegin: and createEnd. A type is customized by bracketing the sequence of create-time messages not with the createBegin: and createEnd messages used to create a new instance, but with customizeBegin: and customizeEnd messages instead. Whether a customized version of a type can be created depends on the implementation of the type itself. If a type does not support customization, a customizeBegin: message on the type raises an error. All types defined by an @protocol declaration may be relied on to support at least one cycle of customization to create a new type object. Whether an already customized type object (returned by customizeEnd) supports a further cycle of customization (by another sequence of customizeBegin:/customizeEnd) depends on the implementation of the original starting type. A type should not be relied on to support more than one cycle of customization unless it is specifically documented to do so.
Method Summary |
java.lang.Object |
customizeBegin(java.lang.Object aZone)
Returns an interim value for receiving create-time messages much like createBegin:. |
java.lang.Object |
customizeCopy(java.lang.Object aZone)
The customizeCopy: message creates a new copy of the interim object returned by customizeBegin: which may be used for further customizations that do not affect the customization already in progress. |
java.lang.Object |
customizeEnd()
Returns the new, customized version of the original type. |
customizeBegin
public java.lang.Object customizeBegin(java.lang.Object aZone)
- Returns an interim value for receiving create-time messages much like createBegin:. The zone passed to customizeBegin: is the same zone from which storage for the new, finalized type object will be taken. This zone need not be the same as any instance later created from that type, since a new zone argument is still passed in any subsequent create message on that type.
customizeEnd
public java.lang.Object customizeEnd()
- Returns the new, customized version of the original type.
customizeCopy
public java.lang.Object customizeCopy(java.lang.Object aZone)
- The customizeCopy: message creates a new copy of the interim object returned by customizeBegin: which may be used for further customizations that do not affect the customization already in progress. It may be used to branch off a path of a customization in progress to create an alternate final customization. customizeCopy may be used only on an interim object returned by customizeBegin: and not yet finalized by customizeEnd. The new version of the interim object being customized may be allocated in the same or different zone as the original version, using the zone argument required by customizeCopy: