def createTreeSwitch(self): b = NativeButton() b.setStyleName('tree-switch') b.addStyleName('down') b.setDescription('Toggle sample tree visibility') b.addListener(TreeClickListener(self), button.IClickListener) self._mainSplit.setSplitPosition(250, ISizeable.UNITS_PIXELS) return b
def createTreeSwitch(self): b = NativeButton() b.setStyleName('tree-switch') b.addStyleName('down') b.setDescription('Toggle sample tree visibility') b.addListener(TreeClickListener(self), button.IClickListener) self._mainSplit.setSplitPosition(250, ISizeable.UNITS_PIXELS) return b
def __init__(self): super(FeatureView, self).__init__() self._right = None self._left = None self._controls = None self._title = Label("", Label.CONTENT_XHTML) self._showSrc = None self._exampleCache = dict() self._currentFeature = None self._srcWindow = None self.setWidth('100%') self.setMargin(True) self.setSpacing(True) self.setStyleName('sample-view') self._left = VerticalLayout() self._left.setWidth('100%') self._left.setSpacing(True) self._left.setMargin(False) self.addComponent(self._left) self.setExpandRatio(self._left, 1) rightLayout = VerticalLayout() self._right = Panel(rightLayout) rightLayout.setMargin(True, False, False, False) self._right.setStyleName(Reindeer.PANEL_LIGHT) self._right.addStyleName('feature-info') self._right.setWidth('319px') self.addComponent(self._right) self._controls = HorizontalLayout() self._controls.setWidth('100%') self._controls.setStyleName('feature-controls') self._title.setStyleName('title') self._controls.addComponent(self._title) self._controls.setExpandRatio(self._title, 1) resetExample = NativeButton('Reset', ResetListener(self)) resetExample.setStyleName(BaseTheme.BUTTON_LINK) resetExample.addStyleName('reset') resetExample.setDescription('Reset Sample') self._controls.addComponent(resetExample) self._showSrc = ActiveLink() self._showSrc.setDescription( 'Right / middle / ctrl / shift -click for browser window/tab') self._showSrc.addListener(ShowSrcListener(self), ILinkActivatedListener) self._showSrc.setCaption(self._MSG_SHOW_SRC) self._showSrc.addStyleName('showcode') self._showSrc.setTargetBorder(Link.TARGET_BORDER_NONE) self._controls.addComponent(self._showSrc)
def __init__(self): super(FeatureView, self).__init__() self._right = None self._left = None self._controls = None self._title = Label("", Label.CONTENT_XHTML) self._showSrc = None self._exampleCache = dict() self._currentFeature = None self._srcWindow = None self.setWidth('100%') self.setMargin(True) self.setSpacing(True) self.setStyleName('sample-view') self._left = VerticalLayout() self._left.setWidth('100%') self._left.setSpacing(True) self._left.setMargin(False) self.addComponent(self._left) self.setExpandRatio(self._left, 1) rightLayout = VerticalLayout() self._right = Panel(rightLayout) rightLayout.setMargin(True, False, False, False) self._right.setStyleName(Reindeer.PANEL_LIGHT) self._right.addStyleName('feature-info') self._right.setWidth('319px') self.addComponent(self._right) self._controls = HorizontalLayout() self._controls.setWidth('100%') self._controls.setStyleName('feature-controls') self._title.setStyleName('title') self._controls.addComponent(self._title) self._controls.setExpandRatio(self._title, 1) resetExample = NativeButton('Reset', ResetListener(self)) resetExample.setStyleName(BaseTheme.BUTTON_LINK) resetExample.addStyleName('reset') resetExample.setDescription('Reset Sample') self._controls.addComponent(resetExample) self._showSrc = ActiveLink() self._showSrc.setDescription('Right / middle / ctrl / shift -click for browser window/tab') self._showSrc.addListener(ShowSrcListener(self), ILinkActivatedListener) self._showSrc.setCaption(self._MSG_SHOW_SRC) self._showSrc.addStyleName('showcode') self._showSrc.setTargetBorder(Link.TARGET_BORDER_NONE) self._controls.addComponent(self._showSrc)
def createPrevButton(self): b = NativeButton('', PrevClickListener(self, self._app)) b.setEnabled(False) b.setStyleName('previous') b.setDescription('Jump to the previous sample') return b
def createNextButton(self): b = NativeButton('', NextClickListener(self, self._app)) b.setStyleName('next') b.setDescription('Jump to the next sample') return b
def createLogo(self): logo = NativeButton('', LogoClickListener(self)) logo.setDescription('Home') logo.setStyleName(BaseTheme.BUTTON_LINK) logo.addStyleName('logo') return logo
def createPrevButton(self): b = NativeButton('', PrevClickListener(self, self._app)) b.setEnabled(False) b.setStyleName('previous') b.setDescription('Jump to the previous sample') return b
def createNextButton(self): b = NativeButton('', NextClickListener(self, self._app)) b.setStyleName('next') b.setDescription('Jump to the next sample') return b
def createLogo(self): logo = NativeButton('', LogoClickListener(self)) logo.setDescription('Home') logo.setStyleName(BaseTheme.BUTTON_LINK) logo.addStyleName('logo') return logo