Difference between revisions of "Thread:Talk:RoboJogger/Version 0.9.6"

From Robowiki
Jump to navigation Jump to search
(New thread: Version 0.9.6)
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
Assuming a singular method that displays the windows given a result set.
 
Assuming a singular method that displays the windows given a result set.
  
a la "void showResultsWindow(resultSet)", could make it "resultWindow showResultsWindow(resultSet)", keep it in a map "HashMap<resultSet,resultWindow>", and update the window based on updates in the set "resultWindow window = map.get(resultSet); window.updateData(resultSet); window.markTableDirty();"
+
a la "void showResultsWindow(resultSet)", could make it "ResultWindow showResultsWindow(resultSet)", keep it in a map "HashMap<ResultSet,ResultWindow>", and update the window based on updates in the set "ResultWindow window = map.get(resultSet); window.updateData(resultSet); window.markTableDirty();"
  
 
Mark table dirty would be this piece of thread safe code "RepaintManager.currentManager(table).markCompletelyDirty(table);"
 
Mark table dirty would be this piece of thread safe code "RepaintManager.currentManager(table).markCompletelyDirty(table);"
  
 
Keeping the window in a map also allows you to just move that window to the front if someone tries to open the same result window twice. Though you make require a listener to determine if the window was closed, so you can remove it from the hashmap. Just hiding it could be problematic if someone keeps the application open for a long time and runs many different challenges.
 
Keeping the window in a map also allows you to just move that window to the front if someone tries to open the same result window twice. Though you make require a listener to determine if the window was closed, so you can remove it from the hashmap. Just hiding it could be problematic if someone keeps the application open for a long time and runs many different challenges.

Latest revision as of 01:28, 31 January 2013

Updating the result windows on the fly doesn't seem like it would be particularly difficult. But I don't know the structure of your code at the moment, so I could be wrong.

Assuming a singular method that displays the windows given a result set.

a la "void showResultsWindow(resultSet)", could make it "ResultWindow showResultsWindow(resultSet)", keep it in a map "HashMap<ResultSet,ResultWindow>", and update the window based on updates in the set "ResultWindow window = map.get(resultSet); window.updateData(resultSet); window.markTableDirty();"

Mark table dirty would be this piece of thread safe code "RepaintManager.currentManager(table).markCompletelyDirty(table);"

Keeping the window in a map also allows you to just move that window to the front if someone tries to open the same result window twice. Though you make require a listener to determine if the window was closed, so you can remove it from the hashmap. Just hiding it could be problematic if someone keeps the application open for a long time and runs many different challenges.