Class Index | File Index

Classes


Class BuilderProperty


Defined in: builder.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
BuilderProperty(name, property, type)
The stucture that will hold any changable property of a shape
Field Summary
Field Attributes Field Name and Description
<static>  
BuilderProperty.CONNECTOR_ENDS
Connector ends
<static>  
BuilderProperty.FONT_SIZES
Font sizes
<static>  
BuilderProperty.LINE_WIDTHS
Line widths
<static>  
BuilderProperty.SEPARATOR
Display separator
<static>  
BuilderProperty.TYPE_BOOLEAN
Boolean property type
<static>  
BuilderProperty.TYPE_COLOR
Color property type
<static>  
BuilderProperty.TYPE_CONNECTOR_END
Connector's end property type
<static>  
BuilderProperty.TYPE_IMAGE_FILL
Image Fill type
<static>  
BuilderProperty.TYPE_IMAGE_UPLOAD
File Upload type
<static>  
BuilderProperty.TYPE_LINE_WIDTH
Line width property type
<static>  
BuilderProperty.TYPE_SINGLE_TEXT
SingleText property type
<static>  
BuilderProperty.TYPE_TEXT
Text property type
<static>  
BuilderProperty.TYPE_TEXT_FONT_ALIGNMENT
Text aligment property type
<static>  
BuilderProperty.TYPE_TEXT_FONT_FAMILY
Font family property type
<static>  
BuilderProperty.TYPE_TEXT_FONT_SIZE
Text size property type
Method Summary
Method Attributes Method Name and Description
 
equals(anotherBuilderProperty)
 
generateArrayCode(DOMObject, figureId, v)
Used to generate a drop down menu
 
generateBooleanCode(DOMObject, figureId)
Creates a boolean editor; usually a chechbox
 
generateColorCode(DOMObject, figureId)
Used to generate a color picker
 
generateFileCode(DOMObject, figureId)
Creates an Ajax file upload element
 
generateSingleTextCode(DOMObject, figureId)
Generate the code to edit the text.
 
generateTextCode(DOMObject, figureId)
Generate the code to edit the text.
 
getValue(figureId)
We use this to return a value based on the figure and the property string, similar to Javas Class.forname.
 
injectInputArea(DOMObject, figureId)
Generates a HTML fragment to allow to edit its property.
<static>  
BuilderProperty.load(o)
Creates a {BuilderProperty} out of JSON parsed object
<static>  
BuilderProperty.loadArray(v)
Creates an array of BuilderProperties from an array of {JSONObject}s
 
Class Detail
BuilderProperty(name, property, type)
The stucture that will hold any changable property of a shape
Parameters:
{String} name
- the name of the property
{String} property
- the property (in dot notation) we are using in the form of 'primitives.0.style.strokeStyle'
{Object} type
- could be either, 'Color', 'Boolean', 'Text' or {Array} In case it's an {Array} it is of type [{Text,Value}] and is used to generate a DD menu
Field Detail
<static> BuilderProperty.CONNECTOR_ENDS
Connector ends

<static> BuilderProperty.FONT_SIZES
Font sizes

<static> BuilderProperty.LINE_WIDTHS
Line widths

<static> BuilderProperty.SEPARATOR
Display separator

<static> BuilderProperty.TYPE_BOOLEAN
Boolean property type

<static> BuilderProperty.TYPE_COLOR
Color property type

<static> BuilderProperty.TYPE_CONNECTOR_END
Connector's end property type

<static> BuilderProperty.TYPE_IMAGE_FILL
Image Fill type

<static> BuilderProperty.TYPE_IMAGE_UPLOAD
File Upload type

<static> BuilderProperty.TYPE_LINE_WIDTH
Line width property type

<static> BuilderProperty.TYPE_SINGLE_TEXT
SingleText property type

<static> BuilderProperty.TYPE_TEXT
Text property type

<static> BuilderProperty.TYPE_TEXT_FONT_ALIGNMENT
Text aligment property type

<static> BuilderProperty.TYPE_TEXT_FONT_FAMILY
Font family property type

<static> BuilderProperty.TYPE_TEXT_FONT_SIZE
Text size property type
Method Detail
equals(anotherBuilderProperty)
Parameters:
anotherBuilderProperty

generateArrayCode(DOMObject, figureId, v)
Used to generate a drop down menu
Parameters:
{HTMLElement} DOMObject
- the div of the properties panel
{Number} figureId
- the id of the figure we are using
{Array} v
- a vector or hashes ex: [{Text:'Normal', Value:'Normal'},{Text:'Arrow', Value:'Arrow'}]

generateBooleanCode(DOMObject, figureId)
Creates a boolean editor; usually a chechbox
Parameters:
{HTMLElement} DOMObject
- the div of the properties panel
{Number} figureId
- the id of the figure we are using

generateColorCode(DOMObject, figureId)
Used to generate a color picker
Parameters:
DOMObject
figureId

generateFileCode(DOMObject, figureId)
Creates an Ajax file upload element
Parameters:
{HTMLElement} DOMObject
- the div of the properties panel
{Number} figureId
- the id of the figure we are using

generateSingleTextCode(DOMObject, figureId)
Generate the code to edit the text. The text got updated when you leave the input area
Parameters:
{HTMLElement} DOMObject
- the div of the properties panel
{Number} figureId
- the id of the figure we are using

generateTextCode(DOMObject, figureId)
Generate the code to edit the text. The text got updated when you leave the input area
Parameters:
{HTMLElement} DOMObject
- the div of the properties panel
{Number} figureId
- the id of the figure we are using

getValue(figureId)
We use this to return a value based on the figure and the property string, similar to Javas Class.forname...sort of anyway We need this because passing direct references to simple data types (including strings) only passes the value, not a reference to that value
Parameters:
figureId

injectInputArea(DOMObject, figureId)
Generates a HTML fragment to allow to edit its property. For example if current property is a color then this method will inject a color picker in the specified DOMObject
Parameters:
{HTMLElement} DOMObject
- the div of the properties panel
{Number} figureId
- the id of the figure we are using

<static> {BuilderProperty} BuilderProperty.load(o)
Creates a {BuilderProperty} out of JSON parsed object
Author: Alex Gheorghiu .
Parameters:
{JSONObject} o
- the JSON parsed object
Returns:
{BuilderProperty} a newly constructed Point

<static> BuilderProperty.loadArray(v)
Creates an array of BuilderProperties from an array of {JSONObject}s
Author: Alex Gheorghiu .
Parameters:
{Array} v
- the array of JSONObjects
Returns:
an {Array} of {BuilderProperty}-ies

toString()

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 09 2011 12:47:25 GMT+0300 (EEST)