Update of /cvsroot/qooxdoo/qooxdoo/source/contributed/buttonpane_olsen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26489/source/contributed/buttonpane_olsen
Added Files:
Tag: renderer
OptionPane_1.html OptionPane_2.html QxButtonPane.js
QxOptionPane.js
Log Message:
Added contributed section
--- NEW FILE: QxOptionPane.js ---
/* ****************************************************************************
qooxdoo - the new era of web interface development
Version:
$Id: QxOptionPane.js,v 1.1.2.1 2006/01/24 14:12:45 wpbasti Exp $
Copyright:
(C) 2004-2005 by Schlund + Partner AG, Germany
All rights reserved
License:
LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/
Internet:
* http://qooxdoo.oss.schlund.de
Authors:
* Kent Olsson (kols)
<kent dot olsson at chello dot se>
**************************************************************************** */
/* ****************************************************************************
#package(optionpane)
**************************************************************************** */
function QxOptionPane(vMessage, vMessageIcon) {
QxCanvasLayout.call(this);
this.setWidth(null);
this.setHeight(null);
var messageHBL = this._messageLayout = new QxHorizontalBoxLayout();
messageHBL.setHorizontalAlign("center");
var messageI = this._icon = new QxImage(vMessageIcon);
var messageL = this._message = new QxLabel(vMessage);
messageHBL.add(messageI, messageL);
var buttonsBP = this._buttons = new QxButtonPane();
buttonsBP.setHorizontalAlign("center");
// this._buttonsBP.getOKButton().addEventListener("execute", function ok() {
// this.close();
// return true;
// });
// this._buttonsBP.getCancelButton().addEventListener("execute", function cancel() {
// this.close();
// return false;
// });
// this._buttonsBP.getHelpButton().addEventListener("execute", function help() {
// // open the help!!!
// });
var layoutVBL = this._layout = new QxVerticalBoxLayout();
layoutVBL.setPadding(5);
layoutVBL.add(messageHBL, buttonsBP);
this.add(layoutVBL);
};
QxOptionPane.extend(QxCanvasLayout, "QxOptionPane");
/*
------------------------------------------------------------------------------------
STYLES & BEHAVIOR
------------------------------------------------------------------------------------
*/
//proto._applyInitialStyle = function(statustext)
//{
// this.setBorder(1, QxConst.BORDER_STYLE_INSET, "windowtext");
// this.setBackgroundColor("threedface");
//};
/*
------------------------------------------------------------------------------------
UTILITIES
------------------------------------------------------------------------------------
*/
proto.getMessage = function() {
return this.vMessage;
};
proto.getButtonPane = function() {
return this._buttonsBP;
};
proto.createDialog = function(vTitle, vIcon) {
var messageW = this._messageW = new QxWindow(vTitle, vIcon);
messageW.setAllowMaximize(false);
messageW.setModal(true);
messageW.add(this);
return messageW;
};
/*
------------------------------------------------------------------------------------
DISPOSER
------------------------------------------------------------------------------------
*/
proto.dispose = function()
{
if (this.getDisposed()) {
return true;
};
// if (this._messageL)
// {
// this._messageL.dispose();
// this._messageL = null;
// };
// if (this._buttonsBP)
// {
// this._buttonsBP.dispose();
// this._buttonsBP = null;
// };
// if (this._layoutVBL)
// {
// this._layoutVBL.dispose();
// this._layoutVBL = null;
// };
return QxWindow.prototype.dispose.call(this);
};
--- NEW FILE: QxButtonPane.js ---
/* ****************************************************************************
qooxdoo - the new era of web interface development
Version:
$Id: QxButtonPane.js,v 1.1.2.1 2006/01/24 14:12:45 wpbasti Exp $
Copyright:
(C) 2004-2005 by Schlund + Partner AG, Germany
All rights reserved
License:
LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/
Internet:
* http://qooxdoo.oss.schlund.de
Authors:
* Kent Olsson (kols)
<kent dot olsson at chello dot se>
**************************************************************************** */
/* ****************************************************************************
#package(buttonpane)
**************************************************************************** */
function QxButtonPane() {
QxBoxLayout.call(this, QxConst.ORIENTATION_HORIZONTAL);
var okB = this._ok = new QxButton("Ok");
okB.setPadding(5,1,2,2);
var cancelB = this._cancel = new QxButton("Cancel");
cancelB.setPadding(5,1,2,1);
var helpB = this._help = new QxButton("Help");
helpB.setPadding(5,2,2,1);
this.add(okB, cancelB, helpB);
};
QxButtonPane.extend(QxBoxLayout, "QxButtonPane");
/*
------------------------------------------------------------------------------------
STYLES & BEHAVIOR
------------------------------------------------------------------------------------
*/
//proto._applyInitialStyle = function(statustext)
//{
// this.setBorder(1, QxConst.BORDER_STYLE_INSET, "windowtext");
// this.setBackgroundColor("threedface");
//};
/*
------------------------------------------------------------------------------------
UTILITIES
------------------------------------------------------------------------------------
*/
//proto.getOKButton = function() {
// return this._okB;
//};
//proto.getCancelButton = function() {
// return this._cancelB;
//};
//proto.getHelpButton = function() {
// return this._helpB;
//};
/*
------------------------------------------------------------------------------------
DISPOSER
------------------------------------------------------------------------------------
*/
proto.dispose = function()
{
if (this.getDisposed()) {
return true;
};
// if (this._okB)
// {
// this._okB.dispose();
// this._okB = null;
// };
// if (this._cancelB)
// {
// this._cancelB.dispose();
// this._cancelB = null;
// };
// if (this._helpB)
// {
// this._helpB.dispose();
// this._helpB = null;
// };
return QxBoxLayout.prototype.dispose.call(this);
};
--- NEW FILE: OptionPane_2.html ---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<script type="text/javascript">window._htmlstart=(new Date).valueOf()</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<meta http-equiv="MsThemeCompatible" content="yes" />
<meta http-equiv="ImageToolBar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="yes" />
<title>qooxdoo demo dev</title>
<link type="text/css" rel="stylesheet" href="../../style/qooxdoo.css"/>
<link type="text/css" rel="stylesheet" href="../../style/demolayout.css"/>
<script type="text/javascript" src="../../../tools/script/includer.js"></script>
<script type="text/javascript" src="QxOptionPane.js"></script>
<script type="text/javascript" src="QxButtonPane.js"></script>
</head>
<body>
<script type="text/javascript" src="../../../tools/script/demolayout.js"></script>
<div id="testDescription">
<p>Testing OptionPane implementation.</p>
<p>The elements of the dialog will be created on the first open of the QxOptionPane.</p>
</div>
<script type="text/javascript">
window.application.main = function()
{
var doc = this.getClientWindow().getClientDocument();
var messageI = new QxImage("icons/kids/16/stop.png", 48, 48);
var mainOP = new QxOptionPane("Do you really want to delete the file?", null);
mainOP.setTop(50);
var mainD = mainOP.createDialog("Delete File", null);
doc.add(mainD);
mainD.open();
};
</script>
</body>
</html>
--- NEW FILE: OptionPane_1.html ---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<script type="text/javascript">window._htmlstart=(new Date).valueOf()</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<meta http-equiv="MsThemeCompatible" content="yes" />
<meta http-equiv="ImageToolBar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="yes" />
<title>qooxdoo demo dev</title>
<link type="text/css" rel="stylesheet" href="../../style/qooxdoo.css"/>
<link type="text/css" rel="stylesheet" href="../../style/demolayout.css"/>
<script type="text/javascript" src="../../../tools/script/includer.js"></script>
<script type="text/javascript" src="QxOptionPane.js"></script>
<script type="text/javascript" src="QxButtonPane.js"></script>
</head>
<body>
<script type="text/javascript" src="../../../tools/script/demolayout.js"></script>
<div id="testDescription">
<p>Testing OptionPane implementation.</p>
<p>The elements of the pane will be created on the first open of the QxOptionPane.</p>
</div>
<script type="text/javascript">
window.application.main = function()
{
var doc = this.getClientWindow().getClientDocument();
var messageI = new QxImage("icons/kids/16/stop.png", 48, 48);
var mainOP = new QxOptionPane("Do you really want to delete the file?", null);
mainOP.setTop(50);
doc.add(mainOP);
};
</script>
</body>
</html>
|