      1 /*
      2  *  Copyright (C) 2008-2009 WaveMaker Software, Inc.
      3  *
      4  *  This file is part of the WaveMaker Client Runtime.
      5  *
      6  *  Licensed under the Apache License, Version 2.0 (the "License");
      7  *  you may not use this file except in compliance with the License.
      8  *  You may obtain a copy of the License at
      9  *
     10  *      http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  *  Unless required by applicable law or agreed to in writing, software
     13  *  distributed under the License is distributed on an "AS IS" BASIS,
     14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  *  See the License for the specific language governing permissions and
     16  *  limitations under the License.
     17  */
     18 dojo.provide("wm.base.widget.Panel");
     19
     20 /**
     21 	Container for widgets.
     22 	@name wm.Panel
     23 	@class
     24 	@extends wm.Container
     25 */
     26 dojo.declare("wm.Panel", wm.Container, {
     27 	/** @lends wm.Panel.prototype */
     28 	//border: 1,
     29 	classNames: "wmcontainer wmpanel"
     30 });
     31
     32 wm.Panel.extend({
     33 	// backward-compatibility fixups
     34 	afterPaletteDrop: function() {
     35 		this.inherited(arguments);
     36 		var v = "top-to-bottom", h = "left-to-right", pv = (this.parent.layoutKind == v);
     37 		this.setLayoutKind(pv ? h : v);
     38 		if (pv)
     39 			this.setWidth("100%");
     40 		else
     41 			this.setHeight("100%");
     42 	}
     43 })
     44
     45
     46 wm.Panel.description = "A container for widgets.";
     47