📄 9016a5e1d9b7001a1e5ff42f2510af1d
字号:
/*
* ====================================================================
* The Vovida Software License, Version 1.0
*
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The names "VOCAL", "Vovida Open Communication Application Library",
* and "Vovida Open Communication Application Library (VOCAL)" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact vocal@vovida.org.
*
* 4. Products derived from this software may not be called "VOCAL", nor
* may "VOCAL" appear in their name, without prior written
* permission of Vovida Networks, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
* IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* ====================================================================
*
* This software consists of voluntary contributions made by Vovida
* Networks, Inc. and many individuals on behalf of Vovida Networks,
* Inc. For more information on Vovida Networks, Inc., please see
* <http://www.vovida.org/>.
*
*/
/**
* Title: <p>
* Description: <p>
* Copyright: Copyright (c) <p>
* Company: <p>
* @author
* @version 1.0
*/
package vocal.ui;
import java.awt.*;
import javax.swing.*;
import vocal.data.AccreditConfigTree;
import vocal.data.DvrAccreditData;
import vocal.data.DvrData;
import vocal.data.OSPData;
import vocal.data.InvalidRequestException;
import vocal.data.ConfigTree;
import vocal.userEditor.AccreditAdd;
import javax.swing.table.TableColumn;
import java.awt.event.*;
/**
* $RCSfile: DVRClientScreen.java,v $
*
* @author $Author: Xing.zhou $, $Date: 2005/10/27 00:42:33 $
* @version $Revision: 1.15 $
*/
public class DVRClientScreen extends FormPanelScreen
{
JPanel jPanel1 = new JPanel();
JScrollPane jScrollPane1 = new JScrollPane();
JPanel jPanel2 = new JPanel();
BorderLayout borderLayout2 = new BorderLayout();
BorderLayout borderLayout1 = new BorderLayout();
AccreditConfigTree configTree1;
DvrAccreditData dataManager;
AccreditAdd mainScreen;
JCheckBox camera1;
JCheckBox camera2;
JCheckBox camera3;
JCheckBox camera4;
JCheckBox camera5;
JCheckBox camera6;
JCheckBox camera7;
JCheckBox camera8;
JCheckBox control1;
JCheckBox control2;
JCheckBox control3;
JCheckBox control4;
JCheckBox control5;
JCheckBox control6;
JCheckBox control7;
JCheckBox control8;
JCheckBox history1;
JCheckBox history2;
JCheckBox history3;
JCheckBox history4;
JCheckBox history5;
JCheckBox history6;
JCheckBox history7;
JCheckBox history8;
JPanel jPanel3 = new JPanel();
FlowLayout flowLayout1 = new FlowLayout();
JPanel jPanel4 = new JPanel();
BorderLayout borderLayout4 = new BorderLayout();
FlowLayout flowLayout2 = new FlowLayout();
JPanel jPanel5 = new JPanel();
JLabel DvrNameLabel = new JLabel();
Box box1;
Box box2;
Box box3;
Box box4;
Box box5;
Box box6;
Box box7;
Box box8;
Box box9;
Box box10;
JButton ok;
JButton cancel;
JPanel tablePanel = new JPanel();
BorderLayout borderLayout3 = new BorderLayout();
JScrollPane jScrollPane2 = new JScrollPane();
JTable jTable1 = new JTable();
TableColumn tableColumn = new TableColumn();
BasicTableModel tableModel = new BasicTableModel();
JPanel jPanel6 = new JPanel();
FlowLayout flowLayout3 = new FlowLayout();
GridLayout gridLayout1 = new GridLayout();
JButton tableAddButton = new JButton();
JButton tableDeleteButton = new JButton();
FlowLayout flowLayout4 = new FlowLayout();
/**
*
* @param screen
*/
public DVRClientScreen(AccreditAdd screen)
{
mainScreen = screen;
try
{
jbInit();
}
catch (Exception e)
{
e.printStackTrace();
}
initTable();
}
/**
*/
private void initTable()
{
jTable1.setModel(tableModel);
tableColumn.setPreferredWidth(120);
tableColumn.setCellEditor(new DefaultCellEditor(new InternalClipboardField()));
jTable1.addColumn(tableColumn);
jTable1.setCellSelectionEnabled(true);
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
/**
*
* 建立右屏内容
*/
private void jbInit() throws Exception
{
box1 = Box.createVerticalBox();
box2 = Box.createVerticalBox();
box3 = Box.createVerticalBox();
box4 = Box.createVerticalBox();
box5 = Box.createVerticalBox();
box6 = Box.createVerticalBox();
box7 = Box.createVerticalBox();
box8 = Box.createVerticalBox();
box9 = Box.createVerticalBox();
box10 = Box.createVerticalBox();
this.setLayout(borderLayout2);
jPanel1.setLayout(borderLayout1);
borderLayout2.setVgap(30);
jPanel2.setLayout(borderLayout4);
borderLayout1.setVgap(20);
jPanel3.setLayout(new BoxLayout(jPanel3, BoxLayout.Y_AXIS));
jPanel4.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0));
jPanel4.setMinimumSize(new Dimension(500, 100));
jPanel4.setPreferredSize(new Dimension(300, 50));
jPanel4.setLayout(flowLayout2);
flowLayout1.setVgap(10);
borderLayout4.setVgap(20);
DvrNameLabel.setForeground(Color.black);
DvrNameLabel.setText("DVR Configure ");
JPanel CameraPane1 = new JPanel();
CameraPane1.setLayout(new BoxLayout(CameraPane1, BoxLayout.X_AXIS));
camera1 = new JCheckBox("摄像头1");
control1 = new JCheckBox("控制");
history1 = new JCheckBox("历史回放");
CameraPane1.add(camera1,null);
CameraPane1.add(control1,null);
CameraPane1.add(history1,null);
JPanel CameraPane2 = new JPanel();
CameraPane2.setLayout(new BoxLayout(CameraPane2, BoxLayout.X_AXIS));
camera2 = new JCheckBox("摄像头2");
control2 = new JCheckBox("控制");
history2 = new JCheckBox("历史回放");
CameraPane2.add(camera2,null);
CameraPane2.add(control2,null);
CameraPane2.add(history2,null);
JPanel CameraPane3 = new JPanel();
CameraPane3.setLayout(new BoxLayout(CameraPane3, BoxLayout.X_AXIS));
camera3 = new JCheckBox("摄像头3");
control3 = new JCheckBox("控制");
history3 = new JCheckBox("历史回放");
CameraPane3.add(camera3,null);
CameraPane3.add(control3,null);
CameraPane3.add(history3,null);
JPanel CameraPane4 = new JPanel();
CameraPane4.setLayout(new BoxLayout(CameraPane4, BoxLayout.X_AXIS));
camera4 = new JCheckBox("摄像头4");
control4 = new JCheckBox("控制");
history4 = new JCheckBox("历史回放");
CameraPane4.add(camera4,null);
CameraPane4.add(control4,null);
CameraPane4.add(history4,null);
JPanel CameraPane5 = new JPanel();
CameraPane5.setLayout(new BoxLayout(CameraPane5, BoxLayout.X_AXIS));
camera5 = new JCheckBox("摄像头5");
control5 = new JCheckBox("控制");
history5 = new JCheckBox("历史回放");
CameraPane5.add(camera5,null);
CameraPane5.add(control5,null);
CameraPane5.add(history5,null);
JPanel CameraPane6 = new JPanel();
CameraPane6.setLayout(new BoxLayout(CameraPane6, BoxLayout.X_AXIS));
camera6 = new JCheckBox("摄像头6");
control6 = new JCheckBox("控制");
history6 = new JCheckBox("历史回放");
CameraPane6.add(camera6,null);
CameraPane6.add(control6,null);
CameraPane6.add(history6,null);
JPanel CameraPane7 = new JPanel();
CameraPane7.setLayout(new BoxLayout(CameraPane7, BoxLayout.X_AXIS));
camera7 = new JCheckBox("摄像头7");
control7 = new JCheckBox("控制");
history7 = new JCheckBox("历史回放");
CameraPane7.add(camera7,null);
CameraPane7.add(control7,null);
CameraPane7.add(history7,null);
JPanel CameraPane8 = new JPanel();
CameraPane8.setLayout(new BoxLayout(CameraPane8, BoxLayout.X_AXIS));
camera8 = new JCheckBox("摄像头8");
control8 = new JCheckBox("控制");
history8 = new JCheckBox("历史回放");
CameraPane8.add(camera8,null);
CameraPane8.add(control8,null);
CameraPane8.add(history8,null);
JPanel ButtonPane = new JPanel();
ButtonPane.setLayout(new BoxLayout(ButtonPane, BoxLayout.X_AXIS));
ButtonPane.setBorder(BorderFactory.createEmptyBorder(50, 0, 0, 0));
ok = new JButton("ok");
ok.addActionListener(this);
/*
ok.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
//AccreditAdd.this.setVisible(false);
}
});
*/
cancel = new JButton("cancel");
cancel.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
//AccreditAdd.this.setVisible(false);
}
});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -