Clazz.declarePackage ("JSV.js2d");
Clazz.load (["JSV.api.JSVMainPanel", "$.JSVViewPanel"], "JSV.js2d.JsViewPanel", ["JSV.common.Annotation"], function () {
c$ = Clazz.decorateAsClass (function () {
this.selectedPanel = null;
this.currentPanelIndex = 0;
this.title = null;
this.visible = false;
this.focusable = false;
this.enabled = false;
Clazz.instantialize (this, arguments);
}, JSV.js2d, "JsViewPanel", null, [JSV.api.JSVViewPanel, JSV.api.JSVMainPanel]);
Clazz.overrideMethod (c$, "getCurrentPanelIndex", 
function () {
return this.currentPanelIndex;
});
Clazz.overrideMethod (c$, "dispose", 
function () {
});
Clazz.overrideMethod (c$, "getTitle", 
function () {
return this.title;
});
Clazz.overrideMethod (c$, "setTitle", 
function (title) {
this.title = title;
}, "~S");
Clazz.overrideMethod (c$, "setSelectedPanel", 
function (jsvp, panelNodes) {
if (jsvp !== this.selectedPanel) {
this.selectedPanel = jsvp;
}for (var i = panelNodes.size (); --i >= 0; ) {
var j = panelNodes.get (i).jsvp;
if (j === jsvp) {
this.currentPanelIndex = i;
} else {
j.setEnabled (false);
j.setFocusable (false);
j.getPanelData ().closeAllDialogsExcept (JSV.common.Annotation.AType.NONE);
}}
this.markSelectedPanels (panelNodes);
this.visible = (jsvp != null);
}, "JSV.api.JSVPanel,JU.List");
Clazz.overrideMethod (c$, "markSelectedPanels", 
function (panelNodes) {
for (var i = panelNodes.size (); --i >= 0; ) panelNodes.get (i).isSelected = (this.currentPanelIndex == i);

}, "JU.List");
$_M(c$, "getHeight", 
function () {
return (this.selectedPanel == null ? 0 : this.selectedPanel.getHeight ());
});
$_M(c$, "getWidth", 
function () {
return (this.selectedPanel == null ? 0 : this.selectedPanel.getWidth ());
});
Clazz.overrideMethod (c$, "isEnabled", 
function () {
return this.enabled;
});
Clazz.overrideMethod (c$, "isFocusable", 
function () {
return this.focusable;
});
Clazz.overrideMethod (c$, "isVisible", 
function () {
return this.visible;
});
$_M(c$, "setEnabled", 
function (b) {
this.enabled = b;
}, "~B");
$_M(c$, "setFocusable", 
function (b) {
this.focusable = b;
}, "~B");
});
