📄 popedomviewpanel.java
字号:
package com.ciash.bms.gui.impl;
import com.ciash.bms.entity.Popedom;
import com.ciash.bms.gui.selecter.PopedomSelecterPanel;
import java.awt.*;
import javax.swing.*;
import com.ciash.common.gui.*;
/**
* <p>
* Title: BMS
* </p>
* <p>
* Description:
* </p>
* <p>
* Copyright: Copyright (c) 2009
* </p>
* <p>
* Company: Cigarette Ash Inc.
* </p>
*
* @author Cigarette Ash
* @version 1.0
*/
public class PopedomViewPanel extends PopedomSelecterPanel {
GridBagLayout gridBagLayout5 = new GridBagLayout();
JCheckBox canEdtiUser = new JCheckBox();
JCheckBox canDelUser = new JCheckBox();
GridBagLayout gridBagLayout2 = new GridBagLayout();
GroupPanel jPanel3 = new GroupPanel("用户权力指派权限设置");
GroupPanel jPanel1 = new GroupPanel("用户管理权限设置");
GridBagLayout gridBagLayout1 = new GridBagLayout();
JCheckBox canAddBook = new JCheckBox();
JCheckBox canEditPop = new JCheckBox();
GridBagLayout gridBagLayout4 = new GridBagLayout();
JCheckBox canEditBook = new JCheckBox();
GroupPanel jPanel2 = new GroupPanel("书籍管理权限设置");
JCheckBox canDelBook = new JCheckBox();
JCheckBox canAddUser = new JCheckBox();
GridBagLayout gridBagLayout3 = new GridBagLayout();
public PopedomViewPanel() {
jbInit();
}
public void setSelectPop(Popedom pop) {
this.canAddBook.setSelected(pop.isCanAddBook());
this.canDelUser.setSelected(pop.isCanDelBook());
this.canEditBook.setSelected(pop.isCanEditBook());
this.canAddUser.setSelected(pop.isCanAddUser());
this.canEdtiUser.setSelected(pop.isCanEditUser());
this.canDelUser.setSelected(pop.isCanDelUser());
this.canDelBook.setSelected(pop.isCanDelBook());
this.canEditPop.setSelected(pop.isCanEditPop());
}
public Popedom getSelectPop() {
Popedom pop = new Popedom();
pop.setCanAddBook(canAddBook.isSelected());
pop.setCanEditBook(canEditBook.isSelected());
pop.setCanDelBook(canDelBook.isSelected());
pop.setCanAddUser(canAddUser.isSelected());
pop.setCanEditUser(canEdtiUser.isSelected());
pop.setCanDelBook(canDelBook.isSelected());
pop.setCanDelUser(canDelUser.isSelected());
pop.setCanEditPop(canEditPop.isSelected());
return pop;
}
private void jbInit() {
jPanel3.setLayout(gridBagLayout4);
canDelUser.setText("用户删除");
canEdtiUser.setText("用户修改");
this.setLayout(gridBagLayout3);
jPanel1.setLayout(gridBagLayout1);
canAddBook.setText("书籍添加");
canEditPop.setText("用户权力修改");
canEditBook.setText("书籍修改");
jPanel2.setLayout(gridBagLayout2);
canDelBook.setText("书籍删除");
canAddUser.setText("用户添加");
jPanel1.add(canAddUser, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
16, 22, 0, 19), 17, 0));
jPanel1.add(canEdtiUser, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
7, 22, 0, 19), 17, 0));
jPanel1.add(canDelUser, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
8, 22, 20, 19), 17, 0));
this.add(jPanel2, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
0, -3, 0, 0), 48, 3));
jPanel2.add(canAddBook, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
17, 16, 0, 36), 17, 0));
jPanel2.add(canEditBook, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
7, 16, 0, 36), 17, 0));
jPanel2.add(canDelBook, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
9, 16, 19, 36), 17, 0));
this.add(jPanel3, new GridBagConstraints(0, 1, 2, 1, 1.0, 1.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
0, -3, 1, 1), 0, 0));
jPanel3.add(canEditPop, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
20, 140, 23, 230), 0, 0));
this.add(jPanel1, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
0, 0, 0, 1), 48, 4));
}
public void setEditable(boolean isEdit) {
canAddBook.setEnabled(isEdit);
canAddUser.setEnabled(isEdit);
canDelBook.setEnabled(isEdit);
canDelUser.setEnabled(isEdit);
canEditBook.setEnabled(isEdit);
canEdtiUser.setEnabled(isEdit);
canEditPop.setEnabled(isEdit);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -