|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
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 oracle.javatools.editor.folding.CodeFoldingMargin
public class CodeFoldingMargin
A control that allows manipulation of collapsible source code blocks.
The code folding margin is attached to a BasicEditorPane
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected BasicEditorPane |
editorPane
|
protected CodeFoldingModel |
model
|
protected CodeFoldingProvider |
provider
|
protected int[] |
TEMP_OFFSETS
|
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 | |
---|---|
CodeFoldingMargin(CodeFoldingProvider provider)
|
Method Summary | |
---|---|
void |
addCodeExpansionListener(CodeExpansionListener listener)
|
void |
addCodeWillExpandListener(CodeWillExpandListener listener)
|
protected void |
attach(BasicEditorPane editorPane)
|
protected boolean |
blockContainsOffset(CodeFoldingModel model,
java.lang.Object block,
int offset)
|
protected javax.swing.border.Border |
createBorder()
|
protected CodeFoldingModel |
createCodeFoldingModel(BasicEditorPane editorPane)
|
protected javax.swing.Icon |
createCollapsedIcon()
|
protected javax.swing.Icon |
createExpandedIcon()
|
protected void |
detach(BasicEditorPane editorPane)
|
protected void |
ensurePositionVisible(int position)
|
boolean |
expandEnclosingBlocks(int position)
|
protected boolean |
expandEnclosingChild(CodeFoldingModel model,
java.lang.Object block,
int offset)
|
protected void |
fireCodeCollapsed(java.lang.Object block)
|
protected void |
fireCodeExpanded(java.lang.Object block)
|
protected void |
fireCodeWillCollapse(java.lang.Object block)
|
protected void |
fireCodeWillExpand(java.lang.Object block)
|
protected int |
getBlankLines()
|
protected int |
getCaretPosition()
|
protected int |
getClosestLineFromCoordinate(int y)
|
CodeExpansionListener[] |
getCodeExpansionListeners()
|
CodeWillExpandListener[] |
getCodeWillExpandListeners()
|
protected javax.swing.Icon |
getCollapsedIcon()
|
protected BasicDocument |
getDocument()
|
protected BasicEditorPane |
getEditorPane()
|
protected javax.swing.Icon |
getExpandedIcon()
|
protected java.lang.Object |
getFirstBlockAtLine(int line)
|
protected CodeFoldingProvider |
getFoldingProvider()
|
protected int |
getFontHeight()
|
java.lang.Object |
getLargestCollapsedBlock(CodeFoldingModel model,
java.lang.Object block,
int offset)
Returns the largest (outermost) block that is currently collapsed and contains the given offset. |
protected int |
getLineCount()
|
protected int |
getLineFromOffset(int offset)
|
protected int |
getLineFromRow(int row)
|
protected int |
getLineStartOffset(int line)
|
CodeFoldingModel |
getModel()
|
protected int |
getPreferredHeight()
|
java.awt.Dimension |
getPreferredSize()
|
protected int |
getPreferredWidth()
|
CodeFoldingProvider |
getProvider()
|
protected int |
getRowCount()
Get the count of rows in the editor. |
protected java.lang.Object |
getSmallestEnclosingBlock(int offset)
|
protected int |
getTopPadding()
|
protected int |
getYCoordinateFromOffset(int offset)
|
protected boolean |
isCodeFoldingEnabled()
|
protected boolean |
isCodeFoldingHighlight()
|
protected boolean |
isTurnerDamaged(java.awt.Rectangle clipBounds,
CodeFoldingModel model,
java.lang.Object block)
|
protected void |
paintChildTurners(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
CodeFoldingModel model,
java.lang.Object block)
|
protected void |
paintComponent(java.awt.Graphics g)
|
protected void |
paintTurner(java.awt.Graphics g,
CodeFoldingModel model,
java.lang.Object block)
|
void |
removeCodeExpansionListener(CodeExpansionListener listener)
|
void |
removeCodeWillExpandListener(CodeWillExpandListener listener)
|
void |
setExpansionState(java.lang.Object block,
boolean expand)
Expand or collapse a block. |
void |
setExpansionState(java.lang.Object block,
boolean expand,
boolean fadeBlock)
Expand or collapse a block. |
void |
setModel(CodeFoldingModel model)
|
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected BasicEditorPane editorPane
protected CodeFoldingProvider provider
protected CodeFoldingModel model
protected final int[] TEMP_OFFSETS
Constructor Detail |
---|
public CodeFoldingMargin(CodeFoldingProvider provider)
Method Detail |
---|
public CodeFoldingModel getModel()
public CodeFoldingProvider getProvider()
public void setModel(CodeFoldingModel model)
public void setExpansionState(java.lang.Object block, boolean expand)
block
- The block to expand or collapseexpand
- true to expand the block, false to collpase itpublic void setExpansionState(java.lang.Object block, boolean expand, boolean fadeBlock)
block
- The block to expand or collapseexpand
- true to expand the block, false to collpase itfadeBlock
- true to visually animate the state changepublic boolean expandEnclosingBlocks(int position)
public void addCodeWillExpandListener(CodeWillExpandListener listener)
public void removeCodeWillExpandListener(CodeWillExpandListener listener)
public CodeWillExpandListener[] getCodeWillExpandListeners()
public void addCodeExpansionListener(CodeExpansionListener listener)
public void removeCodeExpansionListener(CodeExpansionListener listener)
public CodeExpansionListener[] getCodeExpansionListeners()
protected void attach(BasicEditorPane editorPane)
protected void detach(BasicEditorPane editorPane)
protected CodeFoldingModel createCodeFoldingModel(BasicEditorPane editorPane)
protected javax.swing.border.Border createBorder()
protected int getPreferredWidth()
protected int getPreferredHeight()
protected BasicEditorPane getEditorPane()
protected BasicDocument getDocument()
protected CodeFoldingProvider getFoldingProvider()
protected boolean blockContainsOffset(CodeFoldingModel model, java.lang.Object block, int offset)
protected boolean expandEnclosingChild(CodeFoldingModel model, java.lang.Object block, int offset)
public java.lang.Object getLargestCollapsedBlock(CodeFoldingModel model, java.lang.Object block, int offset)
model
- block
- - the block to start examining for (usually model.getRoot())offset
-
protected java.lang.Object getSmallestEnclosingBlock(int offset)
protected java.lang.Object getFirstBlockAtLine(int line)
protected javax.swing.Icon getExpandedIcon()
protected javax.swing.Icon getCollapsedIcon()
protected javax.swing.Icon createExpandedIcon()
protected javax.swing.Icon createCollapsedIcon()
protected int getYCoordinateFromOffset(int offset)
protected int getLineFromRow(int row)
protected int getRowCount()
protected int getClosestLineFromCoordinate(int y)
protected int getLineFromOffset(int offset)
protected int getLineStartOffset(int line)
protected int getTopPadding()
protected int getFontHeight()
protected int getLineCount()
protected int getCaretPosition()
protected void ensurePositionVisible(int position)
protected int getBlankLines()
protected boolean isCodeFoldingHighlight()
protected boolean isCodeFoldingEnabled()
protected void fireCodeWillExpand(java.lang.Object block) throws CodeExpansionVetoException
CodeExpansionVetoException
protected void fireCodeExpanded(java.lang.Object block)
protected void fireCodeWillCollapse(java.lang.Object block) throws CodeExpansionVetoException
CodeExpansionVetoException
protected void fireCodeCollapsed(java.lang.Object block)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
protected void paintChildTurners(java.awt.Graphics g, java.awt.Rectangle clipBounds, CodeFoldingModel model, java.lang.Object block)
protected void paintTurner(java.awt.Graphics g, CodeFoldingModel model, java.lang.Object block)
protected boolean isTurnerDamaged(java.awt.Rectangle clipBounds, CodeFoldingModel model, java.lang.Object block)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |