Exemple #1
0
 /**
  * Controls whether the status line will be painted into the parent component.
  *
  * @param enabled whether the status line will be painted.
  */
 public void setEnabled(boolean enabled) {
   if (enabled) {
     parent.addPaintListener(this);
   } else {
     parent.removePaintListener(this);
     setContent("");
     currentRect = null;
   }
 }
 /*
  * @see org.eclipse.jface.text.IPainter#deactivate(boolean)
  */
 public void deactivate(boolean redraw) {
   if (fIsActive) {
     fIsActive = false;
     fTextWidget.removePaintListener(this);
     if (redraw) {
       redrawAll();
     }
   }
 }
 /** @see IPainter#deactivate */
 public final void deactivate(final boolean redraw) {
   if (mIsActive) {
     mIsActive = false;
     mTextWidget.removePaintListener(this);
     if (mPositionManager != null) {
       mPositionManager.unmanagePosition(mBracketPosition);
     }
     if (redraw) {
       handleDrawRequest(null);
     }
   }
 }
 /**
  * Removes this object from the corresponding StyledText widget. Object can't be used after this
  * call, until another attach. This method is called automatically, when StyledText widget is
  * disposed
  */
 public void detach() {
   if (text == null) return;
   text.removeDisposeListener(ml);
   text.removeLineStyleListener(ml);
   text.removeLineBackgroundListener(ml);
   text.removePaintListener(ml);
   text.removeVerifyListener(ml);
   text.removeExtendedModifyListener(ml);
   text.removeControlListener(ml);
   text.removeKeyListener(ml);
   text.removeTraverseListener(ml);
   text.removeMouseListener(ml);
   text.removeSelectionListener(ml);
   ScrollBar sb = text.getVerticalBar();
   if (sb != null) sb.removeSelectionListener(ml);
   baseEditor = null;
 }