|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.diff.AbstractDiffPane com.jidesoft.diff.BasicDiffPane<Object> com.jidesoft.diff.TableDiffPane
public class TableDiffPane
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 DiffTableStyleProvider |
_fromTableStyleProvider
|
protected DiffTableStyleProvider |
_toTableStyleProvider
|
Fields inherited from class com.jidesoft.diff.AbstractDiffPane |
---|
_actions, _changedColor, _deletedColor, _insertedColor, COMMAND_FIRST, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS |
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 | |
---|---|
TableDiffPane()
|
|
TableDiffPane(Object... items)
Creates TableDiffPane. |
Method Summary | |
---|---|
protected void |
adjustDividerOffset(DiffDivider divider,
int index)
Adjusts the DiffDivider's left and right offset. |
void |
clearHighlights()
|
protected Object[] |
createArrayFromTableModel(TableModel tableModel)
Creates the array from the table model. |
JComponent |
createComponent(Object item,
int index)
Creates a CellStyleTable so that it can use the cell style feature to show the difference highlights. |
protected Diff<?> |
createLinesDiff(int fromStartOffset,
int fromEndOffset,
int toStartOffset,
int toEndOffset)
Creates multiple lines diff. |
protected MarkerSupport |
createMarkerSupport(JComponent component)
|
protected RowMarginSupport |
createRowMarginSupport(JComponent component,
JScrollPane scrollPane)
|
protected void |
customizePane(JComponent component,
int index)
Customizes the pane. |
protected void |
customizePanes(JComponent[] panes)
Customizes the components after the panes are created. |
boolean |
delete(int toLine,
int toNumberOfLines,
boolean runDiffAfterward)
Deletes number of lines from the specified started line in the toEditor. |
void |
flip()
Flips the from to the to and vice versa. |
Object[] |
getFromItems()
Gets the from items that is used for Diff to compare the lines. |
protected List<Object> |
getFromItems(int startRow,
int endRow)
Gets the from items for line difference to compare. |
protected int |
getSelectedIndex(int paneIndex)
|
protected Object |
getTableRowData(TableModel tableModel,
int rowIndex)
Creates the table row data. |
Object[] |
getToItems()
Gets the to items that is used for Diff to compare the lines. |
protected List<Object> |
getToItems(int startRow,
int endRow)
Gets the to items for line difference to compare. |
void |
highlightChanged(int fromStartOffset,
int fromEndOffset,
int toStartOffset,
int toEndOffset,
Color c,
Color separatorColor,
String changeToolTip)
|
void |
highlightChangedExactly(List<Difference> lineDiff,
int fromStartOffset,
int fromEndOffset,
int toStartOffset,
int toEndOffset,
Color c,
Color separatorColor,
String changeToolTip)
|
void |
highlightDeleted(int fromStartOffset,
int fromEndOffset,
int toStartOffset,
Color c,
Color separatorColor,
String changeToolTip)
|
void |
highlightInserted(int fromStartOffset,
int toStartOffset,
int toEndOffset,
Color c,
Color separatorColor,
String changeToolTip)
|
boolean |
insert(int toLine,
int fromLine,
int fromNumberOfLines,
boolean runDiffAfterward)
Inserts some lines from the fromEditor to the toEditor. |
void |
setChangedColor(Color changedColor)
|
void |
setDeletedColor(Color deletedColor)
|
void |
setInsertedColor(Color insertedColor)
|
Methods inherited from class com.jidesoft.diff.AbstractDiffPane |
---|
createActions, createButton, createContentArea, createLegendBar, createStatusBar, createToolBar, customizeAction, customizeToolBar, getChangedColor, getDeletedColor, getInsertedColor, getMessage, getResourceString, initLayout, setMessage |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DiffTableStyleProvider _fromTableStyleProvider
protected DiffTableStyleProvider _toTableStyleProvider
Constructor Detail |
---|
public TableDiffPane()
public TableDiffPane(Object... items)
items
- two table models.Method Detail |
---|
public void flip()
AbstractDiffPane
flip
in class BasicDiffPane<Object>
protected Object[] createArrayFromTableModel(TableModel tableModel)
getTableRowData(javax.swing.table.TableModel, int)
to change the behavior.
tableModel
- the table model
protected Object getTableRowData(TableModel tableModel, int rowIndex)
tableModel
- the table modelrowIndex
- the row index
protected void customizePane(JComponent component, int index)
AbstractDiffPane
AbstractDiffPane.customizePanes(JComponent[])
.
customizePane
in class AbstractDiffPane
component
- the pane.index
- the index of the pane.protected void customizePanes(JComponent[] panes)
AbstractDiffPane
customizePanes
in class AbstractDiffPane
panes
- the panes.protected MarkerSupport createMarkerSupport(JComponent component)
createMarkerSupport
in class BasicDiffPane<Object>
protected RowMarginSupport createRowMarginSupport(JComponent component, JScrollPane scrollPane)
createRowMarginSupport
in class BasicDiffPane<Object>
public JComponent createComponent(Object item, int index)
createComponent
in class BasicDiffPane<Object>
item
- the content to be displayed in the component.index
- the index of the component.
protected void adjustDividerOffset(DiffDivider divider, int index)
AbstractDiffPane
adjustDividerOffset
in class BasicDiffPane<Object>
divider
- the DiffDivider.index
- the index of the DiffDivider.public Object[] getFromItems()
getFromItems(int, int)
is used.
getFromItems
in class BasicDiffPane<Object>
getFromItems(int, int)
public Object[] getToItems()
getToItems(int, int)
is used.
getToItems
in class BasicDiffPane<Object>
getToItems(int, int)
protected List<Object> getFromItems(int startRow, int endRow)
startRow
- the start row indexendRow
- the end row index
protected List<Object> getToItems(int startRow, int endRow)
startRow
- the start row indexendRow
- the end row index
protected int getSelectedIndex(int paneIndex)
getSelectedIndex
in class BasicDiffPane<Object>
protected Diff<?> createLinesDiff(int fromStartOffset, int fromEndOffset, int toStartOffset, int toEndOffset)
highlightChangedExactly(java.util.List, int, int, int, int, java.awt.Color, java.awt.Color, String)
will
consider the offset and get the correct position
createLinesDiff
in class BasicDiffPane<Object>
fromStartOffset
- from start offsetfromEndOffset
- from end offsettoStartOffset
- to start offsettoEndOffset
- to end offset
public void highlightChangedExactly(List<Difference> lineDiff, int fromStartOffset, int fromEndOffset, int toStartOffset, int toEndOffset, Color c, Color separatorColor, String changeToolTip)
highlightChangedExactly
in class BasicDiffPane<Object>
public void highlightChanged(int fromStartOffset, int fromEndOffset, int toStartOffset, int toEndOffset, Color c, Color separatorColor, String changeToolTip)
highlightChanged
in class BasicDiffPane<Object>
public void highlightInserted(int fromStartOffset, int toStartOffset, int toEndOffset, Color c, Color separatorColor, String changeToolTip)
highlightInserted
in class BasicDiffPane<Object>
public void highlightDeleted(int fromStartOffset, int fromEndOffset, int toStartOffset, Color c, Color separatorColor, String changeToolTip)
highlightDeleted
in class BasicDiffPane<Object>
public void clearHighlights()
clearHighlights
in class BasicDiffPane<Object>
public boolean delete(int toLine, int toNumberOfLines, boolean runDiffAfterward)
BasicDiffPane
delete
in class BasicDiffPane<Object>
toLine
- the starting linetoNumberOfLines
- the number of lines to be deleted.runDiffAfterward
- true of run the diff() again after deleting the lines.
public boolean insert(int toLine, int fromLine, int fromNumberOfLines, boolean runDiffAfterward)
BasicDiffPane
insert
in class BasicDiffPane<Object>
toLine
- the insertion line in the toEditorfromLine
- the starting line in the fromEditorfromNumberOfLines
- the number of lines in the fromEditor to be inserted to the toEditor.runDiffAfterward
- true of run the diff() again after inserting the lines.
public void setChangedColor(Color changedColor)
setChangedColor
in class BasicDiffPane<Object>
public void setInsertedColor(Color insertedColor)
setInsertedColor
in class BasicDiffPane<Object>
public void setDeletedColor(Color deletedColor)
setDeletedColor
in class BasicDiffPane<Object>
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |