def _completeToken(self, token): """ Adds a token to be completed """ style = SimpleAttributeSet() style.addAttribute(StyleConstants.Foreground, self.infoColor) self.doc.insertString(self.output.caretPosition, token, style)
def write(self, data, color=Color.black, prefix='\n'): style = SimpleAttributeSet() if color is not None: style.addAttribute(StyleConstants.Foreground, color) self.document.insertString(self.document.getLength(), prefix + data, style) self.textpane.caretPosition = self.document.getLength()
def __addOutput(self, color, msg): """ Adds the output to the text area using a given color """ style = SimpleAttributeSet() if color: style.addAttribute(StyleConstants.Foreground, color) self.doc.insertString(self.doc.length, msg, style) self.output.caretPosition = self.doc.length
def __addOutput(self, color, msg): """ Adds the output to the text area using a given color """ from javax.swing.text import BadLocationException style = SimpleAttributeSet() if color: style.addAttribute(StyleConstants.Foreground, color) self.doc.insertString(self.doc.length, msg, style) self.text_pane.caretPosition = self.doc.length
def __addOutput(self, color, msg): """ Adds the output to the text area using a given color """ from javax.swing.text import BadLocationException style = SimpleAttributeSet() if color: style.addAttribute(StyleConstants.Foreground, color) self.doc.insertString(self.doc.length, msg, style) self.text_pane.caretPosition = self.doc.length
def addOutput(self, color, msg): style = SimpleAttributeSet() if color: style.addAttribute(StyleConstants.Foreground, color) try: self.target.insertString(self.target.length, msg, style) except BadLocationException: Log.log(Log.ERROR, self, "") if jEdit.getBooleanProperty("options.jython.cleanDirtyFlag"): self.target.dirty = 0