01: /*
02: * Licensed under the Apache License, Version 2.0 (the "License");
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at
05: *
06: * http://www.apache.org/licenses/LICENSE-2.0
07: *
08: * Unless required by applicable law or agreed to in writing, software
09: * distributed under the License is distributed on an "AS IS" BASIS,
10: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11: * See the License for the specific language governing permissions and
12: * limitations under the License.
13: */
14: package org.tp23.antinstaller.renderer.swing;
15:
16: import javax.swing.JPanel;
17:
18: import org.tp23.antinstaller.input.HiddenPropertyInput;
19: import org.tp23.antinstaller.input.OutputField;
20: import org.tp23.gui.GBCF;
21:
22: /**
23: * Swing UI hidden property renderer - displays nothing
24: *
25: * @author mwilson
26: * @version $Id
27: * @since 0.7.4 patch 6
28: */
29: public class HiddenPropertyInputRenderer extends
30: SwingOutputFieldRenderer {
31: HiddenPropertyInput inputField;
32:
33: public void setOutputField(OutputField ioField) {
34: inputField = (HiddenPropertyInput) ioField;
35: inputField.setInputResult(inputField.getDefaultValue());
36: }
37:
38: public void initComponent(JPanel parent) {
39:
40: }
41:
42: public void updateInputField() {
43:
44: }
45:
46: public void updateDefaultValue() {
47: if (!inputField.isEditted()) {
48: inputField.setInputResult(inputField.getDefaultValue());
49: }
50: }
51:
52: public void renderError() {
53:
54: }
55:
56: public int addSelf(JPanel content, GBCF cf, int row,
57: boolean overflow) {
58: return row;
59: }
60: }
|