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 |
// This Source Code is in the Public Domain per: http://unlicense.org package org.litesoft.GWT.client.widgets.datatables; import com.google.gwt.gen2.table.client.property.*; public class PaddingProperty extends ColumnProperty { private static PaddingProperty sDefaultLeft = new PaddingProperty( 4 ); private static PaddingProperty sDefaultRight = new PaddingProperty( 4 ); private static PaddingProperty sDefaultTop = new PaddingProperty( 4 ); private static PaddingProperty sDefaultBottom = new PaddingProperty( 4 ); public static final Type<PaddingProperty> LEFT = new Type<PaddingProperty>() { @Override public PaddingProperty getDefault() { return sDefaultLeft; } }; public static final Type<PaddingProperty> RIGHT = new Type<PaddingProperty>() { @Override public PaddingProperty getDefault() { return sDefaultRight; } }; public static final Type<PaddingProperty> TOP = new Type<PaddingProperty>() { @Override public PaddingProperty getDefault() { return sDefaultTop; } }; public static final Type<PaddingProperty> BOTTOM = new Type<PaddingProperty>() { @Override public PaddingProperty getDefault() { return sDefaultBottom; } }; public static int getDefaultLeft() { return sDefaultLeft.getValue(); } public static void setDefaultLeft( int pValue ) { sDefaultLeft = new PaddingProperty( pValue ); } public static int getDefaultRight() { return sDefaultRight.getValue(); } public static void setDefaultRight( int pValue ) { sDefaultRight = new PaddingProperty( pValue ); } public static int getDefaultTop() { return sDefaultTop.getValue(); } public static void setDefaultTop( int pValue ) { sDefaultTop = new PaddingProperty( pValue ); } public static int getDefaultBottom() { return sDefaultBottom.getValue(); } public static void setDefaultBottom( int pValue ) { sDefaultBottom = new PaddingProperty( pValue ); } public static void setDefaults( int pTop, int pRight, int pBottom, int pLeft ) { setDefaultTop( pTop ); setDefaultRight( pRight ); setDefaultBottom( pBottom ); setDefaultLeft( pLeft ); } private final int mValue; private PaddingProperty( int pValue ) { mValue = pValue; } public int getValue() { return mValue; } } |