[ 1717125 ] Frequently checking for new Requests/Notices
- merge patch submitted, disable manual updateInfo call.
This commit is contained in:
parent
690016fa37
commit
75080daea3
|
@ -131,6 +131,10 @@ public final class AMenu extends CFrame
|
||||||
m_AD_Role_ID = Env.getContextAsInt(m_ctx, "#AD_Role_ID");
|
m_AD_Role_ID = Env.getContextAsInt(m_ctx, "#AD_Role_ID");
|
||||||
updateInfo();
|
updateInfo();
|
||||||
//
|
//
|
||||||
|
infoUpdater = new InfoUpdater();
|
||||||
|
infoUpdaterThread = new Thread(infoUpdater, "InfoUpdater");
|
||||||
|
infoUpdaterThread.start();
|
||||||
|
//
|
||||||
splash.dispose();
|
splash.dispose();
|
||||||
splash = null;
|
splash = null;
|
||||||
} // AMenu
|
} // AMenu
|
||||||
|
@ -158,6 +162,11 @@ public final class AMenu extends CFrame
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private static CLogger log = CLogger.getCLogger(AMenu.class);
|
private static CLogger log = CLogger.getCLogger(AMenu.class);
|
||||||
|
|
||||||
|
/** The Info Update instance **/
|
||||||
|
private InfoUpdater infoUpdater = null;
|
||||||
|
/** The Info Update thread **/
|
||||||
|
private Thread infoUpdaterThread = null;
|
||||||
|
|
||||||
private WindowManager windowManager = new WindowManager();
|
private WindowManager windowManager = new WindowManager();
|
||||||
|
|
||||||
|
|
||||||
|
@ -436,6 +445,16 @@ public final class AMenu extends CFrame
|
||||||
Ini.setDividerLocation(treePanel.getDividerLocation());
|
Ini.setDividerLocation(treePanel.getDividerLocation());
|
||||||
Ini.setWindowLocation(0, getLocation());
|
Ini.setWindowLocation(0, getLocation());
|
||||||
Ini.saveProperties(true);
|
Ini.saveProperties(true);
|
||||||
|
//
|
||||||
|
infoUpdater.stop = true;
|
||||||
|
try {
|
||||||
|
infoUpdaterThread.join(50);
|
||||||
|
} catch(InterruptedException ire) {
|
||||||
|
} finally {
|
||||||
|
infoUpdaterThread = null;
|
||||||
|
infoUpdater = null;
|
||||||
|
}
|
||||||
|
//
|
||||||
super.dispose();
|
super.dispose();
|
||||||
AEnv.exit(0);
|
AEnv.exit(0);
|
||||||
} // dispose
|
} // dispose
|
||||||
|
@ -512,7 +531,7 @@ public final class AMenu extends CFrame
|
||||||
gotoRequests();
|
gotoRequests();
|
||||||
else if (!AEnv.actionPerformed(e.getActionCommand(), m_WindowNo, this))
|
else if (!AEnv.actionPerformed(e.getActionCommand(), m_WindowNo, this))
|
||||||
log.log(Level.SEVERE, "unknown action=" + e.getActionCommand());
|
log.log(Level.SEVERE, "unknown action=" + e.getActionCommand());
|
||||||
updateInfo();
|
//updateInfo();
|
||||||
} // actionPerformed
|
} // actionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -677,7 +696,7 @@ public final class AMenu extends CFrame
|
||||||
*/
|
*/
|
||||||
public void stateChanged (ChangeEvent e)
|
public void stateChanged (ChangeEvent e)
|
||||||
{
|
{
|
||||||
updateInfo();
|
//updateInfo();
|
||||||
// show activities
|
// show activities
|
||||||
if (centerPane.getSelectedIndex() == m_tabActivities)
|
if (centerPane.getSelectedIndex() == m_tabActivities)
|
||||||
wfActivity.display();
|
wfActivity.display();
|
||||||
|
@ -701,7 +720,7 @@ public final class AMenu extends CFrame
|
||||||
if (e.getClickCount() > 1)
|
if (e.getClickCount() > 1)
|
||||||
{
|
{
|
||||||
System.gc();
|
System.gc();
|
||||||
updateInfo();
|
//updateInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // AMenu_MouseAdapter
|
} // AMenu_MouseAdapter
|
||||||
|
@ -718,4 +737,25 @@ public final class AMenu extends CFrame
|
||||||
AMenu menu = new AMenu();
|
AMenu menu = new AMenu();
|
||||||
} // main
|
} // main
|
||||||
|
|
||||||
|
class InfoUpdater implements Runnable
|
||||||
|
{
|
||||||
|
boolean stop = false;
|
||||||
|
|
||||||
|
public void InfoUpdater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
while(stop == false)
|
||||||
|
{
|
||||||
|
updateInfo();
|
||||||
|
|
||||||
|
try {
|
||||||
|
Thread.currentThread().sleep(60000);
|
||||||
|
} catch(InterruptedException ire) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // AMenu
|
} // AMenu
|
||||||
|
|
|
@ -186,7 +186,7 @@ public class AMenuStartItem extends Thread implements ActionListener
|
||||||
SwingUtilities.invokeLater(m_resetPB);
|
SwingUtilities.invokeLater(m_resetPB);
|
||||||
if (m_menu != null)
|
if (m_menu != null)
|
||||||
{
|
{
|
||||||
m_menu.updateInfo();
|
//m_menu.updateInfo();
|
||||||
m_menu.setBusy(false);
|
m_menu.setBusy(false);
|
||||||
}
|
}
|
||||||
} // run
|
} // run
|
||||||
|
|
Loading…
Reference in New Issue