litesoft
@ 947
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
// This Source Code is in the Public Domain per: http://unlicense.org package org.litesoft.ui.def.nonpublic.support; import org.litesoft.ui.def.*; import org.litesoft.uispecification.*; public abstract class UiCompPlusDef extends UiCompDef { public UiCompPlusDef center() { return centerX().centerY(); } public UiCompPlusDef left() { setAlignX( AlignX.LEFT ); return this; } public UiCompPlusDef centerX() { setAlignX( AlignX.CENTER ); return this; } public UiCompPlusDef right() { setAlignX( AlignX.RIGHT ); return this; } public UiCompPlusDef centerY() { setAlignY( AlignY.CENTER ); return this; } public UiCompPlusDef top() { setAlignY( AlignY.TOP ); return this; } public UiCompPlusDef bottom() { setAlignY( AlignY.BOTTOM ); return this; } public UiCompPlusDef flood() { return floodX().floodY(); } public UiCompPlusDef floodX() { setFloodX( FloodX.YES ); return this; } public UiCompPlusDef floodY() { setFloodY( FloodY.YES ); return this; } public UiCompPlusDef noFlood() { return noFloodX().noFloodY(); } public UiCompPlusDef noFloodX() { setFloodX( FloodX.NO ); return this; } public UiCompPlusDef noFloodY() { setFloodY( FloodY.NO ); return this; } public AlignX getAlignX() { return mAlignX.getValue(); } public void setAlignX( AlignX pAlignX ) { mAlignX.setValue( pAlignX ); } public AlignY getAlignY() { return mAlignY.getValue(); } public void setAlignY( AlignY pAlignY ) { mAlignY.setValue( pAlignY ); } public FloodX getFloodX() { return mFloodX.getValue(); } public void setFloodX( FloodX pFlood ) { mFloodX.setValue( pFlood ); } public FloodY getFloodY() { return mFloodY.getValue(); } public void setFloodY( FloodY pFlood ) { mFloodY.setValue( pFlood ); } public boolean isFloodX() { return FloodX.YES.equals( getFloodX() ); } public boolean isFloodY() { return FloodY.YES.equals( getFloodY() ); } protected void collectDefAttributes( UiD_AttributeCollector pCollector ) { super.collectDefAttributes( pCollector ); pCollector.add( mAlignX ); pCollector.add( mAlignY ); pCollector.add( mFloodX ); pCollector.add( mFloodY ); } private UiD_AttributeAlignX mAlignX = new UiD_AttributeAlignX(); private UiD_AttributeAlignY mAlignY = new UiD_AttributeAlignY(); private UiD_AttributeFloodX mFloodX = new UiD_AttributeFloodX(); private UiD_AttributeFloodY mFloodY = new UiD_AttributeFloodY(); } |