def changeFontSize(self, fontSize):
     newFontSize = int(fontSize)
     swing.text.StyleConstants.setFontSize(self.textAttrib, newFontSize)
     text = DefaultStyledDocument.getText(
         self, 0, DefaultStyledDocument.getLength(self))
     DefaultStyledDocument.remove(self, 0,
                                  DefaultStyledDocument.getLength(self))
     DefaultStyledDocument.insertString(self, 0, text, self.textAttrib)
 def remove(self, offset, len):
     #When remove is called by methods in JES, there is no need to check the
     #position
     if self.command.getIsSystem() != FALSE:
         DefaultStyledDocument.remove(self, offset, len)
     else:
         #When remove is called by Jython, check to make sure the string is
         #to be inserted after the most recent prompt
         if self.command.getCaretPosition() >= self.command.getOldPos() + 1:
             DefaultStyledDocument.remove(self, offset, len)
 def remove(self, offset, len):
     #When remove is called by methods in JES, there is no need to check the
     #position
     if self.command.getIsSystem() != FALSE:
         DefaultStyledDocument.remove(self, offset, len)
     else:
         #When remove is called by Jython, check to make sure the string is
         #to be inserted after the most recent prompt
         if self.command.getCaretPosition() >= self.command.getOldPos() + 1:
             DefaultStyledDocument.remove(self, offset, len)
 def changeFontSize(self, fontSize):
     newFontSize = int(fontSize)
     swing.text.StyleConstants.setFontSize(self.textAttrib, newFontSize)
     text = DefaultStyledDocument.getText(self, 0, DefaultStyledDocument.getLength(self))
     DefaultStyledDocument.remove(self, 0, DefaultStyledDocument.getLength(self))
     DefaultStyledDocument.insertString(self, 0, text, self.textAttrib)