|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.compare.view.BaseCompareView
public abstract class BaseCompareView
Nested Class Summary | |
---|---|
protected class |
BaseCompareView.CentralGutterMouseHandler |
static class |
BaseCompareView.ContributorBias |
protected class |
BaseCompareView.CustomFocusTraversalPolicy |
class |
BaseCompareView.PositionListener |
Field Summary | |
---|---|
protected javax.swing.JScrollPane |
_centerScrollPane |
protected javax.swing.JLabel |
_centerTitle |
protected DiffGutter |
_leftDiffGutter |
protected BaseOverview |
_leftOverview |
protected javax.swing.JScrollPane |
_leftScrollPane |
protected javax.swing.JLabel |
_leftTitle |
protected DiffGutter |
_rightDiffGutter |
protected BaseOverview |
_rightOverview |
protected javax.swing.JScrollPane |
_rightScrollPane |
protected javax.swing.JLabel |
_rightTitle |
static java.lang.String |
GUI_VERTICAL_SCROLLBAR |
static java.lang.String |
GUI_VERTICAL_SPACER |
protected static int |
OVERVIEW_WIDTH Ugh: Make the overview the same width as the scroll bar. |
Constructor Summary | |
---|---|
protected |
BaseCompareView() |
protected |
BaseCompareView(CompareMode compareMode) |
protected |
BaseCompareView(CompareMode compareMode, CompareViewBias compareViewBias) |
Method Summary | |
---|---|
void |
addPopupManager(ComparePopupManager popupManager) Add a popup manager to this view. |
void |
addPositionListener(javax.swing.event.ChangeListener l) Adds a listener for changes to the current navigable view position. |
void |
addStatusListener(javax.swing.event.ChangeListener l) Adds a listener for events which change editor pane status. |
void |
addViewEditListener(ViewEditListener l) |
protected void |
attachContributorChangeListeners() |
static int |
calculateRightEditorInset() |
protected boolean |
canReadElement(CompareDifference difference, ContributorKind contributorKind) |
protected boolean |
canWriteElement(CompareDifference difference, ContributorKind contributorKind) |
protected javax.swing.Action |
createDeleteBlockAction(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor) |
protected java.awt.FocusTraversalPolicy |
createFocusTraversalPolicy() |
protected javax.swing.JScrollPane |
createHorizontalScrollPane(java.awt.Component view) |
protected javax.swing.Action |
createInsertBlockAction(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor) |
protected javax.swing.Action |
createMarkAllResolvedAction(CompareModel compareModel) |
protected javax.swing.Action |
createMarkResolvedAction(CompareDifference difference) |
protected ViewMemento |
createMemento() |
protected CompareModel |
createModel(CompareDifference[] differences) |
protected abstract CompareModel |
createModel(CompareModel compareModel, CompareDifference[] differences) |
protected CompareModel |
createMutableModel(CompareModel compareModel) |
protected void |
createOverviews() |
protected javax.swing.Action |
createReplaceBlockAction(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor) |
protected abstract void |
deleteBlock(oracle.javatools.compare.algorithm.BaseCompareDifference block, ContributorKind contributor) Remove the specified difference block from the specified contributor. |
protected void |
detachContributorChangeListeners() |
void |
dispose() |
protected void |
firePositionChanged() |
protected void |
fireStatusChanged() |
protected void |
fireViewEditEvent(ViewEditEvent vee) |
protected ContributorKind |
getAdjacentContributorKind(ContributorKind contributorKind) |
protected ContributorKind |
getAdjacentContributorKind(ContributorKind contributorKind, BaseCompareView.ContributorBias bias) |
protected CompareViewBias |
getBias() |
java.util.ResourceBundle |
getBundle() Utility to get the resource bundle for this class. |
protected javax.swing.JScrollPane |
getCenterScrollPane() |
protected javax.swing.JLabel |
getCenterTitle() |
CompareMode |
getCompareMode() |
CompareModel |
getCompareModel() |
protected CompareContributor |
getContributor(ContributorKind contributorKind) |
protected abstract ContributorKind |
getCurrentContributorKind() |
protected abstract CompareDifference |
getCurrentDifference() |
CompareViewDecoration[] |
getDecorations() |
protected javax.swing.Action |
getDefaultEditAction(CompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor) Get the default edit action for the specified difference. |
javax.swing.Icon |
getDefaultEditActionIcon(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor, boolean isAncestor) |
javax.swing.Action[] |
getEditActions() Get the contextual edit actions for the view. |
protected javax.swing.Action[] |
getEditActions(CompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor) Get edit actions for the specified difference. |
protected java.awt.Component |
getFocusableCenterEditor() |
java.awt.Component |
getFocusComponent() |
java.awt.Component |
getGUI() Get the GUI for this compare view. |
protected java.util.Collection |
getHorizontalScrollBars() |
java.awt.Component |
getHorizontalScrollComponent() Get the horizontal scrollbar component for this compare view. |
DiffGutter |
getLeftDiffGutter() |
java.awt.Component |
getLeftOrCenterSplitter() |
protected BaseOverview |
getLeftOverview() |
protected javax.swing.JScrollPane |
getLeftScrollPane() |
protected javax.swing.JLabel |
getLeftTitle() |
CompareModel |
getModel() Get the model for this view. |
protected abstract CompareDifference |
getNextConflict() |
protected abstract CompareDifference |
getNextDifference() |
protected java.awt.Component |
getOverviewLeftEditor() |
protected java.awt.Component |
getOverviewRightEditor() |
protected ComparePopupManager |
getPopupManager() |
protected abstract CompareDifference |
getPreviousConflict() |
protected abstract CompareDifference |
getPreviousDifference() |
protected DiffGutter |
getRightDiffGutter() |
protected BaseOverview |
getRightOverview() |
protected javax.swing.JScrollPane |
getRightScrollPane() |
java.awt.Component |
getRightSplitter() |
protected javax.swing.JLabel |
getRightTitle() |
SplitPanel |
getSplitPanel() |
int |
getSplitterLocation(java.awt.Component splitter) |
protected CompareToolTipProvider |
getToolTipProvider() |
protected java.util.Collection |
getUndoableEditListeners() |
javax.swing.JScrollBar |
getVerticalScrollbar() |
protected javax.swing.JScrollBar |
getVerticalScrollBar() |
protected java.awt.CardLayout |
getVerticalScrollCardLayout() |
protected javax.swing.JPanel |
getVerticalScrollPanel() |
protected ViewEditListener[] |
getViewEditListeners() |
protected void |
goToDifference(CompareDifference block) |
protected abstract void |
goToDifference(CompareDifference differenceBlock, boolean requestFocus) |
boolean |
goToFirstConflict() Navigate to the first conflict in this view. |
boolean |
goToFirstDifference() Navigate to the first difference in this view. |
boolean |
goToInitialDifference() Navigate to the initial difference in this view, without requesting focus |
boolean |
goToLastConflict() Navigate to the last conflict in this view. |
boolean |
goToLastDifference() Navigate to the last difference in this view. |
boolean |
goToNextConflict() Navigate to the next conflict in this view. |
boolean |
goToNextDifference() Navigate to the next difference in this view. |
boolean |
goToPreviousConflict() Navigate to the previous conflict in this view. |
boolean |
goToPreviousDifference() Navigate to the previous difference in this view. |
protected boolean |
hasDefaultEditAction(CompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor) Return whether there is a default edit action |
boolean |
hasNavigableConflicts() Asks whether the view has navigable conflicts. |
boolean |
hasNavigableDifferences() Asks whether the view has navigable differences. |
boolean |
hasNextConflict() Asks whether there is a next conflict based on the position. |
boolean |
hasNextDifference() Asks whether there is a next difference based on the position. |
boolean |
hasPreviousConflict() Asks whether there is a previous conflict based on the position. |
boolean |
hasPreviousDifference() Asks whether there is a previous difference based on the position. |
protected void |
horizontalScrollTo(java.lang.Object source, int value) |
protected void |
initializeOverview(BaseOverview overview) |
protected void |
initializeView(CompareModel compareModel) |
protected void |
initScrollPane(javax.swing.JScrollPane scrollPane) |
protected abstract void |
insertBlockCopy(oracle.javatools.compare.algorithm.BaseCompareDifference block, ContributorKind fromContributor, ContributorKind toContributor) Take a copy of the block from the specified contributor and insert it into the other contributor after the change. |
protected boolean |
isAddition(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind firstContributor, ContributorKind secondContributor) |
protected boolean |
isEditable(ContributorKind contributor) |
protected boolean |
isEditLocked() Get whether this compare view is locked against editing. |
protected boolean |
isOverviewFocusOwner() |
protected boolean |
isRemoval(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind firstContributor, ContributorKind secondContributor) |
protected boolean |
isViewFocusOwner() |
protected void |
markAllResolved(CompareModel compareModel) Mark all differences in the given model as resolved. |
protected void |
markResolved(CompareDifference difference) Mark the given difference block as resolved. |
static void |
registerViewDecoration(java.lang.Class<? extends CompareViewDecoration> decorationClass) |
static void |
registerViewDecoration(Thunk<java.lang.Class<? extends CompareViewDecoration>> decorationClass) |
void |
removePopupManager(ComparePopupManager popupManager) Remove a popup manager from this view. |
void |
removePositionListener(javax.swing.event.ChangeListener l) Removes a listener for changes to the current navigable view position. |
void |
removeStatusListener(javax.swing.event.ChangeListener l) Removes a listener for events which change editor pane status. |
void |
removeViewEditListener(ViewEditListener l) |
protected void |
repaintDiffGutters() |
protected abstract void |
replaceBlock(oracle.javatools.compare.algorithm.BaseCompareDifference block, 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. |
protected void |
resetGUI() |
protected void |
setCenterScrollPane(javax.swing.JScrollPane centerScrollPane) |
protected void |
setCompareModel(CompareModel compareModel) |
protected void |
setEditLocked(boolean editLocked) |
protected void |
setLeftDiffGutter(DiffGutter leftDiffGutter) |
protected void |
setLeftScrollPane(javax.swing.JScrollPane leftScrollPane) |
void |
setMemento(ViewMemento memento) |
void |
setModel(CompareModel compareModel) Set the model for this view. |
protected void |
setRightDiffGutter(DiffGutter rightDiffGutter) |
protected void |
setRightScrollPane(javax.swing.JScrollPane rightScrollPane) |
protected void |
setSplitPanel(SplitPanel splitPanel) |
void |
setSplitterLocation(java.awt.Component splitter, int location) |
void |
setSplitterLocation(java.awt.Component splitter, int location, java.awt.Component parent) |
void |
setToolTipProvider(CompareToolTipProvider toolTipProvider) |
protected void |
updateModel(CompareModel model) |
protected abstract void |
updateModelImpl() Reapplies the specified model to the view. |
protected void |
updateOnEdit() Triggered when the compare model needs to be rebuilt following an edit. |
protected void |
updateTitles() Update the titles above each compare pane based on the contributors. |
protected abstract void |
verticalScrollTo(int virtualLine) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BaseOverview _leftOverview
protected BaseOverview _rightOverview
protected static final int OVERVIEW_WIDTH
public static final java.lang.String GUI_VERTICAL_SCROLLBAR
public static final java.lang.String GUI_VERTICAL_SPACER
protected javax.swing.JScrollPane _leftScrollPane
protected javax.swing.JScrollPane _rightScrollPane
protected javax.swing.JScrollPane _centerScrollPane
protected final javax.swing.JLabel _leftTitle
protected final javax.swing.JLabel _rightTitle
protected final javax.swing.JLabel _centerTitle
protected DiffGutter _leftDiffGutter
protected DiffGutter _rightDiffGutter
Constructor Detail |
---|
protected BaseCompareView()
protected BaseCompareView(CompareMode compareMode)
protected BaseCompareView(CompareMode compareMode, CompareViewBias compareViewBias)
Method Detail |
---|
public java.awt.Component getFocusComponent()
protected BaseOverview getLeftOverview()
protected BaseOverview getRightOverview()
protected java.awt.Component getOverviewLeftEditor()
protected java.awt.Component getOverviewRightEditor()
protected java.awt.Component getFocusableCenterEditor()
protected void createOverviews()
protected void initializeOverview(BaseOverview overview)
public static final void registerViewDecoration(java.lang.Class<? extends CompareViewDecoration> decorationClass)
public static final void registerViewDecoration(Thunk<java.lang.Class<? extends CompareViewDecoration>> decorationClass)
protected final void resetGUI()
protected CompareViewBias getBias()
protected boolean isAddition(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind firstContributor, ContributorKind secondContributor)
protected boolean isRemoval(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind firstContributor, ContributorKind secondContributor)
protected javax.swing.JScrollPane getLeftScrollPane()
protected void setLeftScrollPane(javax.swing.JScrollPane leftScrollPane)
protected javax.swing.JScrollPane getRightScrollPane()
protected void setRightScrollPane(javax.swing.JScrollPane rightScrollPane)
protected javax.swing.JScrollPane getCenterScrollPane()
protected void setCenterScrollPane(javax.swing.JScrollPane centerScrollPane)
protected javax.swing.JScrollBar getVerticalScrollBar()
protected java.awt.CardLayout getVerticalScrollCardLayout()
protected javax.swing.JPanel getVerticalScrollPanel()
protected javax.swing.JLabel getLeftTitle()
protected javax.swing.JLabel getRightTitle()
protected javax.swing.JLabel getCenterTitle()
protected boolean isEditLocked()
protected void setEditLocked(boolean editLocked)
protected java.util.Collection getUndoableEditListeners()
public DiffGutter getLeftDiffGutter()
protected void setLeftDiffGutter(DiffGutter leftDiffGutter)
protected DiffGutter getRightDiffGutter()
protected void setRightDiffGutter(DiffGutter rightDiffGutter)
public static final int calculateRightEditorInset()
public void setModel(CompareModel compareModel)
CompareView
setModel
in interface CompareView
compareModel
- the compare model to render in this view.protected void attachContributorChangeListeners()
protected void detachContributorChangeListeners()
protected void initializeView(CompareModel compareModel)
public SplitPanel getSplitPanel()
protected java.awt.FocusTraversalPolicy createFocusTraversalPolicy()
protected void setSplitPanel(SplitPanel splitPanel)
public java.awt.Component getGUI()
CompareView
getGUI
in interface CompareView
public java.awt.Component getLeftOrCenterSplitter()
getLeftOrCenterSplitter
in interface SplitPanelView
public java.awt.Component getRightSplitter()
getRightSplitter
in interface SplitPanelView
public void setSplitterLocation(java.awt.Component splitter, int location)
setSplitterLocation
in interface SplitPanelView
public void setSplitterLocation(java.awt.Component splitter, int location, java.awt.Component parent)
public int getSplitterLocation(java.awt.Component splitter)
getSplitterLocation
in interface SplitPanelView
protected void updateTitles()
public CompareMode getCompareMode()
protected CompareModel createMutableModel(CompareModel compareModel)
public void addViewEditListener(ViewEditListener l)
addViewEditListener
in interface EditableView
public void removeViewEditListener(ViewEditListener l)
removeViewEditListener
in interface EditableView
protected ViewEditListener[] getViewEditListeners()
protected void fireViewEditEvent(ViewEditEvent vee)
public void setToolTipProvider(CompareToolTipProvider toolTipProvider)
setToolTipProvider
in interface ToolTipView
protected CompareToolTipProvider getToolTipProvider()
protected void updateModel(CompareModel model)
protected void repaintDiffGutters()
protected abstract void updateModelImpl()
protected ViewMemento createMemento()
public void setMemento(ViewMemento memento)
setMemento
in interface EditableView
protected CompareModel createModel(CompareDifference[] differences)
protected abstract CompareModel createModel(CompareModel compareModel, CompareDifference[] differences)
public java.util.ResourceBundle getBundle()
protected javax.swing.JScrollPane createHorizontalScrollPane(java.awt.Component view)
protected void initScrollPane(javax.swing.JScrollPane scrollPane)
protected java.util.Collection getHorizontalScrollBars()
public javax.swing.JScrollBar getVerticalScrollbar()
protected void horizontalScrollTo(java.lang.Object source, int value)
protected abstract void verticalScrollTo(int virtualLine)
public CompareModel getModel()
CompareView
getModel
in interface CompareView
protected void setCompareModel(CompareModel compareModel)
public CompareModel getCompareModel()
public void addPositionListener(javax.swing.event.ChangeListener l)
NavigableView
addPositionListener
in interface NavigableView
l
- the listener to add.public void removePositionListener(javax.swing.event.ChangeListener l)
NavigableView
removePositionListener
in interface NavigableView
l
- the listener to remove.protected void firePositionChanged()
public boolean hasNavigableDifferences()
NavigableView
hasNavigableDifferences
in interface NavigableView
public boolean hasNavigableConflicts()
NavigableConflictsView
hasNavigableConflicts
in interface NavigableConflictsView
public void addStatusListener(javax.swing.event.ChangeListener l)
StatusView
addStatusListener
in interface StatusView
l
- the listener.public void removeStatusListener(javax.swing.event.ChangeListener l)
StatusView
removeStatusListener
in interface StatusView
l
- the listener.protected void fireStatusChanged()
protected boolean isViewFocusOwner()
public javax.swing.Action[] getEditActions()
ActionMenuView
getEditActions
in interface ActionMenuView
protected abstract CompareDifference getCurrentDifference()
protected abstract ContributorKind getCurrentContributorKind()
protected ContributorKind getAdjacentContributorKind(ContributorKind contributorKind)
protected ContributorKind getAdjacentContributorKind(ContributorKind contributorKind, BaseCompareView.ContributorBias bias)
protected CompareContributor getContributor(ContributorKind contributorKind)
protected void updateOnEdit()
protected void markResolved(CompareDifference difference)
difference
- the block to mark as resolved.protected void markAllResolved(CompareModel compareModel)
compareModel
- the compare model to mark as fully resolved.protected javax.swing.Action createMarkResolvedAction(CompareDifference difference)
protected javax.swing.Action createMarkAllResolvedAction(CompareModel compareModel)
public boolean goToInitialDifference()
NavigableView
goToInitialDifference
in interface NavigableView
public boolean hasPreviousDifference()
NavigableView
hasPreviousDifference
in interface NavigableView
public boolean hasNextDifference()
NavigableView
hasNextDifference
in interface NavigableView
public boolean goToFirstDifference()
NavigableView
goToFirstDifference
in interface NavigableView
public boolean goToLastDifference()
NavigableView
goToLastDifference
in interface NavigableView
public boolean goToPreviousDifference()
NavigableView
goToPreviousDifference
in interface NavigableView
NavigableView.goToLastDifference()
.public boolean goToNextDifference()
NavigableView
goToNextDifference
in interface NavigableView
NavigableView.goToFirstDifference()
.protected void goToDifference(CompareDifference block)
protected boolean isOverviewFocusOwner()
protected abstract CompareDifference getPreviousDifference()
protected abstract CompareDifference getNextDifference()
protected abstract void goToDifference(CompareDifference differenceBlock, boolean requestFocus)
public boolean hasPreviousConflict()
NavigableConflictsView
hasPreviousConflict
in interface NavigableConflictsView
public boolean hasNextConflict()
NavigableConflictsView
hasNextConflict
in interface NavigableConflictsView
public boolean goToFirstConflict()
NavigableConflictsView
goToFirstConflict
in interface NavigableConflictsView
public boolean goToLastConflict()
NavigableConflictsView
goToLastConflict
in interface NavigableConflictsView
public boolean goToPreviousConflict()
NavigableConflictsView
goToPreviousConflict
in interface NavigableConflictsView
NavigableConflictsView.goToLastConflict()
.public boolean goToNextConflict()
NavigableConflictsView
goToNextConflict
in interface NavigableConflictsView
NavigableConflictsView.goToFirstConflict()
.protected abstract CompareDifference getPreviousConflict()
protected abstract CompareDifference getNextConflict()
protected boolean isEditable(ContributorKind contributor)
protected boolean canReadElement(CompareDifference difference, ContributorKind contributorKind)
protected boolean canWriteElement(CompareDifference difference, ContributorKind contributorKind)
protected boolean hasDefaultEditAction(CompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor)
difference
- the differencecontributor
- the contributoradjacentContributor
- the contributor sharing a gutter with this one.protected javax.swing.Action getDefaultEditAction(CompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor)
difference
- the differencecontributor
- the contributoradjacentContributor
- the contributor sharing a gutter with this one.protected javax.swing.Action createReplaceBlockAction(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor)
protected javax.swing.Action createInsertBlockAction(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor)
protected javax.swing.Action createDeleteBlockAction(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor)
protected abstract void replaceBlock(oracle.javatools.compare.algorithm.BaseCompareDifference block, ContributorKind fromContributor, ContributorKind toContributor)
block
- the block to changefromContributor
- the contributor to copy fromtoContributor
- the contributor whose block will be replaced.protected abstract void insertBlockCopy(oracle.javatools.compare.algorithm.BaseCompareDifference block, ContributorKind fromContributor, ContributorKind toContributor)
block
- the block to copyfromContributor
- the contributor to copy fromtoContributor
- the contributor to copy toprotected abstract void deleteBlock(oracle.javatools.compare.algorithm.BaseCompareDifference block, ContributorKind contributor)
block
- the block to removecontributor
- the contributor to remove the block fromprotected javax.swing.Action[] getEditActions(CompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor)
difference
- the differencecontributor
- the contributoradjacentContributor
- the contributor sharing a gutter with this one.public javax.swing.Icon getDefaultEditActionIcon(oracle.javatools.compare.algorithm.BaseCompareDifference difference, ContributorKind contributor, ContributorKind adjacentContributor, boolean isAncestor)
public java.awt.Component getHorizontalScrollComponent()
CustomHorizontalScrollView
getHorizontalScrollComponent
in interface CustomHorizontalScrollView
public void dispose()
public void addPopupManager(ComparePopupManager popupManager)
ActionMenuView
addPopupManager
in interface ActionMenuView
popupManager
- the popup manager to attachpublic void removePopupManager(ComparePopupManager popupManager)
ActionMenuView
removePopupManager
in interface ActionMenuView
popupManager
- the popup manager to removeprotected final ComparePopupManager getPopupManager()
public CompareViewDecoration[] getDecorations()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |