use of org.zaproxy.zap.extension.httppanel.view.HttpPanelView in project zaproxy by zaproxy.
the class HttpPanelComponentViewsManager method switchView.
private void switchView(final String name) {
if (this.currentView != null && this.currentView.getCaptionName().equals(name)) {
currentView.setSelected(true);
if (owner != null) {
owner.fireMessageViewChangedEvent(currentView, currentView);
}
return;
}
HttpPanelView view = views.get(name);
if (view == null) {
logger.info("No view found with name: " + name);
return;
}
HttpPanelView previousView = currentView;
if (this.currentView != null) {
this.currentView.setSelected(false);
this.currentView.getModel().clear();
}
this.currentView = view;
comboBoxModel.setSelectedItem(viewItems.get(name));
this.currentView.getModel().setMessage(message);
((CardLayout) panelViews.getLayout()).show(panelViews, name);
this.currentView.setSelected(true);
if (owner != null) {
owner.fireMessageViewChangedEvent(previousView, currentView);
}
}
Aggregations