01: /************************************************************************
02: Copyright 2004 Emil Kirschner
03:
04: Licensed under the Apache License, Version 2.0 (the "License");
05: you may not use this file except in compliance with the License.
06: You may obtain a copy of the License at
07:
08: http://www.apache.org/licenses/LICENSE-2.0
09:
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: ************************************************************************/package com.thekirschners.uitoys.autoui.samples.objectmodel;
16:
17: import com.thekirschners.uitoys.autoui.annotations.Editable;
18: import com.thekirschners.uitoys.autoui.annotations.EditorHints;
19: import com.thekirschners.uitoys.autoui.annotations.LabelHints;
20: import com.thekirschners.uitoys.autoui.annotations.SeparationHints;
21:
22: import javax.swing.*;
23: import java.awt.*;
24:
25: @Editable(uiName="MySampleUIObject",orderBase=0)
26: public class SampleUIObject {
27: @EditorHints(order=0,editorClass=JTextField.class,gridwidth=GridBagConstraints.REMAINDER)
28: @LabelHints(uiLabel="Login name: ",weightx=0)
29: @SeparationHints(placement=SeparationHints.Placement.BEFORE)
30: private String loginName;
31:
32: @EditorHints(order=1,editorClass=JTextField.class)
33: @LabelHints(uiLabel="First name: ",weightx=0)
34: private String firstName;
35:
36: @EditorHints(order=1,editorClass=JTextField.class,gridwidth=GridBagConstraints.REMAINDER)
37: @LabelHints(uiLabel="Last name: ",weightx=0,gridwidth=2)
38: private String lastName;
39:
40: @EditorHints(order=3,editorClass=JCheckBox.class,gridwidth=GridBagConstraints.REMAINDER)
41: @LabelHints(uiLabel="boolean field: ",weightx=0)
42: @SeparationHints(placement=SeparationHints.Placement.AFTER)
43: private boolean booTest;
44:
45: @EditorHints(order=3,editorClass=JCheckBox.class,gridwidth=GridBagConstraints.REMAINDER)
46: @LabelHints(uiLabel="integer field: ",weightx=0)
47: private int intTest;
48:
49: public String getLoginName() {
50: return loginName;
51: }
52:
53: public void setLoginName(String loginName) {
54: this .loginName = loginName;
55: }
56:
57: public String getFirstName() {
58: return firstName;
59: }
60:
61: public void setFirstName(String firstName) {
62: this .firstName = firstName;
63: }
64:
65: public String getLastName() {
66: return lastName;
67: }
68:
69: public void setLastName(String lastName) {
70: this .lastName = lastName;
71: }
72:
73: public boolean isBooTest() {
74: return booTest;
75: }
76:
77: public void setBooTest(boolean booTest) {
78: this .booTest = booTest;
79: }
80:
81: public int getIntTest() {
82: return intTest;
83: }
84:
85: public void setIntTest(int intTest) {
86: this.intTest = intTest;
87: }
88: }
|