Logo Search packages:      
Sourcecode: jedit version File versions  Download package

void org::gjt::sp::jedit::textarea::TextArea::propertiesChanged (  )  [inline]

Called by jEdit when necessary. Plugins should not call this method.

Reimplemented in org::gjt::sp::jedit::textarea::StandaloneTextArea.

Definition at line 4700 of file TextArea.java.

References org::gjt::sp::jedit::textarea::TextAreaPainter::getFontRenderContext(), org::gjt::sp::jedit::buffer::JEditBuffer::getIntegerProperty(), org::gjt::sp::jedit::buffer::JEditBuffer::getStringProperty(), org::gjt::sp::jedit::textarea::TextAreaPainter::getStringWidth(), org::gjt::sp::jedit::buffer::JEditBuffer::getTabSize(), org::gjt::sp::jedit::textarea::ChunkCache::invalidateAll(), org::gjt::sp::jedit::textarea::DisplayManager::invalidateScreenLineCounts(), org::gjt::sp::jedit::buffer::JEditBuffer::isLoading(), and org::gjt::sp::jedit::textarea::DisplayManager::notifyScreenLineChanges().

Referenced by addNotify(), org::gjt::sp::jedit::textarea::TextAreaPainter::setBounds(), and setBuffer().

      {
            if(buffer == null)
                  return;

            int _tabSize = buffer.getTabSize();
            char[] foo = new char[_tabSize];
            for(int i = 0; i < foo.length; i++)
                  foo[i] = ' ';

            tabSize = painter.getStringWidth(new String(foo));

            charWidth = (int)Math.round(
                  painter.getFont().getStringBounds(foo,0,1,
                  painter.getFontRenderContext()).getWidth());

            String oldWrap = wrap;
            wrap = buffer.getStringProperty("wrap");
            hardWrap = wrap.equals("hard");
            softWrap = wrap.equals("soft");
            boolean oldWrapToWidth = wrapToWidth;
            int oldWrapMargin = wrapMargin;
            setMaxLineLength(buffer.getIntegerProperty("maxLineLen",0));

            boolean wrapSettingsChanged = !(wrap.equals(oldWrap)
                  && oldWrapToWidth == wrapToWidth
                  && oldWrapMargin == wrapMargin);

            if(displayManager != null && !bufferChanging
                  && !buffer.isLoading() && wrapSettingsChanged)
            {
                  displayManager.invalidateScreenLineCounts();
                  displayManager.notifyScreenLineChanges();
            }

            chunkCache.invalidateAll();
            gutter.repaint();
            painter.repaint();
      } //}}}


Generated by  Doxygen 1.6.0   Back to index