JIDE 3.5.15

com.jidesoft.margin
Interface MarginSupport

All Known Subinterfaces:
RowMarginSupport
All Known Implementing Classes:
AbstractMarginSupport, AbstractRowMarginSupport, CodeEditorMarginSupport, CodeEditorRowMarginSupport, ListRowMarginSupport, TableRowMarginSupport, TextAreaRowMarginSupport, TreeRowMarginSupport, TreeTableRowMarginSupport

public interface MarginSupport

MarginSupport is an adapter that provides the margin support for various components so that the Margin class could be component independent.


Nested Class Summary
static interface MarginSupport.ModelChangedCallback
          The ModelChangedCallback which will call the margin's revalidate method.
static interface MarginSupport.RepaintCallback
          The RepaintCallback which will call the margin's repaint method.
 
Method Summary
 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 installListeners(com.jidesoft.margin.MarginSupport.RepaintCallback, com.jidesoft.margin.MarginSupport.ModelChangedCallback).
 

Method Detail

getViewPosition

int getViewPosition()
Gets the view position in the corresponding view port.

Returns:
the view position.

getViewSize

int getViewSize()
Gets the view size in the corresponding view port.

Returns:
teh view size.

installListeners

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.

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

void uninstallListeners(MarginSupport.RepaintCallback repaintCallback,
                        MarginSupport.ModelChangedCallback modelChangedCallback)
Uninstalls all the listeners installed in installListeners(com.jidesoft.margin.MarginSupport.RepaintCallback, com.jidesoft.margin.MarginSupport.ModelChangedCallback).

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