Results 1 to 6 of 6

Hybrid View

  1. #1
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi metero,

    I think that you just need to customize a little the UpdateString class in order to store also the old value of a cell or replace the method isHot with a method that return the background color in accordance with your comparison of old and new values.

    Hope That helps.

  2. #2
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    6
    Hi ,
    i have change the UpdateString to

    protected LSUpdateString(String newValue, String oldValue, boolean isHot)

    and i have add the following checks

    you have the first , i have add the second, is for date
    if (newValue.indexOf(":") > -1 || newValue.indexOf("/") > -1)

    and here the second check is for string of negative numbers
    if (Character.isDigit(newValue.charAt(0)) || ((String) newValue).startsWith("-"))

    what i am trying and i canot understand is how i can close the connection,
    what i mean , i use the Swing_StockListDemo on my project ,
    i have make some changes for compare new and old values and update the colors depends the prices
    i have add static values for some columns ,like QTY portfolio ,

    but i cant understand witch is the best way when i close the form to stop the feed , i have try the unsubscribe
    SubscribedTableKey tableRef;
    tableRef = client.subscribeTable(tInfo, this.table.getTableListener(), false);
    client.unsubscribeTable(tableRef);

    but as i can understand this only remove the items when i use client.closeConnection(); i get exception error



    thanks

  3. #3
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi metero,

    To stop receiving feed from Lightstreamer server the unsubscribeTable/s is/are the correct methods to call, after that your client application will no longer receive any data from the server. I did not understand if you had different expectations.

    Instead, closeConnection() method closes the network connection with the server if one is open, stopping any subscriptions still open. That you got an exception calling this method is not normal so, please can you post here the exception StackTrace?

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 10:06 AM.