import javax.swing.JPanel; //导入方法依赖的package包/类
/**
* This method creates a so called dead end. This means that originally a class
* should be displayed which was already displayed on a higher level in direction
* to the root node. This was realized to prevent the form generation to be run
* in an endless loop.
*
* @param oscsd the oscsd
* @param className the class name
* @param depth the depth
* @param pan the pan
* @param node the node
*/
private void createOuterDeadEnd(OntologySingleClassSlotDescription oscsd, String className, int depth, JPanel pan, DefaultMutableTreeNode node){
// --- this outer element has no parents which are inner classes
// --- so its added to the mainPanel
final JPanel dataPanel = new JPanel();
dataPanel.setLayout(null);
dataPanel.setToolTipText(oscsd.getSlotName() + "-Panel");
// --- add a JLabel to display the field's name
JLabel valueFieldText = new JLabel();
valueFieldText.setText("" + oscsd.getSlotName() + " ["+oscsd.getSlotVarType()+"] - " + Language.translate("Zyklisch !") + "");
valueFieldText.setBounds(new Rectangle(0, 4, 330, 16));
// --- add both GUI elements to the panel
dataPanel.add(valueFieldText, null);
this.setPanelBounds(dataPanel);
DynType dynType = new DynType(oscsd, DynType.typeCyclic, className, dataPanel, oscsd.getSlotName(), null);
node.add(new DefaultMutableTreeNode(dynType));
// --- set the new position (increment the height) for the parent panel of the
// --- newly created panel
Rectangle pos = dataPanel.getBounds();
pos.x = 10;//tiefe * einrueckungProUntereEbene;
pos.y = pan.getHeight();
dataPanel.setBounds(pos);
pan.add(dataPanel);
this.setPanelBounds(pan);
}