001: /*
002: * $Id:$
003: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
004: *
005: * http://izpack.org/
006: * http://izpack.codehaus.org/
007: *
008: * Copyright 2006 Klaus Bartz
009: *
010: * Licensed under the Apache License, Version 2.0 (the "License");
011: * you may not use this file except in compliance with the License.
012: * You may obtain a copy of the License at
013: *
014: * http://www.apache.org/licenses/LICENSE-2.0
015: *
016: * Unless required by applicable law or agreed to in writing, software
017: * distributed under the License is distributed on an "AS IS" BASIS,
018: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019: * See the License for the specific language governing permissions and
020: * limitations under the License.
021: */
022: package com.izforge.izpack.gui;
023:
024: import javax.swing.SwingConstants;
025:
026: /**
027: * Interface with some constants used by or for the IzPanelLayout.
028: *
029: * @author Klaus Bartz
030: *
031: */
032: public interface LayoutConstants extends SwingConstants {
033:
034: /** Identifier for gaps between labels. */
035: final static int LABEL_GAP = -1;
036:
037: /** Identifier for gaps between text fields. */
038: final static int TEXT_GAP = -2;
039:
040: /** Identifier for gaps between controls like radio buttons/groups. */
041: final static int CONTROL_GAP = -3;
042:
043: /** Identifier for gaps between paragraphs. */
044: final static int PARAGRAPH_GAP = -4;
045:
046: /** Identifier for gaps between labels and text fields. */
047: final static int LABEL_TO_TEXT_GAP = -5;
048:
049: /** Identifier for gaps between labels and controls like radio buttons/groups. */
050: final static int LABEL_TO_CONTROL_GAP = -6;
051:
052: /** Identifier for gaps between text fields and labels. */
053: final static int TEXT_TO_LABEL_GAP = -7;
054:
055: /** Identifier for gaps between controls like radio buttons/groups and labels. */
056: final static int CONTROL_TO_LABEL_GAP = -8;
057:
058: /** Identifier for gaps between controls like radio buttons/groups and text components. */
059: final static int CONTROL_TO_TEXT_GAP = -9;
060:
061: /** Identifier for gaps between text components and controls like radio buttons/groups and labels */
062: final static int TEXT_TO_CONTROL_GAP = -10;
063:
064: /** Identifier for gaps between panel top and the first control. */
065: final static int TOP_GAP = -11;
066:
067: /** Identifier for all gaps. */
068: final static int ALL_GAP = -12;
069:
070: /** Identifier for gaps for filler. */
071: final static int NO_GAP = -13;
072:
073: /** Identifier for gaps for filler. */
074: final static int FILLER1_GAP = -14;
075:
076: /** Identifier for gaps for filler. */
077: final static int FILLER2_GAP = -15;
078:
079: /** Identifier for gaps for filler. */
080: final static int FILLER13_GAP = -16;
081:
082: /** Identifier for gaps for filler. */
083: final static int FILLER4_GAP = -17;
084:
085: /** Identifier for gaps for filler. */
086: final static int FILLER5_GAP = -18;
087:
088: /** Identifier for gaps to be evaluated automatically at a late time. */
089: final static int AUTOMATIC_GAP = -19;
090:
091: /** Identifier for gaps load marker. */
092: final static int GAP_LOAD_MARKER = 0;
093:
094: /** Identifier for relative row positioning (next). */
095: public static final int NEXT_ROW = -1;
096:
097: /** Identifier for relative row positioning (current). */
098: public static final int CURRENT_ROW = -2;
099:
100: /** Identifier for relative column positioning (next). */
101: public static final int NEXT_COLUMN = -1;
102:
103: /** Identifier for relative column positioning (current). */
104: public static final int CURRENT_COLUMN = -2;
105:
106: /**
107: * Identifier for using the default alignment defined for labels. The value will be resolved at
108: * layouting, therefore it is possible to change the default values in </code>IzPanelConstraints</code>.
109: */
110: public static final int DEFAULT_LABEL_ALIGNMENT = -1;
111:
112: /**
113: * Identifier for using the default alignment defined for text fields. The value will be
114: * resolved at layouting, therefore it is possible to change the default values in </code>IzPanelConstraints</code>.
115: */
116: public static final int DEFAULT_TEXT_ALIGNMENT = -2;
117:
118: /**
119: * Identifier for using the default alignment defined for other controls. The value will be
120: * resolved at layouting, therefore it is possible to change the default values in </code>IzPanelConstraints</code>.
121: */
122: public static final int DEFAULT_CONTROL_ALIGNMENT = -3;
123:
124: /** Identifier for the default label constraints. */
125: public static final int LABEL_CONSTRAINT = 0;
126:
127: /** Identifier for the default text component constraints. */
128: public static final int TEXT_CONSTRAINT = 1;
129:
130: /** Identifier for the default for other control constraints. */
131: public static final int CONTROL_CONSTRAINT = 2;
132:
133: /** Identifier for the default multi line label constraints. */
134: public static final int FULL_LINE_COMPONENT_CONSTRAINT = 3;
135:
136: /**
137: * Identifier for the default constraints for controls/container which are variable in x and y
138: * dimension.
139: */
140: public static final int XY_VARIABLE_CONSTRAINT = 4;
141:
142: /** Identifier for the default constraint used by a filler with x direction. */
143: public static final int XDUMMY_CONSTRAINT = 5;
144:
145: /** Identifier for the default constraint used by a filler with y direction. */
146: public static final int YDUMMY_CONSTRAINT = 6;
147:
148: /** Identifier for the default constraint used by a filler with y direction. */
149: public static final int FULL_LINE_CONTROL_CONSTRAINT = 7;
150:
151: /** Constant used to specify that no action should be done. Useable for X- and Y_STRETCH. */
152: public static final int NO_STRETCH = 0;
153:
154: /** X- and Y_STRETCH constant used to specify relative weighting of stretch factors. */
155: public static final int RELATIVE_STRETCH = 1;
156:
157: /** X- and Y_STRETCH constant used to specify absolute weighting of stretch factors. */
158: public static final int ABSOLUTE_STRETCH = 2;
159:
160: /**
161: * X_STRETCH "symbolic" value to signal that the configurable default stretch value should be
162: * used.
163: */
164: public static final double FULL_LINE_STRETCH = -1.0;
165:
166: /**
167: * Y_STRETCH "symbolic" value to signal that the configurable default stretch value should be
168: * used.
169: */
170: public static final double FULL_COLUMN_STRETCH = -2.0;
171:
172: /**
173: * Object constant used as "constraint" at add a component to the IzPanel to signal that this
174: * component should be place in the next line.
175: */
176: public static final String NEXT_LINE = "nextLine";
177:
178: /**
179: * Flag used in the IzPanelLayout manager to trigger expansion of all components to the netto
180: * width of a column.
181: */
182: public static final int NO_FILL_OUT_COLUMN = 0;
183:
184: /**
185: * Flag used in the IzPanelLayout manager to trigger expansion of all components to the netto
186: * width of a column.
187: */
188: public static final int FILL_OUT_COLUMN_WIDTH = 1;
189:
190: /**
191: * Flag used in the IzPanelLayout manager to trigger expansion of all components to the netto
192: * width of a column.
193: */
194: public static final int FILL_OUT_COLUMN_HEIGHT = 2;
195:
196: /**
197: * Flag used in the IzPanelLayout manager to trigger expansion of all components to the netto
198: * width of a column.
199: */
200: public static final int FILL_OUT_COLUMN_SIZE = 3;
201:
202: }
|