JIDE 3.5.15

com.jidesoft.editor
Class DefaultCodeEditorSettings

java.lang.Object
  extended by com.jidesoft.editor.DefaultCodeEditorSettings
All Implemented Interfaces:
CodeEditorSettings
Direct Known Subclasses:
DefaultSettings

public class DefaultCodeEditorSettings
extends Object
implements CodeEditorSettings

Default implementation of CodeEditorSettings.


Field Summary
 
Fields inherited from interface com.jidesoft.editor.CodeEditorSettings
PROPERTY_BLOCK_CARET, PROPERTY_BRACKET_HIGHLIGHT_COLOR, PROPERTY_BRACKET_HIGHLIGHT_VISIBLE, PROPERTY_CARET_BLINKS, PROPERTY_CARET_COLOR, PROPERTY_CARET_VISIBLE, PROPERTY_ELECTRIC_SCROLL, PROPERTY_FONT, PROPERTY_INPUT_HANDLER, PROPERTY_LINE_BREAK, PROPERTY_LINE_HIGHLIGHT_COLOR, PROPERTY_LINE_HIGHLIGHT_VISIBLE, PROPERTY_PAINT_INVALID, PROPERTY_SELECTION_COLOR, PROPERTY_SPECIAL_CHARACTERS_COLOR, PROPERTY_SPECIAL_CHARACTERS_VISIBLE, PROPERTY_STYLES, PROPERTY_TAB_SIZE, PROPERTY_VIRTUAL_SPACE_ALLOWED
 
Constructor Summary
DefaultCodeEditorSettings()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
protected  void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
          Support for reporting bound property changes for boolean properties.
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
          Support for reporting bound property changes for integer properties.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Support for reporting bound property changes for Object properties.
 Color getBracketHighlightColor()
           
 Color getCaretColor()
           
 int getElectricScroll()
           
 Font getFont()
           
 InputHandler getInputHandler()
           
 int getLineBreakStyle()
           
 Color getLineHighlightColor()
           
 PropertyChangeListener[] getPropertyChangeListeners()
          Returns an array of all the property change listeners registered on this component.
 PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
          Returns an array of all the listeners which have been associated with the named property.
 Color getSelectionColor()
           
 Color getSpecialCharactersColor()
           
 SyntaxStyleSchema getStyles()
           
 int getTabSize()
           
 boolean isBlockCaret()
           
 boolean isBlockCaretSet()
           
 boolean isBracketHighlightVisible()
           
 boolean isBracketHighlightVisibleSet()
           
 boolean isCaretBlinks()
           
 boolean isCaretBlinksSet()
           
 boolean isCaretVisible()
           
 boolean isCaretVisibleSet()
           
 boolean isLineHighlightVisible()
           
 boolean isLineHighlightVisibleSet()
           
 boolean isPaintInvalid()
           
 boolean isPaintInvalidSet()
           
 boolean isSpecialCharactersSet()
           
 boolean isSpecialCharactersVisible()
           
 boolean isVirtualSpaceAllowed()
           
 boolean isVirtualSpaceAllowedSet()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list for a specific property.
 void setBlockCaret(boolean blockCaret)
           
 void setBracketHighlightColor(Color bracketHighlightColor)
           
 void setBracketHighlightVisible(boolean bracketHighlightVisible)
           
 void setCaretBlinks(boolean caretBlinks)
           
 void setCaretColor(Color caretColor)
           
 void setCaretVisible(boolean caretVisible)
           
 void setElectricScroll(int electricScroll)
           
 void setFont(Font font)
           
 void setInputHandler(InputHandler inputHandler)
           
 void setLineBreakStyle(int lineBreakStyle)
           
 void setLineHighlightColor(Color lineHighlightColor)
           
 void setLineHighlightVisible(boolean lineHighlightVisible)
           
 void setPaintInvalid(boolean paintInvalid)
           
 void setSelectionColor(Color selectionColor)
           
 void setSpecialCharactersColor(Color specialCharactersColor)
           
 void setSpecialCharactersVisible(boolean specialCharactersVisible)
           
 void setStyles(SyntaxStyleSchema styles)
           
 void setTabSize(int tabSize)
           
 void setVirtualSpaceAllowed(boolean virtualSpaceAllowed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCodeEditorSettings

public DefaultCodeEditorSettings()
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.

Specified by:
addPropertyChangeListener in interface CodeEditorSettings
Parameters:
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

If listener is null, no exception is thrown and no action is performed.

Specified by:
removePropertyChangeListener in interface CodeEditorSettings
Parameters:
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component.

Returns:
all of this component's PropertyChangeListeners or an empty array if no property change listeners are currently registered
Since:
1.4
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), PropertyChangeSupport.getPropertyChangeListeners()

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property.

Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific bound property.

If listener is null, no exception is thrown and no action is performed.

