JIDE 3.5.15

com.jidesoft.editor
Class CodeEditorMarginSupport

java.lang.Object
  extended by com.jidesoft.editor.CodeEditorMarginSupport
All Implemented Interfaces:
MarginSupport
Direct Known Subclasses:
CodeEditorRowMarginSupport

public class CodeEditorMarginSupport
extends Object
implements MarginSupport

CodeEditorMarginSupport provides the margin support for CodeEditor and its subclasses.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jidesoft.margin.MarginSupport
MarginSupport.ModelChangedCallback, MarginSupport.RepaintCallback
 
Field Summary
protected  CodeEditor _codeEditor
           
 
Constructor Summary
CodeEditorMarginSupport(CodeEditor codeEditor)
           
 
Method Summary
 CodeEditor getCodeEditor()
           
 int getViewPosition()
          Gets the view position in the corresponding view port.
 int getViewSize()
          Gets the view size in the corresponding view port.
 void installListeners(MarginSupport.RepaintCallback repaintCallback, MarginSupport.ModelChangedCallback modelChangedCallback)
          Installs the listener to the component so that the RepaintCallback will be triggered when a repaint is needed, and the ModelChangedCallback will be triggered when the model is changed.
 void uninstallListeners(MarginSupport.RepaintCallback repaintCallback, MarginSupport.ModelChangedCallback modelChangedCallback)
          Uninstalls all the listeners installed in MarginSupport.installListeners(com.jidesoft.margin.MarginSupport.RepaintCallback, com.jidesoft.margin.MarginSupport.ModelChangedCallback).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_codeEditor

protected CodeEditor _codeEditor
Constructor Detail

CodeEditorMarginSupport

public CodeEditorMarginSupport(CodeEditor codeEditor)
Method Detail

getCodeEditor

public CodeEditor getCodeEditor()

getViewPosition

public int getViewPosition()
Description copied from interface: MarginSupport
Gets the view position in the corresponding view port.

Specified by:
getViewPosition in interface MarginSupport
Returns:
the view position.

getViewSize

public int getViewSize()
Description copied from interface: MarginSupport
Gets the view size in the corresponding view port.

Specified by:
getViewSize in interface MarginSupport
Returns:
teh view size.

installListeners

public void installListeners(MarginSupport.RepaintCallback repaintCallback,
                             MarginSupport.ModelChangedCallback modelChangedCallback)
Description copied from interface: MarginSupport
Installs the listener to the component so that the RepaintCallback will be triggered when a repaint is needed, and the ModelChangedCallback will be triggered when the model is changed.

Specified by:
installListeners in interface MarginSupport
Parameters:
repaintCallback - the callback when a repaint is needed.
modelChangedCallback - the callback when the model of the component is changed. By default, the parameter is null unless the MarginComponent overrides the AbstractMargin.createModelChangedCallback() method is overridden to return a valid callback.

uninstallListeners

public void uninstallListeners(MarginSupport.RepaintCallback repaintCallback,
                               MarginSupport.ModelChangedCallback modelChangedCallback)
Description copied from interface: MarginSupport
Uninstalls all the listeners installed in MarginSupport.installListeners(com.jidesoft.margin.MarginSupport.RepaintCallback, com.jidesoft.margin.MarginSupport.ModelChangedCallback).

Specified by:
uninstallListeners in interface MarginSupport
Parameters:
repaintCallback - the callback when a repaint is needed.
modelChangedCallback - the callback when the model of the component is changed. By default, the parameter is null unless the MarginComponent overrides the AbstractMargin.createModelChangedCallback() method is overridden to return a valid callback.

JIDE 3.5.15