Package edu.indiana.extreme.xbaya.component.registry

Examples of edu.indiana.extreme.xbaya.component.registry.ComponentReference


     */
    private void select(TreePath treePath) {
        logger.entering(treePath);
        final ComponentTreeNode selectedNode = (ComponentTreeNode) treePath
                .getLastPathComponent();
        final ComponentReference componentReference = selectedNode
                .getComponentReference();
        selectComponent(null);
        this.selectedComponentReference = null;
        if (componentReference != null) {
            this.selectedComponentReference = componentReference;
            new Thread() {
                @Override
                public void run() {
                    try {
                        // get all components and check the number of
                        // components. If there are multiple, expand the tree.
                        final List<? extends Component> components = componentReference
                                .getComponents();
                        if (components.size() == 1) {
                            selectComponent(components.get(0));
                        } else {
                            SwingUtilities.invokeLater(new Runnable() {
View Full Code Here


        logger.exiting();
    }

    private void expandTreeLeaf(ComponentTreeNode selectedNode,
            List<? extends Component> components) {
        ComponentReference componentReference = selectedNode
                .getComponentReference();
        ComponentTreeNode newNode = new ComponentTreeNode(componentReference
                .getName());

        ComponentTreeNode parent = (ComponentTreeNode) selectedNode.getParent();
        int index = this.treeModel.getIndexOfChild(parent, selectedNode);
        this.treeModel.removeNodeFromParent(selectedNode);
View Full Code Here

  private void drop(final DropTargetDropEvent event) {
    logger.entering(new Object[] { event });
    Transferable transferable = event.getTransferable();
    try {
      // Cannot cast transferable.
      final ComponentReference componentReference = (ComponentReference) transferable
          .getTransferData(ComponentSourceTransferable.FLAVOR);
      final Point location = event.getLocation();

      // The component might not have loaded if the network is slow.
      new Thread() {
        @Override
        public void run() {
          try {
            Component component = componentReference.getComponent();
            addNode(component, location);
            // To be able to delete the added node by the keyboard.
            GraphCanvas.this.panel.requestFocusInWindow();
            // XXX this sometimes throws exception.
            event.dropComplete(true);
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.component.registry.ComponentReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.