Parameters:
propertyName - a valid property name
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), removePropertyChangeListener(java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property.

Returns:
all of the PropertyChangeListeners associated with the named property or an empty array if no listeners have been added
Since:
1.4
See Also:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners()

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  boolean oldValue,
                                  boolean newValue)
Support for reporting bound property changes for boolean properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)
Support for reporting bound property changes for integer properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

isCaretVisible

public boolean isCaretVisible()
Specified by:
isCaretVisible in interface CodeEditorSettings

isCaretVisibleSet

public boolean isCaretVisibleSet()

setCaretVisible

public void setCaretVisible(boolean caretVisible)

isCaretBlinks

public boolean isCaretBlinks()
Specified by:
isCaretBlinks in interface CodeEditorSettings

isCaretBlinksSet

public boolean isCaretBlinksSet()

setCaretBlinks

public void setCaretBlinks(boolean caretBlinks)

getElectricScroll

public int getElectricScroll()
Specified by:
getElectricScroll in interface CodeEditorSettings

setElectricScroll

public void setElectricScroll(int electricScroll)

isBlockCaret

public boolean isBlockCaret()
Specified by:
isBlockCaret in interface CodeEditorSettings

isBlockCaretSet

public boolean isBlockCaretSet()

setBlockCaret

public void setBlockCaret(boolean blockCaret)

getTabSize

public int getTabSize()
Specified by:
getTabSize in interface CodeEditorSettings

setTabSize

public void setTabSize(int tabSize)

getStyles

public SyntaxStyleSchema getStyles()
Specified by:
getStyles in interface CodeEditorSettings

setStyles

public void setStyles(SyntaxStyleSchema styles)

getFont

public Font getFont()
Specified by:
getFont in interface CodeEditorSettings

setFont

public void setFont(Font font)

getCaretColor

public Color getCaretColor()
Specified by:
getCaretColor in interface CodeEditorSettings

setCaretColor

public void setCaretColor(Color caretColor)

getSelectionColor

public Color getSelectionColor()
Specified by:
getSelectionColor in interface CodeEditorSettings

setSelectionColor

public void setSelectionColor(Color selectionColor)

getLineHighlightColor

public Color getLineHighlightColor()
Specified by:
getLineHighlightColor in interface CodeEditorSettings

setLineHighlightColor

public void setLineHighlightColor(Color lineHighlightColor)

isLineHighlightVisible

public boolean isLineHighlightVisible()
Specified by:
isLineHighlightVisible in interface CodeEditorSettings

isLineHighlightVisibleSet

public boolean isLineHighlightVisibleSet()

setLineHighlightVisible

public void setLineHighlightVisible(boolean lineHighlightVisible)

getBracketHighlightColor

public Color getBracketHighlightColor()
Specified by:
getBracketHighlightColor in interface CodeEditorSettings

setBracketHighlightColor

public void setBracketHighlightColor(Color bracketHighlightColor)

isBracketHighlightVisible

public boolean isBracketHighlightVisible()
Specified by:
isBracketHighlightVisible in interface CodeEditorSettings

isBracketHighlightVisibleSet

public boolean isBracketHighlightVisibleSet()

setBracketHighlightVisible

public void setBracketHighlightVisible(boolean bracketHighlightVisible)

getSpecialCharactersColor

public Color getSpecialCharactersColor()
Specified by:
getSpecialCharactersColor in interface CodeEditorSettings

setSpecialCharactersColor

public void setSpecialCharactersColor(Color specialCharactersColor)

isSpecialCharactersVisible

public boolean isSpecialCharactersVisible()
Specified by:
isSpecialCharactersVisible in interface CodeEditorSettings

isSpecialCharactersSet

public boolean isSpecialCharactersSet()

setSpecialCharactersVisible

public void setSpecialCharactersVisible(boolean specialCharactersVisible)

isPaintInvalid

public boolean isPaintInvalid()
Specified by:
isPaintInvalid in interface CodeEditorSettings

isPaintInvalidSet

public boolean isPaintInvalidSet()

setPaintInvalid

public void setPaintInvalid(boolean paintInvalid)

isVirtualSpaceAllowed

public boolean isVirtualSpaceAllowed()
Specified by:
isVirtualSpaceAllowed in interface CodeEditorSettings

isVirtualSpaceAllowedSet

public boolean isVirtualSpaceAllowedSet()

setVirtualSpaceAllowed

public void setVirtualSpaceAllowed(boolean virtualSpaceAllowed)

getLineBreakStyle

public int getLineBreakStyle()
Specified by:
getLineBreakStyle in interface CodeEditorSettings

setLineBreakStyle

public void setLineBreakStyle(int lineBreakStyle)

getInputHandler

public InputHandler getInputHandler()
Specified by:
getInputHandler in interface CodeEditorSettings

setInputHandler

public void setInputHandler(InputHandler inputHandler)

JIDE 3.5.15