Package org.openquark.gems.client

Examples of org.openquark.gems.client.ValueGem$ValuePart


    /**
     * @see org.openquark.samples.bam.model.InputBinding#getOutputGem(BasicCALServices, org.openquark.gems.client.GemGraph, org.openquark.samples.bam.BindingContext)
     */
    @Override
    public Gem getOutputGem (BasicCALServices calServices, GemGraph gemGraph, BindingContext bindingContext) {
        ValueGem constantGem = new GemFactory(calServices).makeValueGem(value);
       
        gemGraph.addGem(constantGem);
       
        return constantGem;
    }
View Full Code Here


        this.userObject = node.getUserObject();
        this.tree = tree;
        this.editorComponent = null;
       
        if (userObject instanceof ValueGem) {
            ValueGem valueGem = (ValueGem)userObject;
            Gem connectedGem = valueGem.getOutputPart().getConnectedGem();
            int connectedInputNum = valueGem.isConnected() ? valueGem.getOutputPart().getConnection().getDestination().getInputNum() : -1;
            QualifiedName entityName = null;
            if (connectedGem instanceof FunctionalAgentGem) {
                entityName = ((FunctionalAgentGem)connectedGem).getName();
            }
               
            ValueEditorDirector ved = tableTopExplorer.getValueEditorDirector();
            ValueEditor valueEditor = ved.getRootValueEditor(
                                                tableTopExplorer.getValueEditorHierarchyManager(),
                                                valueGem.getValueNode(),
                                                entityName,
                                                connectedInputNum,
                                                connectedGem == null ? null : tableTopExplorer.getMetadataRunner(connectedGem));
            setupEditorComponentForValueGem(valueEditor, valueGem);
            setupValueEditor(node, valueEditor);
View Full Code Here

       
        Gem upFromToGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.upFromTo);
        gemGraph.addGem(upFromToGem);

        // Create a Value gem to represent a BigInteger (Prelude.Integer) value for the number 1.
        Gem oneGem = new ValueGem(new LiteralValueNode(BigInteger.valueOf(1), calServices.getPreludeTypeConstants().getIntegerType()));
           
        gemGraph.addGem(oneGem);
       
        gemGraph.connectGems(oneGem.getOutputPart(), upFromToGem.getInputPart(0));
       
        gemGraph.connectGems(upFromToGem.getOutputPart(), productGem.getInputPart(0));
       
        gemGraph.connectGems(productGem.getOutputPart(), gemGraph.getTargetCollector().getInputPart(0));
       
View Full Code Here

     * Creates a ValueGem for the provided value, or null if a value node could not be constructed for the given value.
     * @param value
     * @return a ValueGem wrapping the provided value.
     */
    public ValueGem makeValueGem(Object value) {
        return new ValueGem (getValueNode (value));
    }
View Full Code Here

TOP

Related Classes of org.openquark.gems.client.ValueGem$ValuePart

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.