-
January 23rd, 2013, 12:04 PM
#1
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.
-
February 26th, 2013, 03:56 PM
#2
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
-
February 27th, 2013, 09:18 AM
#3
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 04:21 AM.
Bookmarks