Example #1
0
    def __init__(self,
                 modelXbrl,
                 tabWin,
                 tabTitle,
                 hasToolTip=False,
                 lang=None):
        self.tabWin = tabWin
        #self.viewFrame = Frame(tabWin)
        #self.viewFrame.grid(row=0, column=0, sticky=(N, S, E, W))
        '''
        paneWin = PanedWindow(self.viewFrame, orient=VERTICAL)
        paneWin.grid(row=1, column=0, sticky=(N, S, E, W))
        self.zGrid = scrollgrid(paneWin)
        self.zGrid.grid(row=0, column=0, sticky=(N, S, E, W))
        self.xyGrid = scrollgrid(paneWin)
        self.xyGrid.grid(row=1, column=0, sticky=(N, S, E, W))
        '''
        '''
        self.gridBody = scrollgrid(self.viewFrame)
        self.gridBody.grid(row=0, column=0, sticky=(N, S, E, W))
        '''

        self.viewFrame = scrolledHeaderedFrame(tabWin)
        self.viewFrame.view = self
        self.gridTblHdr = self.viewFrame.tblHdrInterior
        self.gridColHdr = self.viewFrame.colHdrInterior
        self.gridRowHdr = self.viewFrame.rowHdrInterior
        self.gridBody = self.viewFrame.bodyInterior
        '''
        self.viewFrame = scrolledFrame(tabWin)
        self.gridTblHdr = self.gridRowHdr = self.gridColHdr = self.gridBody = self.viewFrame.interior
        '''

        tabWin.add(self.viewFrame, text=tabTitle)
        self.modelXbrl = modelXbrl
        self.hasToolTip = hasToolTip
        self.toolTipText = StringVar()
        if hasToolTip:
            self.gridBody.bind("<Motion>", self.motion, '+')
            self.gridBody.bind("<1>", self.onClick, '+')
            self.gridBody.bind("<Leave>", self.leave, '+')
            self.toolTipText = StringVar()
            self.toolTip = ToolTip(self.gridBody,
                                   textvariable=self.toolTipText,
                                   wraplength=480,
                                   follow_mouse=True,
                                   state="disabled")
            self.toolTipColId = None
            self.toolTipRowId = None
        self.modelXbrl = modelXbrl
        self.contextMenuClick = self.modelXbrl.modelManager.cntlr.contextMenuClick
        self.gridTblHdr.contextMenuClick = self.contextMenuClick
        self.gridColHdr.contextMenuClick = self.contextMenuClick
        self.gridRowHdr.contextMenuClick = self.contextMenuClick
        self.gridBody.contextMenuClick = self.contextMenuClick
        self.lang = lang
        if modelXbrl:
            modelXbrl.views.append(self)
            if not lang:
                self.lang = modelXbrl.modelManager.defaultLang
Example #2
0
 def __init__(self, modelXbrl, tabWin, tabTitle, hasToolTip=False, lang=None):
     self.tabWin = tabWin
     #self.viewFrame = Frame(tabWin)
     #self.viewFrame.grid(row=0, column=0, sticky=(N, S, E, W))
     '''
     paneWin = PanedWindow(self.viewFrame, orient=VERTICAL)
     paneWin.grid(row=1, column=0, sticky=(N, S, E, W))
     self.zGrid = scrollgrid(paneWin)
     self.zGrid.grid(row=0, column=0, sticky=(N, S, E, W))
     self.xyGrid = scrollgrid(paneWin)
     self.xyGrid.grid(row=1, column=0, sticky=(N, S, E, W))
     '''
     '''
     self.gridBody = scrollgrid(self.viewFrame)
     self.gridBody.grid(row=0, column=0, sticky=(N, S, E, W))
     '''
     
     self.viewFrame = scrolledHeaderedFrame(tabWin)
     self.viewFrame.view = self
     self.gridTblHdr = self.viewFrame.tblHdrInterior
     self.gridColHdr = self.viewFrame.colHdrInterior
     self.gridRowHdr = self.viewFrame.rowHdrInterior
     self.gridBody = self.viewFrame.bodyInterior
     '''
     self.viewFrame = scrolledFrame(tabWin)
     self.gridTblHdr = self.gridRowHdr = self.gridColHdr = self.gridBody = self.viewFrame.interior
     '''
     
     tabWin.add(self.viewFrame,text=tabTitle)
     self.modelXbrl = modelXbrl
     self.hasToolTip = hasToolTip
     self.toolTipText = StringVar()
     if hasToolTip:
         self.gridBody.bind("<Motion>", self.motion, '+')
         self.gridBody.bind("<1>", self.onClick, '+')
         self.gridBody.bind("<Leave>", self.leave, '+')
         self.toolTipText = StringVar()
         self.toolTip = ToolTip(self.gridBody, 
                                textvariable=self.toolTipText, 
                                wraplength=480, 
                                follow_mouse=True,
                                state="disabled")
         self.toolTipColId = None
         self.toolTipRowId = None
     self.modelXbrl = modelXbrl
     self.contextMenuClick = self.modelXbrl.modelManager.cntlr.contextMenuClick
     self.gridTblHdr.contextMenuClick = self.contextMenuClick
     self.gridColHdr.contextMenuClick = self.contextMenuClick
     self.gridRowHdr.contextMenuClick = self.contextMenuClick
     self.gridBody.contextMenuClick = self.contextMenuClick
     self.lang = lang
     if modelXbrl:
         modelXbrl.views.append(self)
         if not lang: 
             self.lang = modelXbrl.modelManager.defaultLang
Example #3
0
    def __init__(self, modelXbrl, tabWin, tabTitle,
                 hasToolTip=False, lang=None):
        contentView = scrolledHeaderedFrame(tabWin)
        super(ViewGrid, self).__init__(modelXbrl, tabWin, tabTitle,
                                       contentView, hasToolTip=hasToolTip,
                                       lang=lang)
        self.gridTblHdr = self.viewFrame.tblHdrInterior
        self.gridColHdr = self.viewFrame.colHdrInterior
        self.gridRowHdr = self.viewFrame.rowHdrInterior
        self.gridBody = self.viewFrame.bodyInterior

        self.gridTblHdr.contextMenuClick = self.contextMenuClick
        self.gridColHdr.contextMenuClick = self.contextMenuClick
        self.gridRowHdr.contextMenuClick = self.contextMenuClick
        self.gridBody.contextMenuClick = self.contextMenuClick
Example #4
0
    def __init__(self,
                 modelXbrl,
                 tabWin,
                 tabTitle,
                 hasToolTip=False,
                 lang=None):
        contentView = scrolledHeaderedFrame(tabWin)
        super(ViewGrid, self).__init__(modelXbrl,
                                       tabWin,
                                       tabTitle,
                                       contentView,
                                       hasToolTip=hasToolTip,
                                       lang=lang)
        self.gridTblHdr = self.viewFrame.tblHdrInterior
        self.gridColHdr = self.viewFrame.colHdrInterior
        self.gridRowHdr = self.viewFrame.rowHdrInterior
        self.gridBody = self.viewFrame.bodyInterior

        self.gridTblHdr.contextMenuClick = self.contextMenuClick
        self.gridColHdr.contextMenuClick = self.contextMenuClick
        self.gridRowHdr.contextMenuClick = self.contextMenuClick
        self.gridBody.contextMenuClick = self.contextMenuClick