Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-monitor-widget@99624 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
342555fad2
commit
d406e0371a
|
@ -35,14 +35,14 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
public static final int STATUS_POLLING_DELAY = 1000;
|
public static final int STATUS_POLLING_DELAY = 1000;
|
||||||
private static final String WIDTH = "640px";
|
private static final String WIDTH = "640px";
|
||||||
private static final String HEIGHT = "378px";
|
private static final String HEIGHT = "378px";
|
||||||
private static final String PANELWIDTH = "620px";
|
private static final String PANELWIDTH = "620px";
|
||||||
private static final String PANELHEIGHT = "308px";
|
private static final String PANELHEIGHT = "308px";
|
||||||
private static final String PROGRESSWIDTH = "618px";
|
private static final String PROGRESSWIDTH = "618px";
|
||||||
|
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
private String taskId;
|
private String taskId;
|
||||||
private MonitorUpdater progressUpdater;
|
private MonitorUpdater progressUpdater;
|
||||||
|
@ -52,27 +52,24 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
private TRId trId;
|
private TRId trId;
|
||||||
private String reason;
|
private String reason;
|
||||||
private String details;
|
private String details;
|
||||||
|
|
||||||
|
|
||||||
protected boolean backgroundBtnEnabled=true;
|
|
||||||
protected ToolButton backgroundBtn;
|
protected ToolButton backgroundBtn;
|
||||||
|
|
||||||
protected ArrayList<MonitorDialogListener> listeners = new ArrayList<MonitorDialogListener>();
|
protected ArrayList<MonitorDialogListener> listeners = new ArrayList<MonitorDialogListener>();
|
||||||
protected ArrayList<MonitorDialogEventUIListener> monitorDialogEventUIListeners = new ArrayList<MonitorDialogEventUIListener>();
|
protected ArrayList<MonitorDialogEventUIListener> monitorDialogEventUIListeners = new ArrayList<MonitorDialogEventUIListener>();
|
||||||
|
|
||||||
private MonitorDetailPanel monitorDetailPanel;
|
private MonitorDetailPanel monitorDetailPanel;
|
||||||
|
|
||||||
public MonitorDialog(String taskId, EventBus eventBus) {
|
public MonitorDialog(String taskId, EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.taskId=taskId;
|
this.taskId = taskId;
|
||||||
trId = null;
|
trId = null;
|
||||||
initWindow();
|
initWindow();
|
||||||
create();
|
create();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initWindow(){
|
protected void initWindow() {
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
setBodyBorder(false);
|
setBodyBorder(false);
|
||||||
|
@ -81,8 +78,8 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
setClosable(true);
|
setClosable(true);
|
||||||
setHeadingText("Progress");
|
setHeadingText("Progress");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void create(){
|
protected void create() {
|
||||||
FramedPanel panel = new FramedPanel();
|
FramedPanel panel = new FramedPanel();
|
||||||
panel.setWidth(PANELWIDTH);
|
panel.setWidth(PANELWIDTH);
|
||||||
panel.setHeight(PANELHEIGHT);
|
panel.setHeight(PANELHEIGHT);
|
||||||
|
@ -90,41 +87,44 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
panel.setBodyBorder(false);
|
panel.setBodyBorder(false);
|
||||||
|
|
||||||
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||||
/*FlowLayoutContainer progressDetailContainer = new FlowLayoutContainer();
|
/*
|
||||||
progressDetailContainer.setScrollMode(ScrollMode.AUTO);
|
* FlowLayoutContainer progressDetailContainer = new
|
||||||
MarginData layoutData = new MarginData(new Margins(5, 5, 5, 5));*/
|
* FlowLayoutContainer();
|
||||||
|
* progressDetailContainer.setScrollMode(ScrollMode.AUTO); MarginData
|
||||||
|
* layoutData = new MarginData(new Margins(5, 5, 5, 5));
|
||||||
|
*/
|
||||||
|
|
||||||
ProgressBar progressBar = new ProgressBar();
|
ProgressBar progressBar = new ProgressBar();
|
||||||
progressBar.setWidth(PROGRESSWIDTH);
|
progressBar.setWidth(PROGRESSWIDTH);
|
||||||
|
|
||||||
/*FieldSet detailsSet = new FieldSet();
|
/*
|
||||||
detailsSet.setHeadingText("Details");
|
* FieldSet detailsSet = new FieldSet();
|
||||||
detailsSet.setCollapsible(true);*/
|
* detailsSet.setHeadingText("Details");
|
||||||
|
* detailsSet.setCollapsible(true);
|
||||||
monitorDetailPanel=new MonitorDetailPanel(eventBus);
|
*/
|
||||||
//detailsSet.add(monitorDetailPanel);
|
|
||||||
|
monitorDetailPanel = new MonitorDetailPanel(eventBus);
|
||||||
/*TextField
|
// detailsSet.add(monitorDetailPanel);
|
||||||
|
|
||||||
FlowLayoutContainer progressDetailContainer = new FlowLayoutContainer();
|
/*
|
||||||
progressDetailContainer.setScrollMode(ScrollMode.ALWAYS);
|
* TextField
|
||||||
MarginData layoutData = new MarginData(new Margins(0, 5, 0, 0));
|
*
|
||||||
c.add(new TextButton("Button 1"), layoutData);
|
* FlowLayoutContainer progressDetailContainer = new
|
||||||
c.add(new TextButton("Button 2"), layoutData);
|
* FlowLayoutContainer();
|
||||||
c.add(new TextButton("Button 3"), layoutData);
|
* progressDetailContainer.setScrollMode(ScrollMode.ALWAYS); MarginData
|
||||||
Viewport v = new Viewport();
|
* layoutData = new MarginData(new Margins(0, 5, 0, 0)); c.add(new
|
||||||
v.add(c);
|
* TextButton("Button 1"), layoutData); c.add(new
|
||||||
RootPanel.get().add(v);
|
* TextButton("Button 2"), layoutData); c.add(new
|
||||||
*/
|
* TextButton("Button 3"), layoutData); Viewport v = new Viewport();
|
||||||
|
* v.add(c); RootPanel.get().add(v);
|
||||||
|
*/
|
||||||
|
|
||||||
btnOk = new TextButton("Ok");
|
btnOk = new TextButton("Ok");
|
||||||
btnOk.setWidth("70px");
|
btnOk.setWidth("70px");
|
||||||
//btnOk.setIcon(ResourceBundle.INSTANCE.ok());
|
// btnOk.setIcon(ResourceBundle.INSTANCE.ok());
|
||||||
//btnOk.setIconAlign(IconAlign.RIGHT);
|
// btnOk.setIconAlign(IconAlign.RIGHT);
|
||||||
btnOk.setTitle("Ok");
|
btnOk.setTitle("Ok");
|
||||||
|
|
||||||
|
|
||||||
btnOk.addSelectHandler(new SelectHandler() {
|
btnOk.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -132,14 +132,13 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btnBackground = new TextButton("Background");
|
btnBackground = new TextButton("Background");
|
||||||
btnBackground.setWidth("70px");
|
btnBackground.setWidth("70px");
|
||||||
//btnBackground.setIcon(ResourceBundle.INSTANCE.background());
|
// btnBackground.setIcon(ResourceBundle.INSTANCE.background());
|
||||||
//btnBackground.setIconAlign(IconAlign.RIGHT);
|
// btnBackground.setIconAlign(IconAlign.RIGHT);
|
||||||
btnBackground.setTitle("Background");
|
btnBackground.setTitle("Background");
|
||||||
|
|
||||||
|
|
||||||
btnBackground.addSelectHandler(new SelectHandler() {
|
btnBackground.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -147,17 +146,14 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
btnAbort = new TextButton("Abort");
|
btnAbort = new TextButton("Abort");
|
||||||
btnAbort.setWidth("70px");
|
btnAbort.setWidth("70px");
|
||||||
//btnAbort.setIcon(ResourceBundle.INSTANCE.abort());
|
// btnAbort.setIcon(ResourceBundle.INSTANCE.abort());
|
||||||
//btnAbort.setIconAlign(IconAlign.RIGHT);
|
// btnAbort.setIconAlign(IconAlign.RIGHT);
|
||||||
btnAbort.setTitle("Abort");
|
btnAbort.setTitle("Abort");
|
||||||
|
|
||||||
|
|
||||||
btnAbort.addSelectHandler(new SelectHandler() {
|
btnAbort.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -165,52 +161,53 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
|
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
|
||||||
flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||||
flowButton.setPack(BoxLayoutPack.CENTER);
|
flowButton.setPack(BoxLayoutPack.CENTER);
|
||||||
|
|
||||||
flowButton.add(btnOk, new BoxLayoutData(new Margins(0, 4, 0, 4)));
|
flowButton.add(btnOk, new BoxLayoutData(new Margins(0, 4, 0, 4)));
|
||||||
flowButton.add(btnBackground, new BoxLayoutData(new Margins(0, 4, 0, 4)));
|
flowButton.add(btnBackground,
|
||||||
|
new BoxLayoutData(new Margins(0, 4, 0, 4)));
|
||||||
flowButton.add(btnAbort, new BoxLayoutData(new Margins(0, 4, 0, 4)));
|
flowButton.add(btnAbort, new BoxLayoutData(new Margins(0, 4, 0, 4)));
|
||||||
|
|
||||||
|
v.add(progressBar, new VerticalLayoutData(1, -1,
|
||||||
v.add(progressBar,
|
|
||||||
new VerticalLayoutData(1, -1, new Margins(5, 5, 5, 5)));
|
|
||||||
|
|
||||||
v.add(monitorDetailPanel,new VerticalLayoutData(1, -1, new Margins(5, 5, 5, 5)));
|
|
||||||
|
|
||||||
v.add(flowButton, new VerticalLayoutData(1, 36,
|
|
||||||
new Margins(5, 5, 5, 5)));
|
new Margins(5, 5, 5, 5)));
|
||||||
|
|
||||||
/*progressDetailContainer.add(progressBar, layoutData);
|
v.add(monitorDetailPanel, new VerticalLayoutData(1, -1, new Margins(5,
|
||||||
progressDetailContainer.add(monitorDetailPanel, layoutData);*/
|
5, 5, 5)));
|
||||||
|
|
||||||
|
v.add(flowButton,
|
||||||
|
new VerticalLayoutData(1, 36, new Margins(5, 5, 5, 5)));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* progressDetailContainer.add(progressBar, layoutData);
|
||||||
|
* progressDetailContainer.add(monitorDetailPanel, layoutData);
|
||||||
|
*/
|
||||||
|
|
||||||
panel.add(v);
|
panel.add(v);
|
||||||
add(panel);
|
add(panel);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(
|
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(
|
||||||
taskId);
|
taskId);
|
||||||
progressUpdater = new MonitorUpdater(operationMonitorSession);
|
progressUpdater = new MonitorUpdater(operationMonitorSession);
|
||||||
progressUpdater.addListener(new MonitorBarUpdater(progressBar));
|
progressUpdater.addListener(new MonitorBarUpdater(progressBar));
|
||||||
|
|
||||||
progressUpdater.addListener(this);
|
progressUpdater.addListener(this);
|
||||||
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
|
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
|
||||||
addMonitorDialogEventUIListener(progressUpdater);
|
addMonitorDialogEventUIListener(progressUpdater);
|
||||||
show();
|
show();
|
||||||
btnOk.setVisible(false);
|
btnOk.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void startAbort() {
|
protected void startAbort() {
|
||||||
btnOk.setEnabled(false);
|
btnOk.setEnabled(false);
|
||||||
btnBackground.setEnabled(false);
|
btnBackground.setEnabled(false);
|
||||||
btnAbort.setEnabled(false);
|
btnAbort.setEnabled(false);
|
||||||
fireRequestAborted();
|
fireRequestAborted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void startBackground() {
|
protected void startBackground() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -221,6 +218,38 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAbortBtnEnabled() {
|
||||||
|
if (btnAbort != null) {
|
||||||
|
return btnAbort.isEnabled();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAbortBtnEnabled(boolean abortBtnEnabled) {
|
||||||
|
if (btnBackground != null) {
|
||||||
|
btnBackground.setEnabled(abortBtnEnabled);
|
||||||
|
btnBackground.setVisible(abortBtnEnabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public boolean isBackgroundBtnEnabled() {
|
||||||
|
if (btnBackground != null) {
|
||||||
|
return btnBackground.isEnabled();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBackgroundBtnEnabled(boolean backgroundBtnEnabled) {
|
||||||
|
if (btnBackground != null) {
|
||||||
|
btnBackground.setEnabled(backgroundBtnEnabled);
|
||||||
|
btnBackground.setVisible(backgroundBtnEnabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void addProgressDialogListener(MonitorDialogListener listener) {
|
public void addProgressDialogListener(MonitorDialogListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
@ -228,19 +257,20 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
public void removeProgressDialogListener(MonitorDialogListener listener) {
|
public void removeProgressDialogListener(MonitorDialogListener listener) {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addMonitorDialogEventUIListener(MonitorDialogEventUIListener listener) {
|
public void addMonitorDialogEventUIListener(
|
||||||
|
MonitorDialogEventUIListener listener) {
|
||||||
monitorDialogEventUIListeners.add(listener);
|
monitorDialogEventUIListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeMonitorDialogEventUIListener(MonitorDialogEventUIListener listener) {
|
public void removeMonitorDialogEventUIListener(
|
||||||
|
MonitorDialogEventUIListener listener) {
|
||||||
monitorDialogEventUIListeners.remove(listener);
|
monitorDialogEventUIListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorInitializing(OperationMonitor operationMonitor) {
|
public void monitorInitializing(OperationMonitor operationMonitor) {
|
||||||
if(monitorDetailPanel!=null){
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
@ -249,7 +279,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorUpdate(OperationMonitor operationMonitor) {
|
public void monitorUpdate(OperationMonitor operationMonitor) {
|
||||||
if(monitorDetailPanel!=null){
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
@ -257,7 +287,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorComplete(TRId trId, OperationMonitor operationMonitor) {
|
public void monitorComplete(TRId trId, OperationMonitor operationMonitor) {
|
||||||
if(monitorDetailPanel!=null){
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
Log.debug("Operation Complete return: " + trId.toString());
|
Log.debug("Operation Complete return: " + trId.toString());
|
||||||
|
@ -270,20 +300,21 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorFailed(Throwable caught, String reason, String details, OperationMonitor operationMonitor) {
|
public void monitorFailed(Throwable caught, String reason, String details,
|
||||||
if(monitorDetailPanel!=null){
|
OperationMonitor operationMonitor) {
|
||||||
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
|
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
if (caught instanceof TDGWTSessionExpiredException) {
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
eventBus.fireEvent(new SessionExpiredEvent(
|
eventBus.fireEvent(new SessionExpiredEvent(
|
||||||
SessionExpiredType.EXPIREDONSERVER));
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
} else {
|
} else {
|
||||||
fireOperationFailed(caught,reason,details);
|
fireOperationFailed(caught, reason, details);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateInvocation() {
|
public void updateInvocation() {
|
||||||
|
@ -295,8 +326,9 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorStopped(TRId trId, String reason, String details, OperationMonitor operationMonitor) {
|
public void monitorStopped(TRId trId, String reason, String details,
|
||||||
if(monitorDetailPanel!=null){
|
OperationMonitor operationMonitor) {
|
||||||
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
|
Log.debug("Operation Stopped: [" + trId.toString() + ", " + reason
|
||||||
|
@ -312,7 +344,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorGeneratingView(OperationMonitor operationMonitor) {
|
public void monitorGeneratingView(OperationMonitor operationMonitor) {
|
||||||
if(monitorDetailPanel!=null){
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
@ -321,13 +353,11 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorValidate(OperationMonitor operationMonitor) {
|
public void monitorValidate(OperationMonitor operationMonitor) {
|
||||||
if(monitorDetailPanel!=null){
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void monitorAborted() {
|
public void monitorAborted() {
|
||||||
|
@ -339,7 +369,7 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
public void monitorPutInBackground() {
|
public void monitorPutInBackground() {
|
||||||
fireOperationPutInBackground();
|
fireOperationPutInBackground();
|
||||||
close();
|
close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationComplete(TRId trId) {
|
protected void fireOperationComplete(TRId trId) {
|
||||||
|
@ -347,34 +377,35 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
listener.operationComplete(trId);
|
listener.operationComplete(trId);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationFailed(Throwable caught, String reason, String details) {
|
protected void fireOperationFailed(Throwable caught, String reason,
|
||||||
|
String details) {
|
||||||
for (MonitorDialogListener listener : listeners)
|
for (MonitorDialogListener listener : listeners)
|
||||||
listener.operationFailed(caught,reason, details);
|
listener.operationFailed(caught, reason, details);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationStopped(TRId trId, String reason, String details) {
|
protected void fireOperationStopped(TRId trId, String reason, String details) {
|
||||||
for (MonitorDialogListener listener : listeners)
|
for (MonitorDialogListener listener : listeners)
|
||||||
listener.operationStopped(trId, reason, details);
|
listener.operationStopped(trId, reason, details);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationAborted() {
|
protected void fireOperationAborted() {
|
||||||
for (MonitorDialogListener listener : listeners)
|
for (MonitorDialogListener listener : listeners)
|
||||||
listener.operationAborted();
|
listener.operationAborted();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireOperationPutInBackground() {
|
protected void fireOperationPutInBackground() {
|
||||||
for (MonitorDialogListener listener : listeners)
|
for (MonitorDialogListener listener : listeners)
|
||||||
listener.operationPutInBackground();
|
listener.operationPutInBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireRequestAborted(){
|
protected void fireRequestAborted() {
|
||||||
for(MonitorDialogEventUIListener listener: monitorDialogEventUIListeners){
|
for (MonitorDialogEventUIListener listener : monitorDialogEventUIListeners) {
|
||||||
listener.requestAborted();
|
listener.requestAborted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fireRequestPutInBackground(){
|
protected void fireRequestPutInBackground() {
|
||||||
for(MonitorDialogEventUIListener listener: monitorDialogEventUIListeners){
|
for (MonitorDialogEventUIListener listener : monitorDialogEventUIListeners) {
|
||||||
listener.requestPutInBackground();
|
listener.requestPutInBackground();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -384,30 +415,25 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void initTools() {
|
protected void initTools() {
|
||||||
/*if (backgroundBtnEnabled) {
|
/*
|
||||||
backgroundBtn = new ToolButton(ToolButton.CLOSE);
|
* if (backgroundBtnEnabled) { backgroundBtn = new
|
||||||
backgroundBtn.setToolTip("Put in the background");
|
* ToolButton(ToolButton.CLOSE);
|
||||||
backgroundBtn.addSelectHandler(new SelectHandler() {
|
* backgroundBtn.setToolTip("Put in the background");
|
||||||
|
* backgroundBtn.addSelectHandler(new SelectHandler() {
|
||||||
|
*
|
||||||
|
* @Override public void onSelect(SelectEvent event) { hide(); } });
|
||||||
|
*
|
||||||
|
* header.addTool(backgroundBtn); }
|
||||||
|
*/
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
header.addTool(backgroundBtn);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
super.initTools();
|
super.initTools();
|
||||||
|
|
||||||
closeBtn.setVisible(false);
|
closeBtn.setVisible(false);
|
||||||
/*
|
/*
|
||||||
closeBtn.addSelectHandler(new SelectHandler() {
|
* closeBtn.addSelectHandler(new SelectHandler() {
|
||||||
|
*
|
||||||
public void onSelect(SelectEvent event) {
|
* public void onSelect(SelectEvent event) { close(); } });
|
||||||
close();
|
*/
|
||||||
}
|
|
||||||
});*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,8 +442,8 @@ public class MonitorDialog extends Window implements MonitorUpdaterListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateOperationMonitor(OperationMonitor operationMonitor){
|
public void updateOperationMonitor(OperationMonitor operationMonitor) {
|
||||||
if(monitorDetailPanel!=null){
|
if (monitorDetailPanel != null) {
|
||||||
monitorDetailPanel.update(operationMonitor);
|
monitorDetailPanel.update(operationMonitor);
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
|
Loading…
Reference in New Issue