Пример #1
0
    /** {@inheritDoc} */
    @Override
    public void setParent(final MutableTreeNode aNewParent) {
      if (this.parent == aNewParent) {
        // Nothing to do...
        return;
      }

      super.setParent(aNewParent);
    }
Пример #2
0
 /** {@inheritDoc} */
 @Override
 public void setUserObject(Object aUserObject) {
   if ((aUserObject != ROOT_ID) && (aUserObject instanceof String)) {
     setText((String) aUserObject);
   } else if (aUserObject instanceof Boolean) {
     setVisible(((Boolean) aUserObject).booleanValue());
   } else if (aUserObject instanceof IUIElement) {
     super.setUserObject(aUserObject);
   }
 }
Пример #3
0
    /** {@inheritDoc} */
    @Override
    public void insert(final MutableTreeNode aNewChild, final int aChildIndex) {
      super.insert(aNewChild, aChildIndex);

      Object newChildUserObject = ((ElementTreeNode) aNewChild).getUserObject();

      if ((this.userObject instanceof ElementGroup)
          && (newChildUserObject instanceof SignalElement)) {
        // Move the actual element as well...
        ((ElementGroup) this.userObject)
            .moveChannel((SignalElement) newChildUserObject, aChildIndex);
      }
    }