src/lib/myScript/input/generic/components/abstractComponent.ts
Represent an abstract input component
constructor()
|
getType |
getType()
|
Get the type of the input component
Returns:
string
|
setType |
setType(type: string)
|
Set the type of the input component
Parameters :
Returns:
void
|
getBoundingBox |
getBoundingBox()
|
Get input component bounding-box
Returns:
Rectangle
|
setBoundingBox |
setBoundingBox(boundingBox: Rectangle)
|
Set input component bounding-box
Parameters :
Returns:
void
|
boundingBox |
boundingBox: |
scratchedStroke |
scratchedStroke: |
type |
type: |
import { Rectangle } from '../../../common/generic/rectangle';
/**
* Represent an abstract input component
*
* @abstract
* @class AbstractComponent
*/
export abstract class AbstractComponent {
type: string;
boundingBox: Rectangle;
scratchedStroke: boolean;
constructor() { }
/**
* Get the type of the input component
*
* @method getType
* @returns {String}
*/
getType(): string {
return this.type;
};
/**
* Set the type of the input component
*
* @method setType
* @param {String} type
*/
setType(type: string) {
this.type = type;
};
/**
* Get input component bounding-box
*
* @method getBoundingBox
* @returns {Rectangle}
*/
abstract getBoundingBox(): Rectangle;
/**
* Set input component bounding-box
*
* @method setBoundingBox
* @param {Rectangle} boundingBox
*/
abstract setBoundingBox(boundingBox: Rectangle);
}