Package org.openquark.cal.services

Examples of org.openquark.cal.services.GemEntity


                if (!evt.getTriggeredObjects().isEmpty()){
                    Object obj = evt.getTriggeredObjects().get(0);

                    if (obj instanceof GemEntity) {

                        GemEntity gemEntity = (GemEntity) obj;
                        IntellicutInfo intellicutInfo = intellicutManager.getIntellicutInfo(gemEntity);
                        AutoburnUnifyStatus autoburnStatus = intellicutInfo.getAutoburnUnifyStatus();

                        if (autoburnStatus != AutoburnUnifyStatus.NOT_POSSIBLE) {

                            tableTop.getUndoableEditSupport().beginUpdate();

                            // Add the new gem to the table top.
                            DisplayedGem dGem = gemCutter.getTableTop().createDisplayedFunctionalAgentGem(new Point(), gemEntity);
                            Point location = tableTop.findAvailableDisplayedGemLocation(dGem);
                            tableTop.doAddGemUserAction(dGem, location);

                            intellicutManager.attemptIntellicutAutoConnect(dGem);
                            intellicutManager.stopIntellicut();

                            // Set the proper undo name.
                            tableTop.getUndoableEditSupport().setEditName(GemCutterMessages.getString("UndoText_Add", dGem.getDisplayText()));                       
                            tableTop.getUndoableEditSupport().endUpdate();
                        }
                    }
                }

            } else {

                gemCutter.getTableTop().getUndoableEditSupport().beginUpdate();

                List<Object> triggeredObjects = evt.getTriggeredObjects();
               
                for (final Object triggeredObj : triggeredObjects) {
   
                    if (triggeredObj instanceof GemEntity) {
                       
                        GemEntity gemEntity = (GemEntity) triggeredObj;
                       
                        if (browserTreeModel.isVisibleGem(gemEntity)) {
                            DisplayedGem dGem = gemCutter.getTableTop().createDisplayedFunctionalAgentGem(new Point(), gemEntity);
                            gemCutter.getTableTop().doAddGemUserAction(dGem);
                        }
View Full Code Here


            } else {

                // If we've hovering over a gem display an appropriate message
                GemTreeNode treeNode = (GemTreeNode) lastPathComponent;
                GemEntity gemEntity = (GemEntity) treeNode.getUserObject();

                if (intellicutManager.getIntellicutMode() == IntellicutManager.IntellicutMode.NOTHING) {
                    statusMessageDisplayer.clearMessage(this);

                } else if (((BrowserTreeModel) gemCutter.getBrowserTree().getModel()).isVisibleGem(gemEntity)) {
View Full Code Here

            return entityList.get(0);
        } else if (flavour.equals(DataFlavor.stringFlavor)) {

            // Otherwise it's the string version we're returning
            // We only want the first element in the selection
            GemEntity gemEntity = entityList.get(0);
   
            // return the unqualified name of the gem
            return gemEntity.getName().getUnqualifiedName();
        } else {
            throw  new UnsupportedFlavorException(flavour);
        }
    }
View Full Code Here

        Action action = new AbstractAction(GemCutter.getResourceString("PopItem_ViewGemProperties")) {

            private static final long serialVersionUID = 945262478582661871L;

            public void actionPerformed(ActionEvent e) {
                GemEntity gemEntity = faGem.getGemEntity();
                gemCutter.getNavigatorOwner().displayMetadata(gemEntity, true);
            }
        };
       
        return action;
View Full Code Here

                    // Increment the update level for the edit undo.  This will aggregate the drops.
                    tableTop.getUndoableEditSupport().beginUpdate();

                    // Now create the gems.  Start out with the first one
                    GemEntity gemEntity = (GemEntity)scs.get(0);
                    DisplayedGem dGem = tableTop.createDisplayedFunctionalAgentGem(dropXY, gemEntity);
                   
                    // Adjust so that the the middle of the first gem appears under the pointer.
                    Rectangle dGemBounds = dGem.getBounds();
                    int halfGemWidth = dGemBounds.width / 2;
View Full Code Here

TOP

Related Classes of org.openquark.cal.services.GemEntity

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.