Four Values on Average
-
Documentation WTF in JDK 1.6.0_20*. Yes, I'm bored.
public class FlowLayout implements LayoutManager, java.io.Serializable {
...
/**
* <code>align</code> is the property that determines
* how each row distributes empty space.
* It can be one of the following values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* </ul>
*
* @serial
* @see #getAlignment
* @see #setAlignment
*/
int align; // This is for 1.1 serialization compatibility
/**
* <code>newAlign</code> is the property that determines
* how each row distributes empty space for the Java 2 platform,
* v1.2 and greater.
* It can be one of the following three values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* </ul>
*
* @serial
* @since 1.2
* @see #getAlignment
* @see #setAlignment
*/
int newAlign; // This is the one we actually use
...
public void setAlignment(int align) {
this.newAlign = align;
// this.align is used only for serialization compatibility,
// so set it to a value compatible with the 1.1 version
// of the class
switch (align) {
case LEADING:
this.align = LEFT;
break;
case TRAILING:
this.align = RIGHT;
break;
default:
this.align = align;
break;
}
}* I know there is a newer version, but I'm not going to try it. I have no idea why They™ stripped most debug info from recent JDKs. Also, why did They™ merge java.sun.com and www.oracle.com? Lots of links to technical articles on that site are broken now.
-
You should have posted this in the IHOC
But again WHYYYYYYY? would they do that since it changes NOTHING (except constants names)
-
@fatbull said:
It can be one of the following three values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* </ul>
-
@HighlyPaidContractor said:
@fatbull said:
It can be one of the following three values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* </ul>Amongst our values...are such elements as LEFT, RIGHT.... I'll come in again.
-
Technically it's still 3 values, since LEADING == LEFT and TRAILING == RIGHT. :p
The fact this has been around since JDK 1.2 shows exactly how much anyone cares about Java.
-
@The_Assimilator said:
Technically it's still 3 values, since LEADING == LEFT and TRAILING == RIGHT. :p
Actually, it's still five values.
setAlignment
limits the other align field to three values.Filed under: missing <li> tags
-
// This is for 1.1 serialization compatibility
This is for 1.1 serialization compatibility.