def showHeaderHelpText(self, column):
        """Shows some help text when clicking on the header

        @param column
        """
        notification = None
        # Description
        if column == ExampleUtil.ORDER_DESCRIPTION_PROPERTY_ID:
            notification = Notification(str(column) + '<br>',
                    'The description describes the type of product '
                    'that has been ordered.')
        # Item price
        elif column == ExampleUtil.ORDER_ITEMPRICE_PROPERTY_ID:
            notification = Notification(str(column) + '<br>',
                    'The item price is calculated by multiplying '
                    'the unit price with the quantity.')
        # Quantity
        elif column == ExampleUtil.ORDER_QUANTITY_PROPERTY_ID:
            notification = Notification(str(column) + '<br>',
                    'The quantity describes how many items has been ordered.')
        # Unit price
        elif column == ExampleUtil.ORDER_UNITPRICE_PROPERTY_ID:
            notification = Notification(str(column) + '<br>',
                    'The unit price is how much a single items costs. '
                    'Taxes included.')
        else:
            return

        self.getWindow().showNotification(notification)
 def buttonClick(self, event):
     # create Notification instance and customize
     n = Notification(self._caption.getValue(),
             self._description.getValue(), self._style.getValue())
     n.setPosition(self._position.getValue())
     d = self._delay.getValue()
     n.setDelayMsec( int(d) )  # sec->msec
     self._c.getWindow().showNotification(n)
Exemple #3
0
 def showPojoState(self):
     n = Notification('POJO state', Notification.TYPE_TRAY_NOTIFICATION)
     n.setPosition(Notification.POSITION_CENTERED)
     n.setDescription('First name: ' + self._person.getFirstName()
             + '<br/>Last name: ' + self._person.getLastName()
             + '<br/>Country: ' + self._person.getCountryCode()
             + '<br/>Birthdate: ' + self._person.getBirthdate()
             + '<br/>Shoe size: ' + self._person.getShoesize()
             + '<br/>Password: '******'<br/>UUID: ' + self._person.getUuid())
     self.getWindow().showNotification(n)
    def showFooterHelpText(self, column):
        """Shows a footer help text

        @param column
        """
        notification = Notification('Total Price<br>',
                'The total price is calculated by summing every items '
                'item price together.')

        self.getWindow().showNotification(notification)
Exemple #5
0
 def buttonClick(self, event):
     # create Notification instance and customize
     n = Notification(self._caption.getValue(),
                      self._description.getValue(), self._style.getValue())
     n.setPosition(self._position.getValue())
     d = self._delay.getValue()
     n.setDelayMsec(int(d))  # sec->msec
     self._c.getWindow().showNotification(n)
Exemple #6
0
 def showPojoState(self):
     n = Notification('POJO state', Notification.TYPE_TRAY_NOTIFICATION)
     n.setPosition(Notification.POSITION_CENTERED)
     n.setDescription(('First name: ' + self._person.getFirstName() +
                       '<br/>Last name: ' + self._person.getLastName() +
                       '<br/>Country: ' + self._person.getCountryCode() +
                       '<br/>Birthdate: ' + self._person.getBirthdate() +
                       '<br/>Shoe size: ' + self._person.getShoesize() +
                       '<br/>Password: ' + self._person.getPassword()))
     self.getWindow().showNotification(n)