How to use tabris - 10 common examples

To help you get started, we’ve selected a few tabris examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
Constraint,
  Widget,
  Composite,
  SiblingReference,
  SiblingReferenceValue,
  ConstraintValue,
  ConstraintArray,
  ConstraintLikeObject
} from 'tabris';


// Related types
let num: number = 23;
let percent: Percent = new Percent(0);
let reference: SiblingReference|Percent = new Composite();
let widget: Widget = new Composite();
let percentValue: PercentValue = {percent: 50};

let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let percentValue: PercentValue = {percent: 50};

let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
constraintValue = {};
constraintValue = new Date();
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
// Related types
let num: number = 23;
let percent: Percent = new Percent(0);
let reference: SiblingReference|Percent = new Composite();
let widget: Widget = new Composite();
let percentValue: PercentValue = {percent: 50};

let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let percent: Percent = new Percent(0);
let reference: SiblingReference|Percent = new Composite();
let widget: Widget = new Composite();
let percentValue: PercentValue = {percent: 50};

let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
constraintValue = {};
constraintValue = new Date();

// Statics
Constraint.from();
Constraint.from(null);
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let num: number = 23;
let percent: Percent = new Percent(0);
let reference: SiblingReference|Percent = new Composite();
let widget: Widget = new Composite();
let percentValue: PercentValue = {percent: 50};

let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
constraintValue = {};
constraintValue = new Date();

// Statics
Constraint.from();
Constraint.from(null);
Constraint.from(undefined);
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let widget: Widget = new Composite();
let percentValue: PercentValue = {percent: 50};

let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
constraintValue = {};
constraintValue = new Date();
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
constraintValue = {};
constraintValue = new Date();

// Statics
github eclipsesource / tabris-js / test / typescript / Constraint.fail.ts View on Github external
let siblingReferenceValue: SiblingReferenceValue = (x: Widget) => true;
let constraintArray: ConstraintArray = ['50%'];
constraintArray = ['50%', 0, 1];
let constraintLikeObject: ConstraintLikeObject = {};
constraintLikeObject = {reference: 10};
constraintLikeObject = {percent: 10};

// Constructor
let constraint: Constraint = new Constraint(new Percent(0));
constraint = new Constraint();
constraint = new Constraint(new Percent(0), 0, 0);
constraint = new Constraint(null, null);
constraint = new Constraint(undefined, undefined);
constraint = new Constraint((x: Widget) => true, 23);
constraint = new Constraint(new Percent(0), '0');
constraint = new Constraint('auto');
constraint = new Constraint(new Percent(0), 'auto');
constraint = new Constraint(percentValue, 0);

// Instance
let auto = constraint.offset as 'auto';
let percentLikeObject = constraint.reference as PercentLikeObject;
let stringArray = constraint.toArray() as [string, string];

// ConstraintValue
let constraintValue: ConstraintValue = null;
constraintValue = undefined;
constraintValue = {};
constraintValue = new Date();

// Statics
Constraint.from();