|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.editor.EditorProperties
An EditorProperties
class provides a global registry
for properties which affect all documents and editor panes of this
package. This simply provides a convenient way to allow them to
share properties (such as a style table) without having to create a
local entry for common properties. This is a singleton class.
Implementation Notes:
We currently employ a hierarchy of properties here based on their scope of coverage to reduce the duplication among hash tables. For example, the StyleRegistry should be a global one here so that all documents and editors share the same one - hence it is stored here in a globally accessible property area.
The particular syntax highlighter of a document should be stored with the document so that if there are multiple editors open on that document, they will share the same syntax highlighter.
Field Summary | |
static int |
GUTTER_COLORS_USE_CUSTOM
Constant to indicate that the gutter should use the configured custom colors. |
static int |
GUTTER_COLORS_USE_EDITOR
Constant to indicate that the gutter should use the editor background/foreground defaults for its colors. |
static int |
GUTTER_COLORS_USE_LNF
Constant to indicate that the gutter should use the L&F defaults for its background color. |
static java.lang.String |
PROPERTY_BRACE_MATCHING_AUTO
Name of the property which determines whether to enable automatic brace matching. |
static java.lang.String |
PROPERTY_BRACE_MATCHING_DELAY
Name of the property which determines the delay before performing automatic brace matching. |
static java.lang.String |
PROPERTY_CARET_BLINK_RATE
Property name for the blink rate of the caret, in milliseconds. |
static java.lang.String |
PROPERTY_CARET_COLOR
Property name for the caret color to use for painting the editor caret. |
static java.lang.String |
PROPERTY_CARET_ENABLE_BLINK
Property name for whether the caret should blink. |
static java.lang.String |
PROPERTY_CARET_SHAPE_INSERT
Property name for the caret shape to use when the editor caret is in insert mode. |
static java.lang.String |
PROPERTY_CARET_SHAPE_OVERWRITE
Property name for the caret shape to use when the editor caret is in overwrite mode. |
static java.lang.String |
PROPERTY_CARET_XOR_PAINTING
The property name for whether the caret should use xor painting or regular painting. |
static java.lang.String |
PROPERTY_CHECK_CLIPBOARD_FOR_PASTE
Property name for whether BasicEditorPane.canPaste() should check the contents of the clipboard to see if it is pasteable. |
static java.lang.String |
PROPERTY_CHECK_FRAGLIST_RECYCLING
Property name for whether to check if the StyledFragmentsList is being recycled properly. |
static java.lang.String |
PROPERTY_COMPLETION_ENABLE_POPUP
Name of the property for whether completion insight should enable auto-popup based on typed triggers. |
static java.lang.String |
PROPERTY_COMPLETION_POPUP_DELAY
Name of the property for the auto-popup delay (if enabled) for completion insight. |
static java.lang.String |
PROPERTY_CONSUME_KEY_RELEASE
Property name for whether the default key handler should eat key release events - this could help performance by not allowing menus a chance to check their accelerators on a key release event. |
static java.lang.String |
PROPERTY_CUT_COPY_LINE
Name of the property for whether Cut/Copy should operate on the current line when there is no selection in the editor. |
static java.lang.String |
PROPERTY_DO_BLOCK_INDENTS_ON_SELECTION
Name of the property which determines whether the "insert-tab" and "reverse-tab" commands will perform a block-indent or outdent if there is a selection. |
static java.lang.String |
PROPERTY_EDIT_MERGE_COUNT
Property name for the number of consecutive edits (of the same type) that should be merged together. |
static java.lang.String |
PROPERTY_EDITOR_FONT
Name of the property for the base font used for painting the editor pane. |
static java.lang.String |
PROPERTY_EDITOR_FONT_FAMILY
Name of the property for the font family of the base font. |
static java.lang.String |
PROPERTY_EDITOR_FONT_HELPER
Name of the property where we are storing the font helper for the global editor font. |
static java.lang.String |
PROPERTY_EDITOR_FONT_SIZE
Name of the property for the font size of the base font. |
static java.lang.String |
PROPERTY_EDITOR_WIDTH
Name of the property for the default editor width in number of columns based on the width of the 'W' character in the current font. |
static java.lang.String |
PROPERTY_GUTTER_COLOR_SOURCE
Name of the property which determines from which source the gutter derives its colors. |
static java.lang.String |
PROPERTY_GUTTER_CUSTOM_BGCOLOR
Name of the property for the custom background color for the gutter. |
static java.lang.String |
PROPERTY_GUTTER_CUSTOM_FGCOLOR
Name of the property for the custom foreground color of the gutter. |
static java.lang.String |
PROPERTY_GUTTER_DEFAULT_BORDERCOLOR
Name of the property for the default border color to use for the line gutter. |
static java.lang.String |
PROPERTY_GUTTER_ENABLE_DRAGGING
Name of the property for whether click-dragging in the gutter will make a selection in the editor. |
static java.lang.String |
PROPERTY_GUTTER_SHARED_COLUMN
Name of the property for whether the gutter icons all share a single column or not. |
static java.lang.String |
PROPERTY_HIGHLIGHT_CHANGED
Name of the pseudo-property that the HighlightRegistry uses to notify listeners (views) that settings in the registry have changed. |
static java.lang.String |
PROPERTY_HIGHLIGHT_REGISTRY
Name of the property for the HighlightRegistry instance. |
static java.lang.String |
PROPERTY_INSIGHT_FILTER_MATCHING
Name of the property that controls whether Insight displays the full completion list of items, or only the matching list of items. |
static java.lang.String |
PROPERTY_INSIGHT_FONT_FAMILY
Name of the property for the font family to use for code insight. |
static java.lang.String |
PROPERTY_INSIGHT_FONT_SIZE
Name of the property for the font size to use for code insight. |
static java.lang.String |
PROPERTY_INSIGHT_MANUAL_COMPLETE_SINGLE
Name of the property that controls whether Insight automatically performs a complete when it is invoked and there is only a single matching data item. |
static java.lang.String |
PROPERTY_INSIGHT_MAX_POPUP_WIDTH
Name of the property that configures the maximum width of an insight popup window - this prevents situations with run-away insight popup windows that are huge. |
static java.lang.String |
PROPERTY_INSIGHT_NEWDATA_COMPLETE_SINGLE
Name of the property that controls whether Insight automatically performs a complete if the InsightData type changes while Insight is up, and there is only a single matching data item in the new data instance. |
static java.lang.String |
PROPERTY_INSIGHT_PARTIAL_COMPLETE_SINGLE
Name of the property that controls whether Insight automatically performs a complete when a partial complete is invoked and there is only a single matching data item. |
static java.lang.String |
PROPERTY_INSIGHT_TYPED_COMPLETE_SINGLE
Name of the property that controls whether Insight automatically performs a complete while the user is typing once there is only a single matching data item. |
static java.lang.String |
PROPERTY_KEY_HANDLERS
Name of the property for the list of available key handlers installed into the editor framework. |
static java.lang.String |
PROPERTY_LANGUAGE_SUPPORT
Name of the property for the LanguageSupport instance associated with a document. |
static java.lang.String |
PROPERTY_MACRO_PLAYBACK_DELAY
The wait delay (in ms) after posting a key event during playback before posting the next key event. |
static java.lang.String |
PROPERTY_MERGE_DELETE_NEXT
Property name for whether consecutive delete next edits should be allowed to merge. |
static java.lang.String |
PROPERTY_MERGE_DELETE_PREVIOUS
Property name for whether consecutive delete previous edits should be allowed to merge. |
static java.lang.String |
PROPERTY_MERGE_NAVIGATION
Property name for whether consecutive navigations should be allowed to merge. |
static java.lang.String |
PROPERTY_MERGE_TYPED_INSERT
Property name for whether consecutive typed insert edits should be allowed to merge. |
static java.lang.String |
PROPERTY_MERGE_TYPED_REPLACE
Property name for whether consecutive typed replace edits should be allowed to merge. |
static java.lang.String |
PROPERTY_NAVIGATION_MERGE_COUNT
Property name for the number of consecutive navigations that should be merged together. |
static java.lang.String |
PROPERTY_PARAMETER_ENABLE_POPUP
Name of the property for whether parameter insight should enable auto-popup based on typed triggers. |
static java.lang.String |
PROPERTY_PARAMETER_POPUP_DELAY
Name of the property for the auto-popup delay (if enabled) for parameter insight. |
static java.lang.String |
PROPERTY_REUSE_DOCUMENT_EVENT
Property name for whether DocumentEvent instances are reused for notification - this is a document optimization to help reduce constant object reallocation. |
static java.lang.String |
PROPERTY_REUSE_UNDOABLE_EDIT
Property name for whether UndoableEditEvent instances are reused for notification - this is a document optimization to help reduce constant object reallocation. |
static java.lang.String |
PROPERTY_RIGHT_MARGIN_COLOR
Name of the property for the color to paint the right margin with. |
static java.lang.String |
PROPERTY_RIGHT_MARGIN_COLUMN
Name of the property for where the right margin column should be painted. |
static java.lang.String |
PROPERTY_RIGHT_MARGIN_VISIBLE
Name of the property for whether the right margin column should be visible or not. |
static java.lang.String |
PROPERTY_SELECTED_HANDLER
Name of the property for the current key handler used by editor panes in this framework. |
static java.lang.String |
PROPERTY_SHOW_LINE_NUMBERS
Name of the property which determines whether to show line numbers or not in an associated gutter component. |
static java.lang.String |
PROPERTY_STYLE_CHANGED
Name of the pseudo-property that the StyleRegistry uses to notify listeners (views) that settings in the registry have changed. |
static java.lang.String |
PROPERTY_STYLE_REGISTRY
Name of the property for the StyleRegistry instance. |
static java.lang.String |
PROPERTY_TAB_SIZE
Name of the property for the tab size (stop.) This is used by the BasicView renderer when painting the editor pane, and also by the InsertTabAction (and others) when inserting a Tab instead of just spaces. |
static java.lang.String |
PROPERTY_TOGGLE_COMMENTS_ADVANCE
Name of the property for whether toggle comments should advance the caret to the next line if (before toggling comments) the caret was not a selection. |
static java.lang.String |
PROPERTY_TRAILING_BLANK_ROWS
Name of the property which determines the number of additional blank rows to include at the bottom of an editor view. |
static java.lang.String |
PROPERTY_UNDERLINE_CHANGED
Name of the pseudo-property that the UnderlineRegistry uses to notify listeners (views) that settings in the registry have changed. |
static java.lang.String |
PROPERTY_UNDERLINE_REGISTRY
Name of the property for the UnderlineRegistry instance. |
static java.lang.String |
PROPERTY_UNDO_NAVIGATION
Property name for whether UndoableEdits should be generated for navigation. |
static java.lang.String |
PROPERTY_USE_AUTO_INDENT
Name of the property for whether auto-indentation should be used. |
static java.lang.String |
PROPERTY_USE_JUMP_SCROLL
Name of the property which determines whether to do jump scrolling. |
static java.lang.String |
PROPERTY_USE_SMART_END
Name of the property which determines whether the "caret-end" command will be "smart" about finding the end of the line before any trailing whitespace, vs. |
static java.lang.String |
PROPERTY_USE_SMART_HOME
Name of the property which determines whether the "caret-begin" command will be "smart" about finding the start of the line after the initial indentation, vs. |
static java.lang.String |
PROPERTY_USE_SMART_INDENT
Name of the property for whether smart-indentation should be enabled globally. |
static java.lang.String |
PROPERTY_USE_TAB_CHARACTER
Name of the property which determines whether spaces or tab characters are used when the user indents a line. |
static java.lang.String |
PROPERTY_WORD_BOUNDARY_USE_LINE_END
Name of the property which determines whether navigating to word boundaries, whether the end of the word should also be included as a boundary. |
static java.lang.String |
PROPERTY_WORD_BOUNDARY_USE_LINE_START
Name of the property which determines whether navigating to word boundaries, whether the start of the line should also be included as a boundary. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Report a bound property update to any registered listeners. |
java.awt.Font |
getBaseFont()
Convenience method for getting the current base font. |
boolean |
getBooleanProperty(java.lang.String key)
Fetch the boolean property stored by the given key. |
static oracle.javatools.editor.resource.BundleHelper |
getEditorBundle()
Public utility routine for editor framework to fetch editor resources. |
FontHelper |
getFontHelper()
Convenience method for getting the current font helper. |
java.lang.String |
getHandlerName()
Gets the name of the current handler to use. |
HighlightRegistry |
getHighlightRegistry()
Fetch the global highlight registry used for all editor panes. |
int |
getIntegerProperty(java.lang.String key)
Fetch the integer property stored by the given key. |
static EditorProperties |
getProperties()
Fetches the singleton instance of the EditorProperties table. |
java.lang.Object |
getProperty(java.lang.String key)
Fetch the property stored by the given key. |
StyleRegistry |
getStyleRegistry()
Fetch the global style registry used for all editor panes. |
UnderlineRegistry |
getUnderlineRegistry()
Fetch the global underline registry used for all editor panes. |
void |
putBooleanProperty(java.lang.String key,
boolean value)
Sets the boolean property and value in the property table. |
void |
putIntegerProperty(java.lang.String key,
int value)
Sets the integer property and value in the property table. |
void |
putProperty(java.lang.String key,
java.lang.Object value)
Stores a property and value in the property table. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
setBaseFont(java.lang.String familyName,
int fontSize)
Utility routine to set the base font used by all editor panes in this framework. |
void |
setHandlerName(java.lang.String handlerName)
Changes the name of the default handler used. |
void |
setHighlightRegistry(HighlightRegistry registry)
Replace the global highlight registry used for all editor panes. |
void |
setStyleRegistry(StyleRegistry registry)
Replace the global style registry used for all editor panes. |
void |
setUnderlineRegistry(UnderlineRegistry registry)
Replace the global underline registry used for all editor panes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTY_STYLE_REGISTRY
getStyleRegistry()
to get the global registry, or
BasicEditorPane.getStyleRegistry()
to get a
editor-specific style registry.
public static final java.lang.String PROPERTY_STYLE_CHANGED
public static final java.lang.String PROPERTY_LANGUAGE_SUPPORT
public static final java.lang.String PROPERTY_EDITOR_WIDTH
public static final java.lang.String PROPERTY_HIGHLIGHT_REGISTRY
getHighlightRegistry()
to get the global registry, or
BasicEditorPane.getHighlightRegistry()
to get a
editor-specific highlight registry.
public static final java.lang.String PROPERTY_HIGHLIGHT_CHANGED
public static final java.lang.String PROPERTY_UNDERLINE_REGISTRY
getUnderlineRegistry()
to get the global registry, or
BasicEditorPane.getUnderlineRegistry()
to get a
editor-specific underline registry.
public static final java.lang.String PROPERTY_UNDERLINE_CHANGED
public static final java.lang.String PROPERTY_EDITOR_FONT_HELPER
public static final java.lang.String PROPERTY_EDITOR_FONT
Font
class.
Note that this property name is public for read and notification
purposes. To change the editor font, call
setBaseFont()
instead.
public static final java.lang.String PROPERTY_EDITOR_FONT_FAMILY
setBaseFont
instead.
public static final java.lang.String PROPERTY_EDITOR_FONT_SIZE
setBaseFont
instead.
public static final java.lang.String PROPERTY_RIGHT_MARGIN_COLUMN
public static final java.lang.String PROPERTY_RIGHT_MARGIN_VISIBLE
public static final java.lang.String PROPERTY_RIGHT_MARGIN_COLOR
public static final java.lang.String PROPERTY_TRAILING_BLANK_ROWS
public static final java.lang.String PROPERTY_BRACE_MATCHING_AUTO
public static final java.lang.String PROPERTY_BRACE_MATCHING_DELAY
public static final java.lang.String PROPERTY_SHOW_LINE_NUMBERS
public static final int GUTTER_COLORS_USE_LNF
public static final int GUTTER_COLORS_USE_EDITOR
public static final int GUTTER_COLORS_USE_CUSTOM
public static final java.lang.String PROPERTY_GUTTER_COLOR_SOURCE
public static final java.lang.String PROPERTY_GUTTER_CUSTOM_BGCOLOR
public static final java.lang.String PROPERTY_GUTTER_CUSTOM_FGCOLOR
public static final java.lang.String PROPERTY_GUTTER_DEFAULT_BORDERCOLOR
public static final java.lang.String PROPERTY_GUTTER_SHARED_COLUMN
public static final java.lang.String PROPERTY_GUTTER_ENABLE_DRAGGING
public static final java.lang.String PROPERTY_TAB_SIZE
public static final java.lang.String PROPERTY_USE_AUTO_INDENT
public static final java.lang.String PROPERTY_USE_SMART_INDENT
public static final java.lang.String PROPERTY_USE_TAB_CHARACTER
public static final java.lang.String PROPERTY_USE_SMART_HOME
public static final java.lang.String PROPERTY_USE_SMART_END
public static final java.lang.String PROPERTY_DO_BLOCK_INDENTS_ON_SELECTION
public static final java.lang.String PROPERTY_WORD_BOUNDARY_USE_LINE_START
public static final java.lang.String PROPERTY_WORD_BOUNDARY_USE_LINE_END
public static final java.lang.String PROPERTY_USE_JUMP_SCROLL
public static final java.lang.String PROPERTY_COMPLETION_ENABLE_POPUP
public static final java.lang.String PROPERTY_COMPLETION_POPUP_DELAY
public static final java.lang.String PROPERTY_PARAMETER_ENABLE_POPUP
public static final java.lang.String PROPERTY_PARAMETER_POPUP_DELAY
public static final java.lang.String PROPERTY_INSIGHT_FONT_FAMILY
public static final java.lang.String PROPERTY_INSIGHT_FONT_SIZE
public static final java.lang.String PROPERTY_INSIGHT_PARTIAL_COMPLETE_SINGLE
public static final java.lang.String PROPERTY_INSIGHT_MANUAL_COMPLETE_SINGLE
public static final java.lang.String PROPERTY_INSIGHT_TYPED_COMPLETE_SINGLE
public static final java.lang.String PROPERTY_INSIGHT_NEWDATA_COMPLETE_SINGLE
public static final java.lang.String PROPERTY_INSIGHT_FILTER_MATCHING
public static final java.lang.String PROPERTY_INSIGHT_MAX_POPUP_WIDTH
public static final java.lang.String PROPERTY_CHECK_FRAGLIST_RECYCLING
public static final java.lang.String PROPERTY_REUSE_UNDOABLE_EDIT
Boolean.FALSE
on
startup. To enable this optimization, leave the property unset,
or set it to Boolean.TRUE
public static final java.lang.String PROPERTY_REUSE_DOCUMENT_EVENT
Boolean.FALSE
on
startup. To enable this optimization, leave the property unset,
or set it to Boolean.TRUE
public static final java.lang.String PROPERTY_CHECK_CLIPBOARD_FOR_PASTE
public static final java.lang.String PROPERTY_CONSUME_KEY_RELEASE
public static final java.lang.String PROPERTY_CUT_COPY_LINE
public static final java.lang.String PROPERTY_TOGGLE_COMMENTS_ADVANCE
public static final java.lang.String PROPERTY_CARET_COLOR
public static final java.lang.String PROPERTY_CARET_SHAPE_INSERT
public static final java.lang.String PROPERTY_CARET_SHAPE_OVERWRITE
public static final java.lang.String PROPERTY_CARET_ENABLE_BLINK
public static final java.lang.String PROPERTY_CARET_BLINK_RATE
public static final java.lang.String PROPERTY_CARET_XOR_PAINTING
public static final java.lang.String PROPERTY_MERGE_TYPED_INSERT
public static final java.lang.String PROPERTY_MERGE_TYPED_REPLACE
public static final java.lang.String PROPERTY_MERGE_DELETE_NEXT
public static final java.lang.String PROPERTY_MERGE_DELETE_PREVIOUS
public static final java.lang.String PROPERTY_EDIT_MERGE_COUNT
public static final java.lang.String PROPERTY_MERGE_NAVIGATION
public static final java.lang.String PROPERTY_UNDO_NAVIGATION
public static final java.lang.String PROPERTY_NAVIGATION_MERGE_COUNT
public static final java.lang.String PROPERTY_KEY_HANDLERS
public static final java.lang.String PROPERTY_SELECTED_HANDLER
public static final java.lang.String PROPERTY_MACRO_PLAYBACK_DELAY
Method Detail |
public static EditorProperties getProperties()
public java.lang.Object getProperty(java.lang.String key)
key
- the property to get
public void putProperty(java.lang.String key, java.lang.Object value)
key
- the property namevalue
- the property valuepublic boolean getBooleanProperty(java.lang.String key)
key
- the property to get
java.lang.ClassCastException
- if the property is not a boolean propertypublic void putBooleanProperty(java.lang.String key, boolean value)
key
- the property namevalue
- the property valuepublic int getIntegerProperty(java.lang.String key)
key
- the property to get
java.lang.ClassCastException
- if the property is not a integer propertypublic void putIntegerProperty(java.lang.String key, int value)
key
- the property namevalue
- the property valuepublic StyleRegistry getStyleRegistry()
public void setStyleRegistry(StyleRegistry registry)
registry
- the new registry to usepublic HighlightRegistry getHighlightRegistry()
public void setHighlightRegistry(HighlightRegistry registry)
registry
- the new registry to usepublic UnderlineRegistry getUnderlineRegistry()
public void setUnderlineRegistry(UnderlineRegistry registry)
registry
- the new registry to usepublic static oracle.javatools.editor.resource.BundleHelper getEditorBundle()
public FontHelper getFontHelper()
public java.awt.Font getBaseFont()
public void setBaseFont(java.lang.String familyName, int fontSize)
familyName
- the name of the font family to usefontSize
- the font size to usepublic void setHandlerName(java.lang.String handlerName)
handlerName
- the name of the handler to use (from KeyHandlerFactory)public java.lang.String getHandlerName()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removedpublic void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- The programmatic name of the property
that was changed.oldValue
- The old value of the property.newValue
- The new value of the property.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.