|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.layout.Constraint
Geometrical constraints for a single LayoutArea object. Describes size and relationships with other areas. The allowable size is defined by the preferred, smallest, and largest properties. With these properties, it's possible to declare an optimal size, but also allow for flexibility. The atomic property declares whether or not the area can be split into smaller sub-areas, for example to flow text from one page to the next. By default, atomic is false, meaning the area cannot be split.
Alignment and positioning are defined by the Relation class, which encapsulates single relationships between two areas, such as edge attraction and distance apart.
| Constructor Summary | |
Constraint()
Creates a new instance of Constraint. |
|
Constraint(java.awt.Dimension preferred)
Creates a new instance of Constraint. |
|
Constraint(java.awt.Dimension preferred,
boolean atomic)
Creates a new instance of Constraint. |
|
Constraint(java.awt.Dimension preferred,
java.awt.Dimension smallest,
java.awt.Dimension largest,
boolean atomic)
Creates a new instance of Constraint. |
|
| Method Summary | |
void |
addRelations(Relation relations)
Appends a new Relation object into the Constraint. |
Relation |
findRelation(java.lang.Class relationClass)
Searches this Constraint for a Relation object of the given class. |
Relation |
findRelation(java.lang.Class relationClass,
int occurance)
Searches this Constraint for a Relation object of the given class. |
java.awt.Dimension |
getLargest()
Getter for property largest, the maximum size an area can be. |
java.awt.Dimension |
getPreferred()
Getter for property preferred, the optimal size an area can be. |
Relation[] |
getRelations()
Getter for property relations. |
Relation |
getRelations(int index)
Indexed getter for property relations. |
java.awt.Dimension |
getSmallest()
Getter for property smallest, the minimum size an area can be. |
boolean |
isAtomic()
Getter for property atomic, whether the area can be split or not. |
void |
setAtomic(boolean atomic)
Setter for property atomic, whether the area can be split or not. |
static void |
setDefaultSize(java.awt.Dimension size)
Sets the default size for the preferred property. |
void |
setRelations(int index,
Relation relations)
Indexed setter for property relations. |
void |
setRelations(Relation[] relations)
Setter for property relations. |
java.lang.String |
toString()
Creates a String representation of this Constraint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Constraint()
public Constraint(java.awt.Dimension preferred)
preferred - the best size for this area
public Constraint(java.awt.Dimension preferred,
boolean atomic)
preferred - the best size for this areaatomic - true if this area cannot be split across pages
public Constraint(java.awt.Dimension preferred,
java.awt.Dimension smallest,
java.awt.Dimension largest,
boolean atomic)
preferred - the best size for this areasmallest - the smallest possible size for this arealargest - the largest possible size for this areaatomic - true if this area cannot be split across pages| Method Detail |
public static void setDefaultSize(java.awt.Dimension size)
size - the new default preferred valuepublic java.awt.Dimension getPreferred()
public java.awt.Dimension getSmallest()
public java.awt.Dimension getLargest()
public void setAtomic(boolean atomic)
atomic - New value of property atomic.public boolean isAtomic()
public Relation getRelations(int index)
index - Index of the property.
index.public Relation[] getRelations()
public void setRelations(int index,
Relation relations)
index - Index of the property.relations - New value of the property at index.public void setRelations(Relation[] relations)
relations - New value of property relations.public void addRelations(Relation relations)
relations - new Relation object to appendpublic Relation findRelation(java.lang.Class relationClass)
relationClass - class of the Relation to look for
public Relation findRelation(java.lang.Class relationClass,
int occurance)
relationClass - class of the Relation to look foroccurance - how many matches to look for
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||