This repository has been archived on 2024-04-22. You can view files and clone it, but cannot push or open issues or pull requests.
SecureUML-GUI/src/ch/ethz/infsec/secureumlgui/gui/SecureUmlExcpPermissionComp...

66 lines
1.4 KiB
Java

package ch.ethz.infsec.secureumlgui.gui;
import java.awt.Dimension;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import ch.ethz.infsec.secureumlgui.util.ExcpPermissionDummy;
import ch.ethz.infsec.secureumlgui.util.PermissionDummy;
/**
*
*
*/
public class SecureUmlExcpPermissionComponent extends
SecureUmlPermissionComponent {
JLabel lbExcpLevel;
JTextField txExcpLevel;
public SecureUmlExcpPermissionComponent()
{
super();
initExcpComponents();
}
private void initExcpComponents() {
super.lbName.setText("Exception Permission Name: ");
lbExcpLevel = new JLabel("Exception Level: ");
txExcpLevel = new JTextField();
txExcpLevel.setEditable(false);
}
//hack...
protected void addAdditionalPanels(JPanel boxes) {
lbExcpLevel = new JLabel("Exception Level: ");
txExcpLevel = new JTextField();
txExcpLevel.setEditable(false);
JPanel excpLevel = new JPanel();
excpLevel.setLayout(new BoxLayout(excpLevel, BoxLayout.LINE_AXIS));
excpLevel.setMaximumSize(new Dimension(1000,20));
excpLevel.add(lbExcpLevel);
excpLevel.add(txExcpLevel);
boxes.add(excpLevel);
}
public void setDisplayedPermission(ExcpPermissionDummy displayedPermission) {
super.setDisplayedPermission(displayedPermission);
}
}