1 /* 
2  * Copyright 2005 Paul Hinds
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.tp23.antinstaller.renderer.swing;
17
18import java.awt.Dimension;
19/**
20 * Extracted contants with aim of making these variables configurable
21 * @author teknopaul
22 */
23public class SizeConstants {
24
25    // Page size constants
26    public static int PAGE_WIDTH = 472; // orig value 472
27    public static int PAGE_HEIGHT = 400;// orig value 400
28    public static int LABEL_WIDTH = 175;// orig value 175
29    
30    public static int TITLE_IMAGE_HEIGHT = 100;
31    public static int TITLE_PANEL_HEIGHT = 75; // suspect this is irrelevant
32
33    // Field size constants
34    public static int LEFT_INDENT = 15;
35    public static int TOP_INDENT = 8;
36    public static int BUTTON_WIDTH = 90; // file and directory chooser
37    public static int FIELD_HEIGHT = 20;// field Y
38    public static int FIELD_WIDTH = SizeConstants.PAGE_WIDTH - SizeConstants.LABEL_WIDTH - SizeConstants.LEFT_INDENT;
39    public static int SHORT_FIELD_WIDTH = FIELD_WIDTH - SizeConstants.BUTTON_WIDTH;
40    // overflow resizing
41    // in the gridbaglayout is seems that only preferred size
42    // is significant
43    private static int OVERFLOW_REDUCTION = 40;
44    public static Dimension OVERFLOW_FIELD_SIZE = new Dimension(FIELD_WIDTH - OVERFLOW_REDUCTION, FIELD_HEIGHT);
45    public static Dimension OVERFLOW_SHORT_FIELD_SIZE = new Dimension(FIELD_WIDTH - SizeConstants.BUTTON_WIDTH - OVERFLOW_REDUCTION, FIELD_HEIGHT);
46    public static Dimension OVERFLOW_TOTAL_SIZE = new Dimension(FIELD_WIDTH + SizeConstants.LABEL_WIDTH - OVERFLOW_REDUCTION, FIELD_HEIGHT);
47
48}
49