ownerList.setToolTipText("Double click for navigation !");
  private void initLayout() {    new PropPanelButton(this,buttonPanel,_manageContextPropertyTagsIcon,localize("Create / Change / Delete CP-Tags"),"manageContPropTags",null);    new PropPanelButton(this,buttonPanel,_infoContextPropertyTagsIcon,localize("Show defined CP-Tags"),"infoContPropTags",null);    new PropPanelButton(this,buttonPanel,_identifyContextPropertyTagsIcon,localize("Look for special Context Properties"),"identifyContPropTags",null);    new PropPanelButton(this,buttonPanel,_contextPropertyArrow3Icon,localize("Show values in all figures"),"showAllFigureValues",null);    new PropPanelButton(this,buttonPanel,_contextPropertyArrow4Icon,localize("Hide values in all figures"),"hideAllFigureValues",null);    new PropPanelButton(this,buttonPanel,_contextPropertyArrow1Icon,localize("Show / Hide values in the figure"),"showHideFigureValues",null);    new PropPanelButton(this,buttonPanel,_contextPropertyArrow2Icon,localize("Arrange values vertical or horizontal"),"verticalHorizontal",null);    new PropPanelButton(this,buttonPanel,_navUpIcon,localize("Go to referenced model element"),"navigateUp",null);    //new PropPanelButton(this,buttonPanel,_navBackIcon,localize("Go back"),"navigateBackAction","isNavigateBackEnabled");    //new PropPanelButton(this,buttonPanel,_navForwardIcon,localize("Go forward"),"navigateForwardAction","isNavigateForwardEnabled");    new PropPanelButton(this,buttonPanel,_deleteIcon,localize("Delete Context Property"),"removeElement",null);    addCaption("                       Tag Name     : ",1,0,0);    _nameBox = new JComboBox();    //_nameBox.setBackground(Color.yellow);    _nameBox.setBackground(Color.white);    _nameBox.setFont(new java.awt.Font("Dialog", 1, 12));    _nameBox.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {        ProjectBrowser pb = ProjectBrowser.TheInstance;        if (pb.getDetailsTarget() instanceof MContextPropertyValueImpl) {          if (!_locked) { // siehe update() "focus gained"            MContextPropertyValueImpl target = (MContextPropertyValueImpl)pb.getDetailsTarget();            MContextPropertyTagImpl bakTag = (MContextPropertyTagImpl)target.getContextPropertyTag();            String bakTagName = bakTag.getTag();            String newTagName = (String)_nameBox.getSelectedItem();            // jetzt wird getestet, ob der neue Tag noch nicht mit dem referenzierten Modell-            // element in Referenz steht            if (!newTagName.equals(bakTagName)) {              if (tagIsAlreadyAssignedToTarget(newTagName,target.getReferencedModelElement()))  {                JOptionPane.showMessageDialog(null,"The model element \""+((MModelElement)target.getReferencedModelElement()).getName()+"\" has already\n a Context Property \""+newTagName+"\" !");                _locked = true;                _nameBox.setSelectedItem(bakTagName);                _locked = false;                return;              }              if (tagIsStandardTaggedValue(newTagName,target.getReferencedModelElement())) {                JOptionPane.showMessageDialog(null,"The model element \""+((MModelElement)target.getReferencedModelElement()).getName()+"\" has already\n a Tagged Value \""+newTagName+"\" !\nYou should rename this Tagged Value first !");                _locked = true;                _nameBox.setSelectedItem(bakTagName);                _locked = false;                return;              }              target.resetFigureOrientation();              target.resetValueVisibility();              //              MContextPropertyTagImpl refTag = (MContextPropertyTagImpl)_modelIterator.getContextPropertyTag(newTagName);              // 1) CPTag-Referenz aktualisieren              target.setContextPropertyTag(refTag);              // 2) CPValue entsprechend umbenennen (darauf horchen das NavPanel und das TaggedValuesPane)              target.setCPTag(newTagName);              // 3) ... (Values)              _valueTable.getModel().removeTableModelListener(getTableModelListener());              ((ValueTableModel)_valueTable.getModel()).removeAllRows();              _validValuesType = refTag.getValidValuesType();              target.setValidValuesType(_validValuesType);              target.setCPValue("no values selected or defined");              target.setValueString_Horizontal("no values selected or defined ");              target.setValueString_Vertical("\n> no values selected or defined \n");              target.setStereoString("");              _stereoBox.setSelectedItem("");              if (_validValuesType.equals("List Of Strings")) {                _validStrings = refTag.getValidStrings();                _typeLabel.setText("\"List Of Strings\"   [ "+Integer.toString(_validStrings.size())+" defined strings ] )");                _unitLabel.setText("N/A )");                ((ValueTableModel)_valueTable.getModel()).isListOfStrings(true);                ValueTableModel tableModel = (ValueTableModel)_valueTable.getModel();                for (int i = 0; i < _validStrings.size(); i++) {                  tableModel.addTableRow((String)_validStrings.elementAt(i),new Boolean(false),"");                }                _valueTable.getModel().addTableModelListener(getTableModelListener());              }              else if (_validValuesType.equals("Integer Number")) {                int[] range = refTag.getIntegerRange();                _lowerIntRange = range[0];                _upperIntRange = range[1];                _typeLabel.setText("\"Integer Number\""+"   Range : [ "+Integer.toString(_lowerIntRange)+" , "+Integer.toString(_upperIntRange)+" ] )");                _unitLabel.setText(refTag.getUnit()+" )");                ((ValueTableModel)_valueTable.getModel()).isListOfStrings(false);                ((ValueTableModel)_valueTable.getModel()).isIntegerNumber(true);                ValueTableModel tableModel = (ValueTableModel)_valueTable.getModel();                tableModel.addTableRow("",new Boolean(false),"");                _valueTable.getModel().addTableModelListener(getTableModelListener());              }              else if (_validValuesType.equals("Float Number")) {                float[] range = refTag.getFloatRange();                _lowerFloatRange = range[0];                _upperFloatRange = range[1];                _typeLabel.setText("\"Float Number\""+"   Range : [ "+Float.toString(_lowerFloatRange)+" , "+Float.toString(_upperFloatRange)+" ] )");                _unitLabel.setText(refTag.getUnit()+" )");                ((ValueTableModel)_valueTable.getModel()).isListOfStrings(false);                ((ValueTableModel)_valueTable.getModel()).isIntegerNumber(false);                ValueTableModel tableModel = (ValueTableModel)_valueTable.getModel();                tableModel.addTableRow("",new Boolean(false),"");                _valueTable.getModel().addTableModelListener(getTableModelListener());              }              else {}              target.actualizeFigure();              pb.getNavPane().forceUpdate();            }          }        }      }    });    addField(_nameBox,1,0,0);    addCaption("                       Reference    : ",2,0,0);    JList ownerList = new UMLList(new UMLReflectionListModel(this,"owner",false,"getReferencedModelElement",null,null,null),true);    ownerList.addMouseListener(new MouseListener() {      public void mouseExited(MouseEvent me) {}      public void mouseEntered(MouseEvent me) {}      public void mouseReleased(MouseEvent me) {}      public void mousePressed(MouseEvent me) {}      public void mouseClicked(MouseEvent me) {        if (me.getClickCount()==2) navigateReferencedModelElement();      }    });    ownerList.setSelectionBackground(Color.white);    ownerList.setToolTipText("Double click for navigation !");    JScrollPane ownerScroll=new JScrollPane(ownerList,JScrollPane.VERTICAL_SCROLLBAR_NEVER,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);    addLinkField(ownerScroll,2,0,0);    addCaption("                       Namespace  : ",3,0,0);    JList namespaceList = new UMLList(new UMLReflectionListModel(this,"namespace",false,"getNamespace",null,null,null),true);    namespaceList.addMouseListener(new MouseListener() {      public void mouseExited(MouseEvent me) {}      public void mouseEntered(MouseEvent me) {}      public void mouseReleased(MouseEvent me) {}      public void mousePressed(MouseEvent me) {}      public void mouseClicked(MouseEvent me) {        if (me.getClickCount()==2) navigateNamespace();      }    });    namespaceList.setSelectionBackground(Color.white);    namespaceList.setSelectionForeground(Color.blue);    namespaceList.setForeground(Color.blue);    namespaceList.setToolTipText("Double click for navigation !");    JScrollPane namespaceScroll=new JScrollPane(namespaceList,JScrollPane.VERTICAL_SCROLLBAR_NEVER,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);    addField(namespaceScroll,3,0,0);    addCaption("                       Stereotype    : ",4,0,0);    _stereoBox = new JComboBox();    _stereoBox.setBackground(Color.white);    //_stereoBox.setForeground(Color.red);    _stereoBox.setForeground(Color.black);    _stereoBox.setFont(new java.awt.Font("Dialog", 0, 12));    _stereoBox.addItem("");    _stereoBox.addItem("Quality");    _stereoBox.addItem("Implement");    _stereoBox.addItem("Configure");    _stereoBox.addActionListener(new ActionListener() {      public void actionPerformed(ActionEvent e) {        if (!_locked) { // siehe update() "focus gained"          ProjectBrowser pb = ProjectBrowser.TheInstance;          String stereo = "";          if (pb.getDetailsTarget() instanceof MContextPropertyValueImpl) {            MContextPropertyValueImpl target = (MContextPropertyValueImpl)pb.getDetailsTarget();            stereo = (String)_stereoBox.getSelectedItem();            if (!(stereo.equals(target.getStereoString()))) {              target.setStereoString(stereo);              target.actualizeFigure();            }          }        }      }    });    addField(_stereoBox,4,0,0);    _valueTable = new JTable(new ValueTableModel());    _valueTable.getModel().addTableModelListener(this);    _valueTable.getColumnModel().getColumn(0).setResizable(false);    _valueTable.getColumnModel().getColumn(1).setResizable(false);    _valueTable.getColumnModel().getColumn(2).setResizable(false);    _valueTable.getColumnModel().getColumn(1).setMaxWidth(20);    _valueTable.getColumnModel().getColumn(1).setMinWidth(20);    _valueTable.setSelectionBackground(Color.white);    _valueTable.setSelectionForeground(Color.black);    JScrollPane valueTablePane = new JScrollPane(_valueTable);    addCaption("  ",1,1,0);    addCaption("        ( Type ... : ",2,1,0);    _typeLabel = new JLabel("N/A )");    addField(_typeLabel,2,1,0);    addCaption("        ( Unit .... : ",3,1,0);    _unitLabel = new JLabel("N/A )");    addField(_unitLabel,3,1,0);    addCaption("         Values  : ",4,1,0);    addField(valueTablePane,4,1,1);    addCaption("  ",5,1,0);  }