Packagecom.yworks.graph.model
Classpublic class StripeDefaults
InheritanceStripeDefaults Inheritance Object
Implements IStripeDefaults, IMarkupExtensionFactory

A canonic implementation of the IStripeDefaults interface.



Public Properties
 PropertyDefined By
  autoAdjustPreferredSize : Boolean
Determines whether to automatically adjust the preferred size of a label.
StripeDefaults
  insets : IRectangle
The default insets for a stripe.
StripeDefaults
  labelModelParameter : ILabelModelParameter
The label model parameter to use for labels.
StripeDefaults
  labelStyle : ILabelStyle
The default style to use for labels.
StripeDefaults
  minimumSize : Number
The default minimum size for a stripe.
StripeDefaults
  shareLabelModelParameterInstance : Boolean
Whether the labelModelParameter instance should be shared referentially or cloned upon a call to getLabelModelParameterInstance().
StripeDefaults
  shareLabelStyleInstance : Boolean
Whether the labelStyle instance should be shared referentially or cloned upon a call to getLabelStyleInstance.
StripeDefaults
  shareStyleInstance : Boolean
Indicates whether the style instance should be shared referentially or cloned upon a call to getStyleInstance.
StripeDefaults
  size : Number
The default stripe size.
StripeDefaults
  style : INodeStyle
The default style to use for stripes.
StripeDefaults
Public Methods
 MethodDefined By
  
StripeDefaults(style:INodeStyle = null, insets:IRectangle = null, labelStyle:ILabelStyle = null, labelModelParameter:ILabelModelParameter = null)
Initializes a new instance of the StripeDefaults class using the given properties.
StripeDefaults
  
Creates a markup extension that can be used instead of the original class.
StripeDefaults
  
Factory method that returns a label model parameter instance for use with newly created labels.
StripeDefaults
  
Factory method that returns a style instance for use with newly created labels.
StripeDefaults
  
Factory method that returns a style instance for use with newly created stripes.
StripeDefaults
Property Detail
autoAdjustPreferredSizeproperty
autoAdjustPreferredSize:Boolean

Determines whether to automatically adjust the preferred size of a label.

On a call to IGraph.setLabelText() or IGraph.setLabelStyle(), the preferred size of the label will automatically be adjusted to the preferred size that is suggested by the label's style renderer, if this property is set to true.


Implementation
    public function get autoAdjustPreferredSize():Boolean
    public function set autoAdjustPreferredSize(value:Boolean):void
insetsproperty 
insets:IRectangle

The default insets for a stripe.


Implementation
    public function get insets():IRectangle
    public function set insets(value:IRectangle):void
labelModelParameterproperty 
labelModelParameter:ILabelModelParameter

The label model parameter to use for labels.

Depending on the setting of shareLabelModelParameterInstance, the getLabelModelParameterInstance method should return a clone of this instance or the very same instance.


Implementation
    public function get labelModelParameter():ILabelModelParameter
    public function set labelModelParameter(value:ILabelModelParameter):void
labelStyleproperty 
labelStyle:ILabelStyle

The default style to use for labels.

Depending on the setting of shareLabelStyleInstance, the getLabelStyleInstance() method should return a clone of this instance or the very same instance.


Implementation
    public function get labelStyle():ILabelStyle
    public function set labelStyle(value:ILabelStyle):void
minimumSizeproperty 
minimumSize:Number

The default minimum size for a stripe.


Implementation
    public function get minimumSize():Number
    public function set minimumSize(value:Number):void
shareLabelModelParameterInstanceproperty 
shareLabelModelParameterInstance:Boolean

Whether the labelModelParameter instance should be shared referentially or cloned upon a call to getLabelModelParameterInstance().

true if the reference should be shared; otherwise, false.


Implementation
    public function get shareLabelModelParameterInstance():Boolean
    public function set shareLabelModelParameterInstance(value:Boolean):void
shareLabelStyleInstanceproperty 
shareLabelStyleInstance:Boolean

Whether the labelStyle instance should be shared referentially or cloned upon a call to getLabelStyleInstance.

true if the reference should be shared; otherwise, false.


Implementation
    public function get shareLabelStyleInstance():Boolean
    public function set shareLabelStyleInstance(value:Boolean):void
shareStyleInstanceproperty 
shareStyleInstance:Boolean

Indicates whether the style instance should be shared referentially or cloned upon a call to getStyleInstance.

Set to true if the reference should be shared; otherwise, false.


Implementation
    public function get shareStyleInstance():Boolean
    public function set shareStyleInstance(value:Boolean):void
sizeproperty 
size:Number

The default stripe size.


Implementation
    public function get size():Number
    public function set size(value:Number):void
styleproperty 
style:INodeStyle

The default style to use for stripes.

Depending on the setting of shareStyleInstance, the getStyleInstance method should return a clone of this instance or the very same instance.


Implementation
    public function get style():INodeStyle
    public function set style(value:INodeStyle):void
Constructor Detail
StripeDefaults()Constructor
public function StripeDefaults(style:INodeStyle = null, insets:IRectangle = null, labelStyle:ILabelStyle = null, labelModelParameter:ILabelModelParameter = null)

Initializes a new instance of the StripeDefaults class using the given properties.

Parameters
style:INodeStyle (default = null) — The default stripe style. If none is provided a VoidNodeStyle is set.
 
insets:IRectangle (default = null) — The default stripe insets. If none is provided (0,0,0,0) is set.
 
labelStyle:ILabelStyle (default = null) — The label style. If none is provided an instance of SimpleLabelStyle will be set.
 
labelModelParameter:ILabelModelParameter (default = null) — The label model parameter. If none is provided the label will be placed centered using a parameter of StripeLabelModel.
Method Detail
createMarkupExtension()method
public function createMarkupExtension(context:ILookup):MarkupExtension

Creates a markup extension that can be used instead of the original class.

Parameters

context:ILookup — The context that shall be considered when creating the markup extension.

Returns
MarkupExtension
getLabelModelParameterInstance()method 
public function getLabelModelParameterInstance(owner:ILabeledItem):ILabelModelParameter

Factory method that returns a label model parameter instance for use with newly created labels.

Most implementations will yield either a clone of or the labelModelParameter property, if shareLabelModelParameterInstance is enabled, but they might use more complicated logic, too.

Parameters

owner:ILabeledItem — The owner of the label that will be created.

Returns
ILabelModelParameter — The parameter to use, which for most implementations is either a clone of or the labelModelParameter property, if shareLabelModelParameterInstance is enabled.
getLabelStyleInstance()method 
public function getLabelStyleInstance(owner:ILabeledItem):ILabelStyle

Factory method that returns a style instance for use with newly created labels.

Most implementations will yield either a clone of or the labelStyle property if shareLabelStyleInstance is enabled, but they might use more complicated logic, too.

Parameters

owner:ILabeledItem — The owner of the label that will be created.

Returns
ILabelStyle — The style to use, which for most implementations is either a clone of or the labelStyle property, if shareLabelStyleInstance is enabled.
getStyleInstance()method 
public function getStyleInstance():INodeStyle

Factory method that returns a style instance for use with newly created stripes.

Most implementations will yield either, a clone of or the style property, if shareStyleInstance is enabled, but they might use more complicated logic, too.

Returns
INodeStyle — The style to use, which for most implementations is either a clone of or the style property, if shareStyleInstance is enabled.