田源
2024-03-07 4b4083fd73dc27ece42f4835483565eef0e4f608
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
package com.vci.client.portal.UI.dialog;
 
import java.util.Map;
 
import javax.swing.JPanel;
 
 
 
/**
 * VCI平台公共向导窗口中某步骤的Panel基类
 * @Title        :VCIGuideStepPanel.java
 * @Description    : 
 * @Copyright    :宏博远达科技有限公司
 * @Author        :平台与规划部/ZhongGY/E-mail:zhonggy@vci-tech.com
 * @Date        :2015-6-4
 * @Version        :1
 * @Other        :产生注释:Alt+Shift+J
 */
public abstract class VCIGuideStepPanel extends JPanel {
    
    private static final long serialVersionUID = 1L;
    /**
     * 所属的向导窗口
     */
    private VCICommonGuideDialog ownParent = null;
    
    private Map<String, Object> guidCommonShareData = null;
 
    /**
     * 前一步骤UI
     */
    private VCIGuideStepPanel preStepUI = null;
    /**
     * 后一步骤UI
     */
    private VCIGuideStepPanel nextStepUI = null;
 
    public VCICommonGuideDialog getOwnParent() {
        if (ownParent == null && preStepUI != null) {
            ownParent = preStepUI.getOwnParent();
        }
        return ownParent;
    }
    
    /**
     * 向导各步骤页面的共享数据
     * @Title        :getGuidCommonShareData
     * @Description    :
     * @return
     */
    @SuppressWarnings("deprecation")
    public Map<String, Object> getGuidCommonShareData() {
        guidCommonShareData =  (Map<String, Object>)this.getOwnParent().getDialogCommonShareData();
        return guidCommonShareData;
    }
 
    public void setOwnParent(VCICommonGuideDialog ownParent) {
        this.ownParent = ownParent;
    }
 
    public VCIGuideStepPanel getPreStepUI() {
        return preStepUI;
    }
 
    public void setPreStepUI(VCIGuideStepPanel preStepUI) {
        this.preStepUI = preStepUI;
    }
 
    public VCIGuideStepPanel getNextStepUI() {
        return nextStepUI;
    }
 
    public void setNextStepUI(VCIGuideStepPanel nextStepUI) {
        this.nextStepUI = nextStepUI;
    }
    
    String dialogProcess = "";    //[第X步/共X步]
    public String getDialogProcess() {
        //TODO:
        return dialogProcess;
    }
    
    /**
     * 初始化界面(非强制的规范)
     * @Title        :initUI
     * @Description    :
     */
    public abstract void initUI();
    /**
     * 初始化界面数据(非强制的规范)
     * @Title        :initData
     * @Description    :
     */
    public abstract void initData();
    /**
     * 当前步骤名称:如"第一步:预览与校验"
     * @Title        :getStepName
     * @Description    :
     * @return
     */
    public abstract String getStepName();
    
    /**
     * 上一步按钮是否可见(通常第一步不可见)
     * @Title        :isPreBtnVisible
     * @Description    :
     * @return
     */
    public abstract boolean isPreBtnVisible();
    /**
     * 上一步按钮名称(默认为"上一步")
     * @Title        :getPreBtnText
     * @Description    :
     * @return
     */
    public abstract String getPreBtnText();
    /**
     * 上一步按钮的事件触发
     * @Title        :doPreBtnAction
     * @Description    :
     * @return
     */
    public abstract boolean doPreBtnAction();
    
    /**
     * 下一步按钮是否可见(通常最后一步不可见)
     * @Title        :isNextBtnVisible
     * @Description    :
     * @return
     */
    public abstract boolean isNextBtnVisible();
    /**
     * 下一步按钮名称(通常会修改,如"导出"/"导入")
     * @Title        :getNextBtnText
     * @Description    :
     * @return
     */
    public abstract String getNextBtnText();
    /**
     * 下一步按钮触发事件
     * @Title        :doNextBtnAction
     * @Description    :
     * @return
     */
    public abstract boolean doNextBtnAction();
    
    /**
     * 取消按钮是否可见(一般都可见)
     * @Title        :isCancelBtnVisible
     * @Description    :
     * @return
     */
    public abstract boolean isCancelBtnVisible();
    /**
     * 取消按钮名称(一般就是“取消”;但最后一步通常为"完成")
     * @Title        :getcancelBtnText
     * @Description    :
     * @return
     */
    public abstract String getcancelBtnText();
    
/*    *//**
     * 设置下一按钮是否可见(一般最后一步骤不可见)
     * @Title        :setNextBtnVisible
     * @Description    :
     * @param b
     *//*
    abstract void setNextBtnVisible(boolean b) ;*/
}