-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClLinearConstraint.java
46 lines (38 loc) · 1.05 KB
/
ClLinearConstraint.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// $Id$
//
// Cassowary Incremental Constraint Solver
// Original Smalltalk Implementation by Alan Borning
// This Java Implementation by Greg J. Badros, <[email protected]>
// http://www.cs.washington.edu/homes/gjb
// (C) 1998, 1999 Greg J. Badros and Alan Borning
// See ../LICENSE for legal details regarding this software
//
// ClLinearConstraint
//
package EDU.Washington.grad.gjb.cassowary;
class ClLinearConstraint extends ClConstraint
{
public ClLinearConstraint(ClLinearExpression cle,
ClStrength strength,
double weight)
{
super(strength,weight);
_expression = cle;
}
public ClLinearConstraint(ClLinearExpression cle,
ClStrength strength)
{
super(strength,1.0);
_expression = cle;
}
public ClLinearConstraint(ClLinearExpression cle)
{
super(ClStrength.required,1.0);
_expression = cle;
}
public ClLinearExpression expression()
{ return _expression; }
protected void setExpression(ClLinearExpression expr)
{ _expression = expr; }
protected ClLinearExpression _expression;
}