|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.jidesoft.margin.AbstractMargin
public abstract class AbstractMargin
AbstractMargin is a component that usually appears on the left side of a large component that has a scroll pane. It can be used to display information related to the component such as row number. When the component is scrolled, the margin will repaint the content to match with the new content that is visible in the scroll pane's view port. So it looks like the margin is scrolled with the scroll pane.
This is an abstract class. Two methods are abstract. They areMargin.paintMargin(java.awt.Graphics) and Margin.getPreferredWidth().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected List<MarginPainter> |
_marginPainters
|
protected MarginSupport |
_marginSupport
|
protected MarginSupport.ModelChangedCallback |
_modelChangedCallback
|
protected Dimension |
_preferredSize
|
protected MarginSupport.RepaintCallback |
_repaintCallback
|
static String |
PROPERTY_CLICK_TO_SELECT
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
protected |
AbstractMargin()
|
|
AbstractMargin(MarginSupport marginSupport)
|
| Method Summary | |
|---|---|
void |
addMarginPainter(MarginPainter painter)
Adds a margin painter to paint extra information on top of the current margin painted by paintMargin method. |
protected MarginSupport.ModelChangedCallback |
createModelChangedCallback()
Creates the ModelChangedCallback. |
protected MarginSupport.RepaintCallback |
createRepaintCallback()
Creates the repaint callback. |
Component |
getMarginComponent()
Gets the margin component. |
protected List<MarginPainter> |
getMarginPainters()
|
MarginSupport |
getMarginSupport()
Gets the code editor. |
Dimension |
getPreferredSize()
|
void |
invalidate()
|
boolean |
isClickToSelect()
|
protected void |
paintBackground(Graphics g)
|
protected void |
paintComponent(Graphics g)
|
void |
removeMarginPainter(MarginPainter painter)
Removes a margin painter added by addMarginPainter. |
void |
setClickToSelect(boolean clickToSelect)
Sets the flag whether to select the elements when clicking on the marker. |
void |
setMarginSupport(MarginSupport marginSupport)
Sets the code editor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jidesoft.margin.Margin |
|---|
getPreferredWidth, paintMargin |
| Field Detail |
|---|
protected MarginSupport _marginSupport
protected Dimension _preferredSize
protected List<MarginPainter> _marginPainters
protected MarginSupport.RepaintCallback _repaintCallback
protected MarginSupport.ModelChangedCallback _modelChangedCallback
public static final String PROPERTY_CLICK_TO_SELECT
| Constructor Detail |
|---|
protected AbstractMargin()
public AbstractMargin(MarginSupport marginSupport)
| Method Detail |
|---|
public void invalidate()
invalidate in class Containerprotected void paintComponent(Graphics g)
paintComponent in class JComponentprotected void paintBackground(Graphics g)
public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic MarginSupport getMarginSupport()
Margin
getMarginSupport in interface Marginpublic void setMarginSupport(MarginSupport marginSupport)
Margin
setMarginSupport in interface Marginprotected MarginSupport.RepaintCallback createRepaintCallback()
protected MarginSupport.ModelChangedCallback createModelChangedCallback()
public Component getMarginComponent()
Margin
getMarginComponent in interface Marginpublic void addMarginPainter(MarginPainter painter)
Margin
addMarginPainter in interface Marginpublic void removeMarginPainter(MarginPainter painter)
MarginaddMarginPainter.
removeMarginPainter in interface Marginprotected List<MarginPainter> getMarginPainters()
public boolean isClickToSelect()
public void setClickToSelect(boolean clickToSelect)
clickToSelect - true or false.
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||