Examples of IEditableComponent


Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

     * @param target
     */
    public static void updateTargetAvailabilities(AbstractDataSource<?> source, ITarget target,
            boolean userEditable) {
        if (target instanceof IEditableComponent) {
            final IEditableComponent editableComponent = (IEditableComponent) target;
            if (userEditable) {
                if (source != null) {
                    editableComponent.setEditable(source.isSettable());
                }
            }
            else {
                editableComponent.setEditable(false);
            }
        }

    }
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

     * @param widget
     */
    private void updateWidgetAvailabilities(AbstractDataSource<?> source, T widget) {
        if (!source.isSettable()) {
            if (widget instanceof IEditableComponent) {
                final IEditableComponent editableComponent = (IEditableComponent) widget;
                editableComponent.setEditable(false);
            }
            else if (widget instanceof IComponent) {
                ((IComponent) widget).setEnabled(false);
            }
        }
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

          // WARNING THIS IS A REALLY DIRTY DIRTY HACK
          // PLEASE DO SOMETING FOR ME
          // ----------------------------------------------------------------------------
          if (!source.isSettable()) {
            if (widget instanceof IEditableComponent) {
              IEditableComponent editableComponent = (IEditableComponent) widget;
              editableComponent.setEditable(false);
            }
          }

                    // we check first if a similar controller already exist, otherwise we create
                    // it
                    AbstractController<U> controller = getController(source.getDataType(),
                            getTargetType());

                    if (controller != null) {
                        controller.setFirstInitAllowed(firstInitAllowed);

                        // we connect both components to the controller and check if the link is
                        // make
                        result = controller.addLink(source, connectedTarget);

                        String logMessage = "connection failed for";
                        if (result) {
                            IDataSourceProducer producer = DataSourceProducerProvider
                                    .getProducer(key.getSourceProduction());

                            List<AbstractPlugin<?>> tempListPlugin = initPlugins(source);
                            List<AbstractPlugin<?>> toRemove = new ArrayList<AbstractPlugin<?>>();
                            for (AbstractPlugin<?> plugin : tempListPlugin) {
                                boolean connectionState = plugin.addPlugin(producer, key, widget);
                                if (!connectionState) {
                                    toRemove.add(plugin);
                                }
                            }
                            tempListPlugin.removeAll(toRemove);
                            toRemove.clear();

                            connectCheckers(widget, controller);
                            computeDefaultToolTip(widget, key);

                            // registration of all usefull information about the connection
                            linkedPlugins.put(widget, tempListPlugin);
                            mainConnections.put(widget, key);

                            logMessage = "connection for";
                        }
                        // connection trace
                        printLog(logMessage, widget, controller, source);

            // TODO
            if (widget instanceof IEditableComponent && !source.isSettable()) {
              IEditableComponent iEditableComponent = (IEditableComponent) widget;
              iEditableComponent.setEditable(false);
            }
                    }
        }
        else {
          widget.setEnabled(false);
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

                    // WARNING THIS IS A REALLY DIRTY DIRTY HACK
                    // PLEASE DO SOMETING FOR ME
                    // ----------------------------------------------------------------------------
                    if (!source.isSettable()) {
                        if (widget instanceof IEditableComponent) {
                            final IEditableComponent editableComponent = (IEditableComponent) widget;
                            editableComponent.setEditable(false);
                        }
                    }

                    // we check first if a similar controller already exist, otherwise we create
                    // it
                    final AbstractController<U> controller = getController(source.getDataType(),
                            getTargetType());

                    if (controller != null) {
                        controller.setFirstInitAllowed(firstInitAllowed);

                        // we connect both components to the controller and check if the link is
                        // make
                        result = controller.addLink(source, connectedTarget);

                        String logMessage = "connection failed for";
                        if (result) {

                            final IDataSourceProducer producer = DataSourceProducerProvider
                                    .getProducer(key.getSourceProduction());

                            initPlugins(producer, source, widget);

                            computeDefaultToolTip(widget, key);

                            // registration of all usefull information about the connection
                            mainConnections.put(widget, key);

                            logMessage = "connection for";
                        }
                        // connection trace
                        printLog(logMessage, widget, controller, source);

                        // TODO
                        if (widget instanceof IEditableComponent && !source.isSettable()) {
                            final IEditableComponent iEditableComponent = (IEditableComponent) widget;
                            iEditableComponent.setEditable(false);
                        }
                    }
                }
                else {                 
                    if (autoReconnectBadConnections){
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

     */
    public static void updateTargetAvailabilities(AbstractDataSource<?> source, ITarget target) {
        if (source != null) {
            boolean settable = source.isSettable();
            if (target instanceof IEditableComponent) {
                final IEditableComponent editableComponent = (IEditableComponent) target;
                if (editableComponent.isEditable() != settable) {
                    editableComponent.setEditable(settable);
                }
            }
            // else if (target instanceof IComponent) {
            // final IComponent comp = (IComponent) target;
            // if (comp.isEnabled() != settable) {
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

                    // WARNING THIS IS A REALLY DIRTY DIRTY HACK
                    // PLEASE DO SOMETING FOR ME
                    // ----------------------------------------------------------------------------
                    if (!source.isSettable()) {
                        if (widget instanceof IEditableComponent) {
                            final IEditableComponent editableComponent = (IEditableComponent) widget;
                            editableComponent.setEditable(false);
                        }
                    }

                    // we check first if a similar controller already exist, otherwise we create
                    // it
                    final AbstractController<U> controller = getController(source.getDataType(),
                            getTargetType());

                    if (controller != null) {
                        controller.setFirstInitAllowed(firstInitAllowed);

                        // we connect both components to the controller and check if the link is
                        // make
                        result = controller.addLink(source, connectedTarget);

                        String logMessage = "connection failed for";
                        if (result) {

                            final IDataSourceProducer producer = DataSourceProducerProvider
                                    .getProducer(key.getSourceProduction());

                            initPlugins(producer, source, widget);

                            computeDefaultToolTip(widget, key);

                            // registration of all usefull information about the connection
                            mainConnections.put(widget, key);

                            logMessage = "connection for";
                        }
                        // connection trace
                        printLog(logMessage, widget, controller, source);

                        // TODO
                        if (widget instanceof IEditableComponent && !source.isSettable()) {
                            final IEditableComponent iEditableComponent = (IEditableComponent) widget;
                            iEditableComponent.setEditable(false);
                        }
                    }
                }
                else {                 
                    if (autoReconnectBadConnections){
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

                    // intelligence to it
                    final CometeCaps<?, ?> connectedTarget = getTargetCaps(widget);

                    if (!source.isSettable()) {
                        if (widget instanceof IEditableComponent) {
                            final IEditableComponent editableComponent = (IEditableComponent) widget;
                            editableComponent.setEditable(false);
                        }
                        else if (widget instanceof IComponent) {
                            ((IComponent) widget).setEnabled(false);
                        }
                    }
View Full Code Here

Examples of fr.soleil.comete.definition.data.target.scalar.IEditableComponent

     */
    public static void updateTargetAvailabilities(AbstractDataSource<?> source, ITarget target) {
        if (source != null) {
            boolean settable = source.isSettable();
            if (target instanceof IEditableComponent) {
                final IEditableComponent editableComponent = (IEditableComponent) target;
                if (editableComponent.isEditable() != settable) {
                    editableComponent.setEditable(settable);
                }
            }
            else if (target instanceof IComponent) {
                final IComponent comp = (IComponent) target;
                if (comp.isEnabled() != settable) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.