Linking property nodes to two cursors in one graph

Hello,
I have got one graph with 2 cursors. And I need to by able to set the coordinates of each cursor by using property nodes. However, if I click right button mouse button - create - property node - cursor - cursor position - -then there are only 3 possibilities "All elements", "X", Y" which links only to one of the cursors (actually I don`t know which). How is possible to link 2 cursors`s position property nodes to 2 cursors in one graph?
 Thank you a lot for discussion.
Martin Pekar
Solved!
Go to Solution.

Also, if you have more than a few cursors, you can make the code more scalable by using an array of positions and a FOR loop as follows.
Now the code automatically adapts th the number of cursors you actually have.
(Of course all other common sense applies, for example only set this when the position changes. Don't write the same cursor postions with every iteration of the loop over and over. )
Message Edited by altenbach on 05-06-2009 06:25 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
MulticursorII.png ‏4 KB

Similar Messages

  • Hao to display two lines in one Graph

    Hi, I want to display two lines in one graph in different color , what should I do? Thanks.

    Hello Carlos,
    the help window for a waveform graph/chart only mentions "single plot
    with waveform datatype". To get more plots on one graph you have to
    build an 2D-array  of  points. Just look at the help window!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I draw two matrixes in one graph???

    I have to draw two matrixes in one graph.
    Matrix size is 10 X 100, 10 X 100.
    Help me!
    Have a good day!

    You can do this by adding multiple plots to the graph's plots collection and then plotting each matrix on its own plot. The easiest way to add additinal plots to a graph's plots collection is to right-click on the graph in the dialog editor, click on Properties, click on the Plots tab, and then click the Add button to add additional plots.
    Now if you have a member variable for the graph in your dialog class (let's call it m_graph for this example), you could do this:
    // Plot the first matrix
    m_graph.Plots.Item(1).PlotXY(/* Your first 10x100 matrix data */);
    // Plot the second matrix on a different plot, but same graph
    m_graph.Plots.Item(2).PlotXY(/* Your second 10x100 matrix data */);
    - Elton

  • Two cursors in one procedure

    Hi All,
    Two cursors in the same procedure will slows down the execution ?. Please can any one suggest one this.

    I aggree with Sundar, you might be able to update this without using a cursor. My general understanding is to avoid using cursor as much as possible for performance reasons, if you are doing a lot of inserts/updates etc. If you are doing lot of updates and you must have to iterate through a loop due to some reason then try to use bulk processing (use bulk inserts, updates, one sql query to access data from database to avoid conext switching etc.).

  • Combine two channels on one graph

    I need to add a second channel, coming from same instrument, to the existing acq&graph Voltage VI (see attachment). I want to get two voltage curves on the same amplitude vs time graph. I configured the second channel and created a task, which also works on a that single channelled VI. Thanks a lot in advance
    Vitaliy
    Attachments:
    Acq&Graph Voltage-Int Clk.vi ‏57 KB

    I have two tasks for each channel. So Im trying to feed those two tasks through one loop and onto a graph. I do have a task named "ai cont multi" in NI-DAQmx Base Config Unility where I can choose two channels, but when I input this task into my VI, it doesn't recognize the resource which is weird cuz It does recognizes single channeled tasks that I created. I think Im missing something fundamental on the block diagram...

  • When I drag a link,there will be two new tabs.One of them is the website,and the other is a website poped by searching the words of the link.I hate the second one.how can i make my firefox just show one new tab?

    just as the quesstion

    Hi - yes I can! I hadn't noticed that little arrow before, thanks.
    However I would really like to stop it hiding the first tab all the time.... Even when I navigate to the first tab using that "list all tabs" arrow, it still remains 'hidden' (i.e. I can't see a tab up the top, even when that tab is active. And when I navigate away from it to another tab, it is invisible again).
    Any ideas?
    Thanks

  • Two yaxis on one graph

    I bet this has been asked a million times before but the search function on this bloody website never works. To prove this I typed array in the search and I got no hits back!!
    I have 4 thermocouples two at 400degC and two at 20degC would like to display them on the same grapha nd have a left and right y axis. Can it be done
    nice

    Get the data into the graph first so that there are two plots. Then right click on a number on the Y scale and get the pop up menu. The options are in the menu.
    Message Edited by Odd_Modem on 03-03-2007 08:27 AM
    Attachments:
    2 y scales.jpg ‏57 KB

  • Two plots on one graph....

    Hi
    I am running a project where I need to follow a plot on a graph. Currently both the plots are being plotted on the graph at the same time (i am using a waveform chart) so it is hard to follow as I have to anticipate where it will be next.What i would like to do is have the plot I want to follow already displayed on the graph and then as I run the VI the new plot is written in real time.
    Is this possible?

    Here's what I had in mind (LabVIEW 8.2)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IncrementalPlots.vi ‏14 KB

  • How to increment array that contains two clusters whose visibility is controlled by a visible property node and selected by a radio button.

    I am trying to use a property node: visible in order to enable or disable one of two clusters. These clusters are in a larger cluster and this larger cluster is in an array. The two clusters are controlled by a radio button (one labeled transistor and the other diode). When diode is selected, the corresponding diode parameters cluster should be visible and when transistor is selected, the corresponding transistor parameters cluster should be visible. In the mean time, the cluster of the device that is not selected should not be visible. There are at least 45 elements in the array (but not more than 45). Data is entered into each cluster (diode or transistor data) for each element in the array via the increment/decrement. The problem is when you select the first radio button (transistor) and enter data, when you increment the array for a new device selection, since a visible property node was used on the cluster, a loop is created where a new cluster is trying to be shown, but the old cluster is also trying to be shown (because it is the one referenced by the property node. How do I get rid of this loop and still be able to increment the array and keep my data intact for future use? Attached is the vi
    Attachments:
    ChooseScan.vi ‏17 KB

    You could try something like this.  However, if you know how to use an xcontrol, that would be a better way to implement the above functionality so that these UI characteristics are not a part of your main VI.  The problem with the above VI is that you're looping every 100 ms just to update your UI.
    Also, try using the "disabled" property node, instead of the "visible" one.  That way, the user will still see the options he has but they will be grayed out.
    Message Edited by Sudhir Gopinath on 06-25-2007 04:45 PM
    S G
    Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor
    Attachments:
    ChooseScan_1.vi ‏19 KB

  • Combine property node in LV

    I want to combine two property nodes of two different controls. Can I do that in LabVIEW? I have one application VI that has quite few controls and indicators and I want some of them to disable at some time and enable at some time. So every time I have to make too many property nodes in my block diagram so I want to reduce them and combine them in one. Thanks.
    Saw Naing Aye.

    You can Build an Array with References to all controls whos properties you want to change.
    Then you can build a subVI with 2 inputs. One the array of references, the other the array of integer (to Enable/Disable), for example.
    A For sequence can handle both arrays.
    Aitortxo
    Aitortxo.
    Attachments:
    ArrayOfReferences.vi ‏26 KB

  • Use one graph palette for several graphs

    I'm displaying information on two different graphs. But these two graphs must be coordinated : when I modify the zoom on one graph, the other graph plots its own data in the same interval of time than the first graph.
    Is it possible to use only the graph palette of the first graph to control the zoom, cursors, etc... on both graphs?
    Thank you.

    Hello zyl7,
    yes that's possible: just use property nodes to read properties from first graph and write those values to property node of second graph!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Restrict the movement of cursors on xy graph

    hello.
    I have an XY graph, with values of 0-10 in X, and of 0-10 in Y. I have two cursors in the graph.
    I do not want the cursor is out of the graph area of 10 * 10, I disabled the auto scale, but the cursor can get out of the area of 10 * 10.
    I also hope that the value of X of the cursor0 does not exceed the value of X of the cursor1.
    I hope you can help me with these restrictions on movement, thank you very much.

    Hey there, If you want to restrict the value of the cursors you can use property nodes to do so..
    Here is an example; you just need to get the value on X of the active cursor (0 or 1) and then compare those values; if the value is smaller; you can use a case structure and a property node to coerce the values.
    Hope this info helps.
    Greetings
    Attachments:
    Untitled 3.vi ‏11 KB

  • Splitting a Linked List at a Given Node, into Two Sublists??

    My code just will not work!! Any help would be appreciated! My problem is in the last method SplitAt. These are the conditions set and my code:
    Splitting a Linked List at a Given Node, into Two Sublists
    a. Add the following as an abstract method to the class
    LinkedListClass:
    public void splitAt (LinkedListClass<T> secondList, T item);
    //This method splits the list at the node with the info item into two sublists.
    //Precondition: The list must exist.
    //Postcondition: first and last point to the first and last nodes of the first sublist,
    // respectively. secondList.first and secondList.last point to the first
    // and last nodes of the second sublist.
    Consider the following statements:
    UnorderedLinkedList<Integer> myList;
    UnorderedLinkedList<Integer> otherList;
    Suppose myList points to the list with the elements 34, 65, 18, 39, 27, 89, and 12 (in this order). The statement
    myList.splitAt(otherList, 18);
    splits myList into two sublists: myList points to the list with elements 34 and 65, and otherList points to the sublist with elements 18, 39, 27, 89, and 12.
    b. Provide the definition of the method splitAt in the class UnorderedLinkedList. Also write a program to test your method.
    public class UnorderedLinkedList<T> extends LinkedListClass<T>
    //Default constructor
    public UnorderedLinkedList()
    super();
    //Method to determine whether searchItem is in
    //the list.
    //Postcondition: Returns true if searchItem is found
    // in the list; false otherwise.
    public boolean search(T searchItem)
    LinkedListNode<T> current; //variable to traverse
    //the list
    boolean found;
    current = first; //set current to point to the first
    //node in the list
    found = false; //set found to false
    while (current != null && !found) //search the list
    if (current.info.equals(searchItem)) //item is found
    found = true;
    else
    current = current.link; //make current point to
    //the next node
    return found;
    //Method to insert newItem in the list.
    //Postcondition: first points to the new list
    // and newItem is inserted at the
    // beginning of the list. Also,
    // last points to the last node and
    // count is incremented by 1.
    public void insertFirst(T newItem)
    LinkedListNode<T> newNode; //variable to create the
    //new node
    newNode =
    new LinkedListNode<T>(newItem, first); //create and
    //insert newNode before
    //first
    first = newNode; //make first point to the
    //actual first node
    if (last == null) //if the list was empty, newNode is
    //also the last node in the list
    last = newNode;
    count++; //increment count
    //Method to insert newItem at the end of the list.
    //Postcondition: first points to the new list and
    // newItem is inserted at the end
    // of the list. Also, last points to
    // the last node and
    // count is incremented by 1.
    public void insertLast(T newItem)
    LinkedListNode newNode; //variable to create the
    //new node
    newNode =
    new LinkedListNode(newItem, null); //create newNode
    if (first == null) //if the list is empty, newNode is
    //both the first and last node
    first = newNode;
    last = newNode;
    else //if the list is not empty, insert
    //newNode after last
    last.link = newNode; //insert newNode after last
    last = newNode; //set last to point to the
    //actual last node
    count++;
    }//end insertLast
    //Method to delete deleteItem from the list.
    //Postcondition: If found, the node containing
    // deleteItem is deleted from the
    // list. Also, first points to the first
    // node, last points to the last
    // node of the updated list, and count
    // is decremented by 1.
    public void deleteNode(T deleteItem)
    LinkedListNode<T> current; //variable to traverse
    //the list
    LinkedListNode<T> trailCurrent; //variable just
    //before current
    boolean found;
    if ( first == null) //Case 1; the list is empty
    System.err.println("Cannot delete from an empty "
    + "list.");
    else
    if (first.info.equals(deleteItem)) //Case 2
    first = first.link;
         if (first == null) //the list had only one node
         last = null;
         count--;
    else //search the list for the given info
    found = false;
    trailCurrent = first; //set trailCurrent to
    //point to the first node
    current = first.link; //set current to point to
    //the second node
    while (current != null && !found)
    if (current.info.equals(deleteItem))
    found = true;
    else
    trailCurrent = current;
    current = current.link;
    }//end while
    if (found) //Case 3; if found, delete the node
    count--;
    trailCurrent.link = current.link;
    if (last == current) //node to be deleted
    //was the last node
    last = trailCurrent; //update the value
    //of last
    else
    System.out.println("Item to be deleted is "
    + "not in the list.");
    }//end else
    }//end else
    }//end deleteNode
    public void splitAt(LinkedListClass<T> secondList, T item)
    LinkedListNode<T> current;
    LinkedListNode<T> trailCurrent;
    int i;
    boolean found;
    if (first==null)
    System.out.println("Empty.");
    first=null;
    last=null;
    count--;
    else
         current=first;
         found=false;
         i=1;
         while(current !=null &&!found)
              if(current.info.equals(secondList))
                   found= true;
                   else
                        trailCurrent=current;
                        i++;
         if(found)
              if(first==current)
                   first=first;
                   last=last;
                   count=count;
                   count=0;
              else
                   first=current;
                   last=last;
                   last=null;
                   count = count- i+1;
                   count = i-1;
              else
                   System.out.println("Item to be split at is "
    + "not in the list.");
              first=null;
              last=null;
              count=0;
    }

    I dont have a test program at all. The program is supposed to prompt for user input of numbers. (it does) Take the input and end at input of -999 (it does). Then it asks user where it wants to split list (it does). When I enter a number it does nothing after that. I am going to post updated code and see if that helps along with all the classes. Thanks!
    This is the class to prompt:
    import java.util.*;
    public class Ch16_ProgEx6
        static Scanner console = new Scanner(System.in);
         public static void main(String[] args)
             UnorderedLinkedList<Integer> list
                              = new UnorderedLinkedList<Integer>();
            UnorderedLinkedList<Integer> subList =
                              new UnorderedLinkedList<Integer>();
             Integer num;
             System.out.println("Enter integers ending with -999.");
             num = console.nextInt();
             while (num != -999)
                 list.insertLast(num);
                 num = console.nextInt();
            System.out.println();
            System.out.println("list: ");
            list.print();
            System.out.println();
            System.out.println("Length of list: " + list.length());
            System.out.print("Enter the number at which to split list: ");
            num = console.nextInt();
            list.splitAt(subList, num);
            System.out.println("Lists after splitting list");
            System.out.print("list: ");
            list.print();
            System.out.println();
            System.out.println("Length of list: " + list.length());
            System.out.print("sublist: ");
            subList.print();
            System.out.println();
            System.out.println("Length of sublist: " + subList.length());
    }This is the ADT:
    public interface LinkedListADT<T> extends Cloneable
        public Object clone();
           //Returns a copy of objects data in store.
           //This method clones only the references stored in
           //each node of the list. The objects that the
           //list nodes point to are not cloned.
        public boolean isEmptyList();
           //Method to determine whether the list is empty.
           //Postcondition: Returns true if the list is empty;
           //               false otherwise.
        public void initializeList();
           //Method to initialize the list to an empty state.
           //Postcondition: The list is initialized to an empty
           //               state.
        public void print();
           //Method to output the data contained in each node.
        public int length();
           //Method to return the number of nodes in the list.
           //Postcondition: The number of nodes in the list is
           //               returned.
        public T front();
           //Method to return a reference of the object containing
           //the data of the first node of the list.
           //Precondition: The list must exist and must not be empty.
           //Postcondition: The reference of the object that
           //               contains the info of the first node
           //               is returned.
        public T back();
           //Method to return a reference of object containing
           //the data of the last node of the list.
           //Precondition: The list must exist and must not be empty.
           //Postcondition: The reference of the object that
           //               contains the info of the last node
           //               is returned.
        public boolean search(T searchItem);
           //Method to determine whether searchItem is in the list.
           //Postcondition: Returns true if searchItem is found
           //               in the list; false otherwise.
        public void insertFirst(T newItem);
           //Method to insert newItem in the list.
           //Postcondition: newItem is inserted at the
           //               beginning of the list.
        public void insertLast(T newItem);
           //Method to insert newItem at the end of the list.
           //Postcondition: newItem is inserted at the end
           //               of the list.
        public void deleteNode(T deleteItem);
           //Method to delete deleteItem from the list.
           //Postcondition: If found, the node containing
           //               deleteItem is deleted from the
           //               list.
        public void splitAt(LinkedListClass<T> secondList, T item);
    }This is the linked list class:
    import java.util.NoSuchElementException;
    public abstract class LinkedListClass<T> implements LinkedListADT<T>
        protected class LinkedListNode<T> implements Cloneable
            public T info;
            public LinkedListNode<T> link;
               //Default constructor
               //Postcondition: info = null; link = null;
            public LinkedListNode()
                info = null;
                link = null;
               //Constructor with parameters
               //This method sets info pointing to the object to
               //which elem points to and link is set to point to
               //the object to which ptr points to.
               //Postcondition:  info = elem; link = ptr;
            public LinkedListNode(T elem, LinkedListNode<T> ptr)
                info = elem;
                link = ptr;
               //Returns a copy of objects data in store.
               //This method clones only the references stored in
               //the node. The objects that the nodes point to
               //are not cloned.
            public Object clone()
                LinkedListNode<T> copy = null;
                try
                    copy = (LinkedListNode<T>) super.clone();
                catch (CloneNotSupportedException e)
                    return null;
                return copy;
               //Method to return the info as a string.
               //Postcondition: info as a String object is
               //               returned.
            public String toString()
                return info.toString();
        } //end class LinkedListNode
        public class LinkedListIterator<T>
            protected LinkedListNode<T> current;  //variable to
                                                  //point to the
                                                  //current node in
                                                  //list
            protected LinkedListNode<T> previous; //variable to
                                                  //point to the
                                                  //node before the
                                                  //current node
               //Default constructor
               //Sets current to point to the first node in the
               //list and sets previous to null.
               //Postcondition: current = first; previous = null;
            public LinkedListIterator()
                current = (LinkedListNode<T>) first;
                previous = null;
               //Method to reset the iterator to the first node
               //in the list.
               //Postcondition: current = first; previous = null;
            public void reset()
                current = (LinkedListNode<T>) first;
                previous = null;
               //Method to return a reference of the info of the
               //current node in the list and to advance iterator
               //to the next node.
               //Postcondition: previous = current;
               //               current = current.link;
               //               A refrence of the current node
               //               is returned.
            public T next()
                if (!hasNext())
                    throw new NoSuchElementException();
                LinkedListNode<T> temp = current;
                previous = current;
                current = current.link;
                return temp.info;
                //Method to determine whether there is a next
                //element in the list.
                //Postcondition: Returns true if there is a next
                //               node in the list; otherwise
                //               returns false.
            public boolean hasNext()
                return (current != null);
               //Method to remove the node currently pointed to
               //by the iterator.
               //Postcondition: If iterator is not null, then the
               //               node that the iterator points to
               //               is removed. Otherwise the method
               //               throws NoSuchElementException.
            public void remove()
                if (current == null)
                    throw new NoSuchElementException();
                if (current == first)
                    first = first.link;
                    current = (LinkedListNode<T>) first;
                    previous = null;
                    if (first == null)
                        last = null;
                else
                    previous.link = current.link;
                    if (current == last)
                        last = first;
                        while (last.link != null)
                            last = last.link;
                    current = current.link;
                count--;
               //Method to return the info as a string.
               //Postcondition: info as a String object is returned.
            public String toString()
                return current.info.toString();
        } //end class LinkedListIterator
           //Instance variables of the class LinkedListClass
        protected LinkedListNode<T> first; //variable to store the
                                           //address of the first
                                           //node of the list
        protected LinkedListNode<T> last;  //variable to store the
                                           //address of the last
                                           //node of the list
        protected int count;  //variable to store the number of
                              //nodes in the list
           //Default constructor
           //Initializes the list to an empty state.
           //Postcondition: first = null, last = null,
           //               count = 0
        public LinkedListClass()
            first = null;
            last = null;
            count = 0;
           //Method to determine whether the list is empty.
           //Postcondition: Returns true if the list is empty;
           //               false otherwise.
        public boolean isEmptyList()
            return (first == null);
           //Method to initialize the list to an empty state.
           //Postcondition: first = null, last = null,
           //               count = 0
        public void initializeList()
            first = null;
            last = null;
            count = 0;
           //Method to output the data contained in each node.
        public void print()
            LinkedListNode<T> current; //variable to traverse
                                       //the list
            current = first;    //set current so that it points to
                                //the first node
            while (current != null) //while more data to print
                System.out.print(current.info + " ");
                current = current.link;
        }//end print
           //Method to return the number of nodes in the list.
           //Postcondition: The value of count is returned.
        public int length()
            return count;
           //Method to return a reference of the object containing
           //the data of the first node of the list.
           //Precondition: The list must exist and must not be empty.
           //Postcondition: The reference of the object that
           //               contains the info of the first node
           //               is returned.
        public T front()
            return first.info;
            //Method to return a reference of object containing
            //the data of the last node of the list.
            //Precondition: The list must exist and must not be empty.
            //Postcondition: The reference of the object that
            //               contains the info of the last node
            //               is returned.
        public T back()
            return last.info;
           //Returns a copy of objects data in store.
           //This method clones only the references stored in
           //each node of the list. The objects that the
           //list nodes point to are not cloned.
        public Object clone()
            LinkedListClass<T> copy = null;
            try
                copy = (LinkedListClass<T>) super.clone();
            catch (CloneNotSupportedException e)
                return null;
                //If the list is not empty clone each node of
                //the list.
            if (first != null)
                   //Clone the first node
                copy.first = (LinkedListNode<T>) first.clone();
                copy.last = copy.first;
                LinkedListNode<T> current;
                if (first != null)
                    current = first.link;
                else
                    current = null;
                   //Clone the remaining nodes of the list
                while (current != null)
                    copy.last.link =
                            (LinkedListNode<T>) current.clone();
                    copy.last = copy.last.link;
                    current = current.link;
            return copy;
           //Method to return an iterator of the list.
           //Postcondition: An iterator is instantiated and
           //               returned.
        public LinkedListIterator<T> iterator()
            return new LinkedListIterator<T>();
           //Method to determine whether searchItem is in
           //the list.
           //Postcondition: Returns true if searchItem is found
           //               in the list; false otherwise.
        public abstract boolean search(T searchItem);
           //Method to insert newItem in the list.
           //Postcondition: first points to the new list
           //               and newItem is inserted at the
           //               beginning of the list. Also,
           //               last points to the last node and
           //               count is incremented by 1.
        public abstract void insertFirst(T newItem);
           //Method to insert newItem at the end of the list.
           //Postcondition: first points to the new list and
           //               newItem is inserted at the end
           //               of the list. Also, last points to
           //               the last node and
           //               count is incremented by 1.
        public abstract void insertLast(T newItem);
           //Method to delete deleteItem from the list.
           //Postcondition: If found, the node containing
           //               deleteItem is deleted from the
           //               list. Also, first points to the first
           //               node, last points to the last
           //               node of the updated list, and count
           //               is decremented by 1.
        public abstract void deleteNode(T deleteItem);
        public abstract void splitAt(LinkedListClass<T> secondList, T item);
    }And this is the UnorderedLinked Class with the very last method the one being Im stuck on. The SplitAt Method.
    public class UnorderedLinkedList<T> extends LinkedListClass<T>
           //Default constructor
        public UnorderedLinkedList()
            super();
            //Method to determine whether searchItem is in
            //the list.
            //Postcondition: Returns true if searchItem is found
            //               in the list; false otherwise.
        public boolean search(T searchItem)
            LinkedListNode<T> current; //variable to traverse
                                       //the list
            boolean found;
            current = first;  //set current to point to the first
                              //node in the list
            found = false;    //set found to false
            while (current != null && !found) //search the list
                if (current.info.equals(searchItem)) //item is found
                    found = true;
                else
                   current = current.link; //make current point to
                                           //the next node
            return found;
            //Method to insert newItem in the list.
            //Postcondition: first points to the new list
            //               and newItem is inserted at the
            //               beginning of the list. Also,
            //               last points to the last node and
            //               count is incremented by 1.
        public void insertFirst(T newItem)
            LinkedListNode<T> newNode;     //variable to create the
                                        //new node
            newNode =
               new LinkedListNode<T>(newItem, first); //create and
                                           //insert newNode before
                                           //first
            first = newNode;   //make first point to the
                               //actual first node
            if (last == null)   //if the list was empty, newNode is
                                //also the last node in the list
                last = newNode;
            count++;     //increment count
            //Method to insert newItem at the end of the list.
            //Postcondition: first points to the new list and
            //               newItem is inserted at the end
            //               of the list. Also, last points to
            //               the last node and
            //               count is incremented by 1.
        public void insertLast(T newItem)
            LinkedListNode newNode; //variable to create the
                                    //new node
            newNode =
               new LinkedListNode(newItem, null);  //create newNode
            if (first == null)  //if the list is empty, newNode is
                                //both the first and last node
                first = newNode;
                last = newNode;
            else     //if the list is not empty, insert
                     //newNode after last
                last.link = newNode; //insert newNode after last
                last = newNode;      //set last to point to the
                                     //actual last node
            count++;
        }//end insertLast
            //Method to delete deleteItem from the list.
            //Postcondition: If found, the node containing
            //               deleteItem is deleted from the
            //               list. Also, first points to the first
            //               node, last points to the last
            //               node of the updated list, and count
            //               is decremented by 1.
        public void deleteNode(T deleteItem)
            LinkedListNode<T> current; //variable to traverse
                                       //the list
            LinkedListNode<T> trailCurrent; //variable just
                                            //before current
            boolean found;
            if ( first == null)    //Case 1; the list is empty
                System.err.println("Cannot delete from an empty "
                                 + "list.");
            else
                if (first.info.equals(deleteItem)) //Case 2
                    first = first.link;
                       if (first == null)  //the list had only one node
                          last = null;
                       count--;
                else  //search the list for the given info
                    found = false;
                    trailCurrent = first; //set trailCurrent to
                                          //point to the first node
                    current = first.link; //set current to point to
                                          //the second node
                    while (current != null && !found)
                        if (current.info.equals(deleteItem))
                            found = true;
                        else
                            trailCurrent = current;
                            current = current.link;
                    }//end while
                    if (found) //Case 3; if found, delete the node
                        count--;
                        trailCurrent.link = current.link;
                        if (last == current)  //node to be deleted
                                              //was the last node
                           last = trailCurrent;  //update the value
                                                 //of last
                    else
                       System.out.println("Item to be deleted is "
                                        + "not in the list.");
                }//end else
            }//end else
        }//end deleteNode
        public void splitAt(LinkedListClass<T> secondList, T item)
         LinkedListNode<T> current;
         LinkedListNode<T> trailCurrent;
         int i;
         boolean found;
         if (first==null)
        System.out.println("Empty.");
        first=null;
        last=null;
        count--;
        count=0;
         else
              current=first;
              found=false;
              i=1;
              while(current !=null &&!found)
                   if(current.info.equals(item))
                       found= true;
                       else
                            trailCurrent=first;
                            current=first;
                            i++;
              if(found)
                   if(first==current)
                        first.link=first;
                        last.link=last;
                           count--;
                        count=0;
                   else
                        first.link=current;
                        last.link=last;
                        last=null;
                        count = count- i+1;
                        count = i-1;
              } else  {
                  System.out.println("Item to be split at is "
                    + "not in the list.");
                   first=null;
                   last=null;
                   count=0;
        Any help or just advice would be fine. Im not the best at Java, better at VB. Am completely stumped! Thanks so much!

  • Cursor: Bring to Center via Property node?

    The pop-up menu on the Cursor Legend for graphs includes an item: Bring to Center which moves the active cursor to the center of the plot.
    Is this capability available programmatically? An Invoke Node method or Property Node? I would like to have a button on the FP which "retrieves" a free cursor.  I can see complicated ways using Cursor Position and Scale: Range property nodes. I could not find anything as simple as the pop-up menu.
    Lynn

    Bublina wrote:
    It works OK, but I used it and I remember it failed to work for extreme zoom levels (nothing happened)
    Do not remember if the inbuilt functionality failed aswell.
    Edit: It did
    I take the Edit as "it fails as well". At least, it wouldn't surprise me if you meant it differently.
    The reason:
    Extreme zoom levels usually mean, that both endpoints of the scale do have a very small difference. Since the center is (at least in altenbach's code and i assume that the context menu function works similar) the average of both endpoint values, the difference between endpoint and average cannot be covered by the used numeric representation. So it computes an average, but that equals to one of the endpoints......
    So this is rather a "works as expected" issue, even if not very nice and most likely considered a bug by the user (without above explanation).
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Programmatically Change a Property Node Link to Object

    Is there a way to programmatically change a "link" to an object in a property node?  I'm trying to create a user configurable front panel for a project that I'm working on, in which the user can change the caption for numerous controls and indicators.  I would like to set-up a for loop that will take information contained in a string array and change each caption accordingly, instead of having 100 different property nodes on the block diagram.  If you need anymore details, let me know and maybe I can attach a picture to the response.

    There's various ways you can do this as far as exact implementation. You will need to use something to identify which control you're dealing with. Attached is one way that uses the control's label as a lookup. You could, for example, use a default caption instead to make it more apparent to the user which control they're specifying to change.
    Attachments:
    change captions.vi ‏20 KB

Maybe you are looking for

  • Can no longer update computer (network error)

    So I may or may not have been on a questionable site looking for some app add on's for my ipad and I may or may not have gotten a disease. Since being on these unnamed sites Im unable to update my computer in anyway, or connect to the app store. I ge

  • MY IPOD KEEPS ON SKIPPING THE SONGS I WANT TO HEAR!

    Have you got any help on this because it is really distressing!!

  • [E2007] [EWS] [PS] $PR_Folder_path not returning correct value

    Apologies if this is something obvious but I'm trying to get the full folder path from an EWS Powershell script. I call the PR_Folder_Path extended property but it always returns: {MapiType: String Tag: 26293 } The code is: Function SearchFolder( $Fo

  • Java SE 6 Update 10 RC  leak memory

    I install Java SE 6 Update 10 RC from JDK6 Update 10 RC and open http://java.sun.com/docs/books/tutorial/uiswing/components/table.html When I push "launch" button , I saw only first JavaApp, next I don`t see nothing. Processes have 5-6 "javaw.exe" on

  • What code is needed to play mp4 video in IE9

    I have been everywhere looking for a solution to this. I only get references which talk about what the problems, the issues, and what needs to be done but does not provide the actual html code that should be inserted into DW that will actually make i