def _createImageMap(self): imageList = ZMappedImageList() imageList.addImage(u"template", getResourceRegistry().getBitmap( u"images/dialogs/template/manager/template.png") ) #$NON-NLS-1$ #$NON-NLS-2$ return imageList
def _createImageList(self): # FIXME (EPW) Move account and blog icons to a common area and use from there (also chnage navigator) registry = getResourceRegistry() imgList = ZMappedImageList() imgList.addImage(u"account", registry.getBitmap(u"images/perspectives/standard/navigator/account.png")) #$NON-NLS-1$ #$NON-NLS-2$ return imgList
def _createImageList(self): imageList = ZMappedImageList() for tab in self.tabs: bitmap = tab.getTabInfo().getBitmap() if bitmap is not None: imageList.addImage(unicode(tab.getTabId()), bitmap) return imageList
class ZMediaStorageListContentProvider(IZListViewExContentProvider): def __init__(self, zmediaStorageManagerModel): self.model = zmediaStorageManagerModel self.imageList = ZMappedImageList() self._populateImageList() self.columns = [ (_extstr(u"mediastoragedialog.Name"), None, wx.LIST_FORMAT_LEFT, ZListViewEx.COLUMN_RELATIVE, 65), #$NON-NLS-1$ (_extstr(u"mediastoragedialog.Type"), None, wx.LIST_FORMAT_LEFT, ZListViewEx.COLUMN_RELATIVE, 35) #$NON-NLS-1$ ] # end __init__() def _populateImageList(self): for site in self.model.getMediaSites(): iconKey = site.getId() iconPath = site.getIconPath() icon = wx.Image(iconPath, getImageType(iconPath)).ConvertToBitmap() self.imageList.addImage(iconKey, icon) # end _populateImageList() def getImageList(self): return self.imageList # end getImageList() def getNumColumns(self): return 2 # end getNumColumns() def getNumRows(self): return len(self.model.getMediaStorages()) # end getNumRows() # Return value format: (label, imageKey, style, width) def getColumnInfo(self, columnIndex): return self.columns[columnIndex] # end getColumnInfo() def getRowText(self, rowIndex, columnIndex): store = self.model.getMediaStorages()[rowIndex] if columnIndex == 0: return store.getName() elif columnIndex == 1: return self.model.getMediaSite(store).getDisplayName() # end getRowText() def getRowImage(self, rowIndex, columnIndex): if columnIndex == 0: store = self.model.getMediaStorages()[rowIndex] imageKey = self.model.getImageKey(store) return self.imageList[imageKey] return -1
def _createImageMap(self): imageList = ZMappedImageList() bitmap = getResourceRegistry().getBitmap(u"images/dialogs/translation/editor/checked.png") #$NON-NLS-1$ imageList.addImage(u"checked", bitmap) #$NON-NLS-1$ bitmap = getResourceRegistry().getBitmap(u"images/dialogs/translation/editor/unchecked.png") #$NON-NLS-1$ imageList.addImage(u"unchecked", bitmap) #$NON-NLS-1$ return imageList
def _createTreeImageList(self): registry = getResourceRegistry() imgList = ZMappedImageList() for img in [u"unpublished", u"account", u"blog", u"posts", u"links", u"images", u"tags"]: #$NON-NLS-1$ #$NON-NLS-2$ #$NON-NLS-3$ #$NON-NLS-4$ #$NON-NLS-5$ #$NON-NLS-6$ #$NON-NLS-7$ #$NON-NLS-8$ imgList.addImage(img, registry.getBitmap(u"images/perspectives/standard/navigator/%s.png" % img)) #$NON-NLS-1$ return imgList
def _createImageList(self): imageList = ZMappedImageList(16, 11) for localeStr in self.model.getLanguagePacks(): bitmap = getFlagBitmapForLocale(localeStr) if bitmap is not None: imageList.addImage(localeStr, bitmap) return imageList
def _createImageList(self): # FIXME (EPW) Move icons to a common area and use from there (also change navigator) registry = getResourceRegistry() imgList = ZMappedImageList() for img in [u"posts", u"links", u"images", u"tags"]: #$NON-NLS-1$ #$NON-NLS-2$ #$NON-NLS-3$ #$NON-NLS-4$ #$NON-NLS-5$ #$NON-NLS-6$ #$NON-NLS-7$ #$NON-NLS-8$ imgList.addImage(img, registry.getBitmap(u"images/perspectives/standard/navigator/%s.png" % img)) #$NON-NLS-1$ return imgList
def _createImageList(self): imageList = ZMappedImageList() imageList.addImage( u"blog", getResourceRegistry().getBitmap( u"images/perspectives/standard/navigator/blog.png") ) #$NON-NLS-1$ #$NON-NLS-2$ return imageList
def _createImageMap(self): imageList = ZMappedImageList() bitmap = getResourceRegistry().getBitmap( u"images/dialogs/translation/editor/checked.png") #$NON-NLS-1$ imageList.addImage(u"checked", bitmap) #$NON-NLS-1$ bitmap = getResourceRegistry().getBitmap( u"images/dialogs/translation/editor/unchecked.png") #$NON-NLS-1$ imageList.addImage(u"unchecked", bitmap) #$NON-NLS-1$ return imageList
def _createTreeImageList(self): registry = getResourceRegistry() imgList = ZMappedImageList() for img in [u"account", u"blog"]: # $NON-NLS-1$ #$NON-NLS-2$ imgList.addImage( img, registry.getBitmap(u"images/perspectives/standard/navigator/%s.png" % img) ) # $NON-NLS-1$ return imgList
def _createImageList(self): imageList = ZMappedImageList(16, 11) for language in self.model.getLanguages(): langCode = language.getLanguageCode() bitmap = getFlagBitmapForLocale(langCode) if bitmap is not None: imageList.addImage(langCode, bitmap) return imageList
def _createImageList(self): # FIXME (EPW) Move account and blog icons to a common area and use from there (also chnage navigator) registry = getResourceRegistry() imgList = ZMappedImageList() imgList.addImage(u"blog", registry.getBitmap( u"images/perspectives/standard/navigator/blog.png" )) #$NON-NLS-1$ #$NON-NLS-2$ return imgList
def _createTreeImageList(self): registry = getResourceRegistry() imgList = ZMappedImageList() for img in [u"account", u"blog"]: #$NON-NLS-1$ #$NON-NLS-2$ imgList.addImage( img, registry.getBitmap( u"images/perspectives/standard/navigator/%s.png" % img)) #$NON-NLS-1$ return imgList
def _createTreeImageList(self): registry = getResourceRegistry() imgList = ZMappedImageList() for img in [ u"unpublished", u"account", u"blog", u"posts", u"links", u"images", u"tags" ]: #$NON-NLS-1$ #$NON-NLS-2$ #$NON-NLS-3$ #$NON-NLS-4$ #$NON-NLS-5$ #$NON-NLS-6$ #$NON-NLS-7$ #$NON-NLS-8$ imgList.addImage( img, registry.getBitmap( u"images/perspectives/standard/navigator/%s.png" % img)) #$NON-NLS-1$ return imgList
class ZValidationReportListViewContentProvider(IZListViewExContentProvider): def __init__(self, izConfigValidationReporter): self.reporter = izConfigValidationReporter self.imageList = ZMappedImageList() registry = getResourceRegistry() self.imageList.addImage( u"%d" % ZValidationReportEntry.INFO, registry.getBitmap( u"images/common/check_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage( u"%d" % ZValidationReportEntry.WARNING, registry.getBitmap(u"images/common/warning_whitebg.png" )) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage( u"%d" % ZValidationReportEntry.ERROR, registry.getBitmap( u"images/common/error_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ # end __init__() def getImageList(self): return self.imageList # end getImageList() def getNumColumns(self): return 1 # end getNumColumns() def getNumRows(self): return len(self.reporter.listReports()) # end getNumRows() def getColumnInfo(self, columnIndex): columnName = None if columnIndex == 0: columnName = u"Message" #$NON-NLS-1$ return (columnName, None, 0, ZListViewEx.COLUMN_RELATIVE, 100) # end getColumnInfo() def getRowText(self, rowIndex, columnIndex): #@UnusedVariable validationReportEntry = self.reporter.listReports()[rowIndex] return validationReportEntry.getMessage() # end getRowText() def getRowImage(self, rowIndex, columnIndex): #@UnusedVariable validationReportEntry = self.reporter.listReports()[rowIndex] return self.imageList[u"%d" % validationReportEntry.getType()] #$NON-NLS-1$ # end getRowImage() # end ZValidationReportListViewContentProvider
class ZValidationReportListViewContentProvider(IZListViewExContentProvider): def __init__(self, izConfigValidationReporter): self.reporter = izConfigValidationReporter self.imageList = ZMappedImageList() registry = getResourceRegistry() self.imageList.addImage(u"%d" % ZValidationReportEntry.INFO, registry.getBitmap(u"images/common/check_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage(u"%d" % ZValidationReportEntry.WARNING, registry.getBitmap(u"images/common/warning_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage(u"%d" % ZValidationReportEntry.ERROR, registry.getBitmap(u"images/common/error_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ # end __init__() def getImageList(self): return self.imageList # end getImageList() def getNumColumns(self): return 1 # end getNumColumns() def getNumRows(self): return len( self.reporter.listReports() ) # end getNumRows() def getColumnInfo(self, columnIndex): columnName = None if columnIndex == 0: columnName = u"Message" #$NON-NLS-1$ return (columnName, None, 0, ZListViewEx.COLUMN_RELATIVE, 100) # end getColumnInfo() def getRowText(self, rowIndex, columnIndex): #@UnusedVariable validationReportEntry = self.reporter.listReports()[rowIndex] return validationReportEntry.getMessage() # end getRowText() def getRowImage(self, rowIndex, columnIndex): #@UnusedVariable validationReportEntry = self.reporter.listReports()[rowIndex] return self.imageList[u"%d" % validationReportEntry.getType() ] #$NON-NLS-1$ # end getRowImage() # end ZValidationReportListViewContentProvider
def _createImageList(self): imageList = ZMappedImageList() for prefDef in self.prefsDefs: imageList.addImage(prefDef.getIconKey(), prefDef.loadIcon()) return imageList
def _createImageList(self): imgList = ZMappedImageList() for (label, imagePath) in IMAGE_LIST_DATA: imgList.addImage(label, getResourceRegistry().getBitmap(imagePath)) return imgList
class ZXhtmlValidationReportListViewContentProvider(IZListViewExContentProvider): def __init__(self): self.columnInfo = [(u"Line",10), (u"Column", 10), (u"Message", 80)] #$NON-NLS-1$ #$NON-NLS-2$ #$NON-NLS-3$ self.validationMessageList = [] self.imageList = ZMappedImageList() registry = getResourceRegistry() self.imageList.addImage(u"%d" % ZXhtmlValidationMessage.SUCCESS, registry.getBitmap(u"images/common/check2_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage(u"%d" % ZXhtmlValidationMessage.INFO, registry.getBitmap(u"images/common/information_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage(u"%d" % ZXhtmlValidationMessage.WARNING, registry.getBitmap(u"images/common/warning_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage(u"%d" % ZXhtmlValidationMessage.ERROR, registry.getBitmap(u"images/common/error_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ self.imageList.addImage(u"%d" % ZXhtmlValidationMessage.FATAL, registry.getBitmap(u"images/common/error_whitebg.png")) #$NON-NLS-1$ #$NON-NLS-2$ # end __init__() def setValidationMessages(self, validationMessageList): # list of ZXhtmlValidationMessage self.clearValidationMessages() if validationMessageList: self.validationMessageList = validationMessageList # end setValidationMessages def addValidationMessage(self, zxhtmlValidationMessage): if zxhtmlValidationMessage: self.validationMessageList.append(zxhtmlValidationMessage) # end addValidationMessages() def getValidationMessage(self, index): if index >= 0 and index < len(self.validationMessageList): return self.validationMessageList[index] else: return None # end getValidationMessage() def getValidationMessages(self): return self.validationMessageList # end getValidationMessages() def clearValidationMessages(self): self.validationMessageList = [] # end clearValidationMessages() def getImageList(self): return self.imageList # end getImageList() def getNumColumns(self): return len(self.columnInfo) # end getNumColumns() def getNumRows(self): return len( self.validationMessageList ) # end getNumRows() def getColumnInfo(self, columnIndex): (columnName, widthPercent) = self.columnInfo[columnIndex] return (columnName, None, 0, ZListViewEx.COLUMN_RELATIVE, widthPercent) # end getColumnInfo() def getRowText(self, rowIndex, columnIndex): #@UnusedVariable zxhtmlValidationMessage = self.validationMessageList[rowIndex] if columnIndex == 0: if zxhtmlValidationMessage.getLine() >= 0: return u"%3d" % zxhtmlValidationMessage.getLine() #$NON-NLS-1$ else: return u"" #$NON-NLS-1$ elif columnIndex == 1: if zxhtmlValidationMessage.getColumn() >= 0: return u"%3d" % zxhtmlValidationMessage.getColumn() #$NON-NLS-1$ else: return u"" #$NON-NLS-1$ else: return zxhtmlValidationMessage.getMessage() # end getRowText() def getRowImage(self, rowIndex, columnIndex): #@UnusedVariable if columnIndex == 0: zxhtmlValidationMessage = self.validationMessageList[rowIndex] return self.imageList[u"%d" % zxhtmlValidationMessage.getSeverity() ] #$NON-NLS-1$ else: return -1
def _createImageMap(self): imageList = ZMappedImageList() imageList.addImage(u"template", getResourceRegistry().getBitmap(u"images/dialogs/template/manager/template.png")) #$NON-NLS-1$ #$NON-NLS-2$ return imageList
def _createImageList(self): imageList = ZMappedImageList() imageList.addImage(u"blog", getResourceRegistry().getBitmap(u"images/perspectives/standard/navigator/blog.png")) #$NON-NLS-1$ #$NON-NLS-2$ return imageList