summaryrefslogtreecommitdiff
path: root/swat/style/qooxdoo/widgets/widgets/QxBarSelectorButton.js
blob: 5aa4612267a0479be2f5309d8d19b0f9bb1c4f79 (plain)
1
2
/* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */
function QxBarSelectorButton(vText,vIcon,vIconWidth,vIconHeight,vChecked){QxTab.call(this,vText,vIcon,vIconWidth,vIconHeight,vChecked);this.setIconPosition("top");this.setHorizontalBlockAlign("center");this.setVerticalBlockAlign("middle");};QxBarSelectorButton.extend(QxTab,"QxBarSelectorButton");proto._g5=function(e){switch(this.getParent().getState()){case "top":case "bottom":switch(e.getKeyCode()){case QxKeyEvent.keys.left:var vPrevious=true;break;case QxKeyEvent.keys.right:var vPrevious=false;break;default:return;};break;case "left":case "right":switch(e.getKeyCode()){case QxKeyEvent.keys.up:var vPrevious=true;break;case QxKeyEvent.keys.down:var vPrevious=false;break;default:return;};break;default:return;};var vChild=vPrevious?this.isFirstChild()?this.getParent().getLastChild():this.getPreviousSibling():this.isLastChild()?this.getParent().getFirstChild():this.getNextSibling();vChild.setFocused(true);vChild.setChecked(true);};