|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.compare.view.BaseCompareView
oracle.javatools.compare.view.SequenceCompareView
oracle.javatools.compare.view.wedge.WedgeCompareView
public class WedgeCompareView
The wedge compare view displays text differences as a series of blocks and connectors. Unlike the "block-style" compare viewer, the line size of compare contributors is not adjusted by inserting extra blank lines. This makes wedge-style compare ideal for editable diffs and merge.
Vertical scrolling with this style of compare viewer is tricky, because both sides must be scrolled at different rates to keep the diff blocks on either side within a reasonable vertical proximity. The WedgeTextCompareView contains its own vertical scrollbar to control the complex scrolling behavior.
As well as the n text panes showing the contributors, there are n editor gutters (for line numbers). n-1 central merge gutters contain the connectors between diff blocks and controls for shuttling changes between contributors. There is also a single overview gutter which displays a birds eye view of the entire diff.
The vertical scrollbar and overview are plotted in so-called "virtual space". The virtual height of diff is a unified height calculated by summing the maximum height of all the diff blocks. Using virtual space makes it possible to vertically scroll in a sensible way and display the overview gutter without having change blocks overlap each other. It does have the side effect that the scroll thumb does not necessarily line up correctly with the overview gutter.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.javatools.compare.view.SequenceCompareView |
---|
SequenceCompareView.OverviewComponent, SequenceCompareView.OverviewComponentMouseHandler |
Nested classes/interfaces inherited from class oracle.javatools.compare.view.BaseCompareView |
---|
BaseCompareView.CentralGutterMouseHandler, BaseCompareView.ContributorBias, BaseCompareView.CustomFocusTraversalPolicy, BaseCompareView.PositionListener |
Field Summary |
---|
Fields inherited from class oracle.javatools.compare.view.BaseCompareView |
---|
_centerScrollPane, _centerTitle, _leftDiffGutter, _leftOverview, _leftScrollPane, _leftTitle, _rightDiffGutter, _rightOverview, _rightScrollPane, _rightTitle, GUI_VERTICAL_SCROLLBAR, GUI_VERTICAL_SPACER |
Constructor Summary | |
---|---|
WedgeCompareView() |
|
WedgeCompareView(CompareMode mode) |
|
WedgeCompareView(CompareMode mode, CompareViewBias bias) |
Method Summary | |
---|---|
void |
addPopupManager(ComparePopupManager manager) Add a popup manager to this view. |
void |
addViewEditListener(ViewEditListener l) |
protected CompareModel |
createModel(CompareModel compareModel, CompareDifference[] differences) |
protected CompareModel |
createMutableModel(CompareModel compareModel) |
protected void |
createOverviews() |
protected void |
deleteBlock(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor) Remove the specified difference block from the specified contributor. |
void |
dispose() |
protected oracle.javatools.compare.algorithm.sequence.SequenceCompareDifference |
getBlockAtRealLine(ContributorKind contributor, int line) |
protected ContributorKind |
getCurrentContributorKind() |
protected CompareDifference |
getCurrentDifference() |
BasicEditorPane |
getCurrentEditorPane() Get the current (focussed) editor pane, or null if no editor pane currently has focus. |
javax.swing.text.Document |
getDocument(ContributorKind contrib) |
protected BasicEditorPane |
getEditorPane(ContributorKind contributor) |
BasicEditorPane[] |
getEditorPanes() Get all editor panes in use by the view. |
protected java.awt.Component |
getFocusableCenterEditor() |
java.awt.Component |
getFocusComponent() |
protected CompareDifference |
getNextConflict() |
protected CompareDifference |
getNextDifference() |
protected java.awt.Color |
getOverviewDifferenceColor(oracle.javatools.compare.algorithm.sequence.SequenceCompareDifference differenceBlock, boolean isLeft, ContributorKind firstContributorKind, ContributorKind secondContributorKind) |
protected java.awt.Component |
getOverviewLeftEditor() |
protected java.awt.Component |
getOverviewRightEditor() |
protected CompareDifference |
getPreviousConflict() |
protected CompareDifference |
getPreviousDifference() |
java.lang.String |
getToolTipText(BasicEditorPane editorPane, java.awt.event.MouseEvent mouseEvent, int offset) Requests from the editor client an appropriate tooltip to display for the given editor. |
protected ViewEditListener[] |
getViewEditListeners() |
protected void |
goToDifference(CompareDifference difference, boolean requestFocus) |
protected void |
initializeView(CompareModel model) |
protected void |
insertBlockCopy(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind fromContributor, ContributorKind toContributor) Take a copy of the block from the specified contributor and insert it into the other contributor after the change. |
boolean |
isShowInlineCharDiffs() |
protected boolean |
isViewFocusOwner() |
void |
removePopupManager(ComparePopupManager manager) Remove a popup manager from this view. |
void |
removePopupManager(ComparePopupManager manager, BasicEditorPane editorPane) |
void |
removeViewEditListener(ViewEditListener l) |
protected void |
replaceBlock(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind fromContributor, ContributorKind toContributor) Take a copy of the block from the specified contributor and replace the text of the adjacent contributor with the text. |
void |
setEditLocked(boolean isLocked) Set whether this compare view is locked against editing, even if the underlying text buffers are writable. |
void |
setShowInlineDiffs(boolean showInlineDiffs) |
protected void |
updateCurrentMemento() |
protected void |
updateModelImpl() Reapplies the specified model to the view. |
protected void |
verticalScrollTo(int virtualLine) Scroll to the specified (virtual) position. |
Methods inherited from class oracle.javatools.compare.view.SequenceCompareView |
---|
getDiffBlockIterator, getVirtualHeightLines, getVirtualLineForReal, initializeOverview |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.javatools.compare.view.EditorPaneView |
---|
getEditActions |
Constructor Detail |
---|
public WedgeCompareView()
public WedgeCompareView(CompareMode mode)
public WedgeCompareView(CompareMode mode, CompareViewBias bias)
Method Detail |
---|
public java.awt.Component getFocusComponent()
getFocusComponent
in class BaseCompareView
public void dispose()
dispose
in class BaseCompareView
protected void createOverviews()
createOverviews
in class SequenceCompareView
protected java.awt.Component getOverviewLeftEditor()
getOverviewLeftEditor
in class BaseCompareView
protected java.awt.Component getOverviewRightEditor()
getOverviewRightEditor
in class BaseCompareView
protected java.awt.Component getFocusableCenterEditor()
getFocusableCenterEditor
in class BaseCompareView
protected java.awt.Color getOverviewDifferenceColor(oracle.javatools.compare.algorithm.sequence.SequenceCompareDifference differenceBlock, boolean isLeft, ContributorKind firstContributorKind, ContributorKind secondContributorKind)
getOverviewDifferenceColor
in class SequenceCompareView
public java.lang.String getToolTipText(BasicEditorPane editorPane, java.awt.event.MouseEvent mouseEvent, int offset)
ToolTipProvider
getToolTipText
in interface ToolTipProvider
editorPane
- the editor where the tooltip will be displayedmouseEvent
- the mouse event that generated the tooltipoffset
- the document offset where the mouse cursor is locatedpublic void addViewEditListener(ViewEditListener l)
addViewEditListener
in interface EditableView
addViewEditListener
in class BaseCompareView
public void removeViewEditListener(ViewEditListener l)
removeViewEditListener
in interface EditableView
removeViewEditListener
in class BaseCompareView
protected ViewEditListener[] getViewEditListeners()
getViewEditListeners
in class BaseCompareView
protected CompareModel createModel(CompareModel compareModel, CompareDifference[] differences)
createModel
in class SequenceCompareView
protected oracle.javatools.compare.algorithm.sequence.SequenceCompareDifference getBlockAtRealLine(ContributorKind contributor, int line)
public void setEditLocked(boolean isLocked)
setEditLocked
in class BaseCompareView
isLocked
- if true, no edits are allowed in this compare view, even if the underlying buffers are writable. If false, the editable state of the buffers is used to determine whether edits can be made from this view.protected BasicEditorPane getEditorPane(ContributorKind contributor)
protected void verticalScrollTo(int virtualLine)
verticalScrollTo
in class BaseCompareView
virtualLine
- the virtual line to display at the top of the viewer.protected void updateCurrentMemento()
protected void updateModelImpl()
BaseCompareView
updateModelImpl
in class BaseCompareView
protected void initializeView(CompareModel model)
initializeView
in class BaseCompareView
protected CompareModel createMutableModel(CompareModel compareModel)
createMutableModel
in class BaseCompareView
public javax.swing.text.Document getDocument(ContributorKind contrib)
protected boolean isViewFocusOwner()
isViewFocusOwner
in class BaseCompareView
protected void deleteBlock(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor)
deleteBlock
in class BaseCompareView
difference
- the block to removecontributor
- the contributor to remove the block fromprotected void insertBlockCopy(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind fromContributor, ContributorKind toContributor)
insertBlockCopy
in class BaseCompareView
difference
- the block to copyfromContributor
- the contributor to copy fromtoContributor
- the contributor to copy toprotected void replaceBlock(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind fromContributor, ContributorKind toContributor)
replaceBlock
in class BaseCompareView
difference
- the block to changefromContributor
- the contributor to copy fromtoContributor
- the contributor whose block will be replaced.protected CompareDifference getPreviousDifference()
getPreviousDifference
in class BaseCompareView
protected CompareDifference getNextDifference()
getNextDifference
in class BaseCompareView
protected CompareDifference getPreviousConflict()
getPreviousConflict
in class BaseCompareView
protected CompareDifference getNextConflict()
getNextConflict
in class BaseCompareView
protected CompareDifference getCurrentDifference()
getCurrentDifference
in class BaseCompareView
protected ContributorKind getCurrentContributorKind()
getCurrentContributorKind
in class BaseCompareView
protected void goToDifference(CompareDifference difference, boolean requestFocus)
goToDifference
in class BaseCompareView
public void setShowInlineDiffs(boolean showInlineDiffs)
public boolean isShowInlineCharDiffs()
public void addPopupManager(ComparePopupManager manager)
ActionMenuView
addPopupManager
in interface ActionMenuView
addPopupManager
in interface EditorPaneView
addPopupManager
in class BaseCompareView
manager
- the popup manager to attachpublic void removePopupManager(ComparePopupManager manager)
ActionMenuView
removePopupManager
in interface ActionMenuView
removePopupManager
in interface EditorPaneView
removePopupManager
in class BaseCompareView
manager
- the popup manager to removepublic void removePopupManager(ComparePopupManager manager, BasicEditorPane editorPane)
public BasicEditorPane[] getEditorPanes()
EditorPaneView
getEditorPanes
in interface EditorPaneView
public BasicEditorPane getCurrentEditorPane()
EditorPaneView
getCurrentEditorPane
in interface EditorPaneView
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |