org.openbp.jaspira.propertybrowser.editor.standard
Class MultiLineStringEditor

java.lang.Object
  extended by org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
      extended by org.openbp.jaspira.propertybrowser.editor.standard.MultiLineStringEditor
All Implemented Interfaces:
java.awt.event.FocusListener, java.awt.event.KeyListener, java.lang.Cloneable, java.util.EventListener, javax.swing.event.DocumentListener, Copyable, PropertyEditor

public class MultiLineStringEditor
extends AbstractPropertyEditor
implements javax.swing.event.DocumentListener

Editor for multi line strings.

Author:
Andreas Putz

Field Summary
protected  javax.swing.JTextArea textArea
          Text area
 
Fields inherited from class org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
component, listener, object, owner, parameterParser, params, propertyBrowser, propertyName, readonly, validator, value, valueChanged, valueLoaded
 
Fields inherited from interface org.openbp.common.generic.Copyable
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW
 
Constructor Summary
MultiLineStringEditor()
          Constructor.
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that an attribute or set of attributes changed.
 void createComponent()
          Creates the editor component of the property editor.
 void focusLost(java.awt.event.FocusEvent e)
          Invoked when a component loses the keyboard focus.
 java.lang.Object getComponentValue()
          Gets the current editor component value.
 void highlight(boolean on)
          Highlights the content of the component.
 void insertUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that there was an insert into the document.
 void keyPressed(java.awt.event.KeyEvent e)
          Invoked when a key has been pressed.
protected  void parseParams(EditorParameterParser parser)
          Parses the editor parameters specified in the property descriptor.
 void removeUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that a portion of the document has been removed.
 void setComponentValue()
          Sets the display component value.
 
Methods inherited from class org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
clone, copyFrom, focusGained, forwardKeyEvent, getComponent, getObject, getOwner, getParameterParser, getParams, getPropertyBrowser, getPropertyComponent, getPropertyName, getSafeString, getValidator, getValue, initialize, initializeComponent, isReadonly, keyReleased, keyTyped, loadProperty, propertyChanged, resetComponentDisplay, resetProperty, saveProperty, setObject, setOwner, setParams, setPropertyBrowser, setPropertyName, setReadonly, setValidator, setValue, validateProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textArea

protected javax.swing.JTextArea textArea
Text area

Constructor Detail

MultiLineStringEditor

public MultiLineStringEditor()
Constructor.

Method Detail

parseParams

protected void parseParams(EditorParameterParser parser)
Parses the editor parameters specified in the property descriptor.

Overrides:
parseParams in class AbstractPropertyEditor
Parameters:
parser - Editor parameter parser or null if there are no parameters defined

createComponent

public void createComponent()
Creates the editor component of the property editor.

Specified by:
createComponent in class AbstractPropertyEditor

getComponentValue

public java.lang.Object getComponentValue()
Gets the current editor component value.

Specified by:
getComponentValue in class AbstractPropertyEditor
Returns:
The current value of the component (can be null)
Note that this value might be different from the actual property value if the property hasn't been saved yet.

setComponentValue

public void setComponentValue()
Sets the display component value.

Specified by:
setComponentValue in class AbstractPropertyEditor

highlight

public void highlight(boolean on)
Highlights the content of the component.

Overrides:
highlight in class AbstractPropertyEditor
Parameters:
on - true Turns the highlight on if the component has the focus
false Turns the highlight off

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Gives notification that there was an insert into the document. The range given by the DocumentEvent bounds the freshly inserted region.

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Parameters:
e - Document event

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Gives notification that a portion of the document has been removed. The range is given in terms of what the view last saw (that is, before updating sticky positions).

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Parameters:
e - Document event

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Gives notification that an attribute or set of attributes changed.

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Parameters:
e - Document event

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface java.awt.event.FocusListener
Overrides:
focusLost in class AbstractPropertyEditor

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Invoked when a key has been pressed.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class AbstractPropertyEditor


Copyright © 2011. All Rights Reserved.