com.jidesoft.margin
Class AbstractMarginSupport
java.lang.Object
com.jidesoft.margin.AbstractMarginSupport
- All Implemented Interfaces:
- MarginSupport
- Direct Known Subclasses:
- AbstractRowMarginSupport
public abstract class AbstractMarginSupport
- extends Object
- implements MarginSupport
Abstract implementation of MarginSupport assuming the component has a scroll pane.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_scrollPane
protected JScrollPane _scrollPane
_listener
protected AdjustmentListener _listener
AbstractMarginSupport
public AbstractMarginSupport(JScrollPane scrollPane)
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.