|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.forms.layout.PrototypeSize
public final class PrototypeSize
A Size implementation that computes its width and height
by a prototype String.
Examples:
new PrototypeSize("123-456-789");
new FormLayout("p, 2dlu, 'MMMM'");
Size,
Sizes,
Serialized Form| Constructor Summary | |
|---|---|
PrototypeSize(String prototype)
Constructs a PrototypeSize for the given String. |
|
| Method Summary | |
|---|---|
boolean |
compressible()
Describes if this Size can be compressed, if container space gets scarce. |
String |
encode()
Returns a parseable string representation of this prototype size. |
boolean |
equals(Object o)
Indicates whether some other ConstantSize is "equal to" this one. |
String |
getPrototype()
Returns this size's prototype string. |
int |
hashCode()
Returns a hash code value for the object. |
int |
maximumSize(Container container,
List components,
FormLayout.Measure minMeasure,
FormLayout.Measure prefMeasure,
FormLayout.Measure defaultMeasure)
Computes and returns the width of this Size's prototype in pixel. |
String |
toString()
Returns a string representation of this size object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PrototypeSize(String prototype)
prototype - the String used to compute the width and height.
NullPointerException - if prototype is null.| Method Detail |
|---|
public String getPrototype()
public int maximumSize(Container container,
List components,
FormLayout.Measure minMeasure,
FormLayout.Measure prefMeasure,
FormLayout.Measure defaultMeasure)
container for the default dialog font
provided by DefaultUnitConverter.getDefaultDialogFont().
Invoked by FormSpec to determine
the size of a column or row.
maximumSize in interface Sizecontainer - the layout containercomponents - the list of components used to compute the sizeminMeasure - the measure that determines the minimum sizesprefMeasure - the measure that determines the preferred sizesdefaultMeasure - the measure that determines the default sizes
stringWidth for this size's prototype string
computed by the container's FontMetrics for the
DefaultUnitConverter's default dialog fontpublic boolean compressible()
#compressedSizes
to check whether a column or row can be compressed or not.PrototypeSizes are incompressible.
compressible in interface Sizefalsepublic String encode()
encode in interface Sizepublic boolean equals(Object o)
equals in class Objecto - the Object with which to compare
true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
Hashtablepublic int hashCode()
java.util.Hashtable.
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic String toString()
encode() instead.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||